Skip to content

Commit 7e82fd9

Browse files
PNN loss does not work when not restricting the target mask
1 parent 0a08b3a commit 7e82fd9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spine/model/layer/cnn/ppn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ def get_ppn_positives(coords: torch.Tensor,
502502
503503
If the voxel `labels` are provided, they are used to restrict the mask
504504
applied to voxels within some distance of label points associated with
505-
the correct particle instance.
505+
the correct particle instance, not any particle instance.
506506
507507
Parameters
508508
----------
@@ -543,7 +543,7 @@ def get_ppn_positives(coords: torch.Tensor,
543543
# Assign the closest label point to each postive particle voxel
544544
pos_index = torch.where(positives)[0]
545545
closests = torch.full(
546-
(len(labels),), -1, dtype=torch.long, device=labels.device)
546+
(len(points),), -1, dtype=torch.long, device=points.device)
547547
closests[pos_index] = offset + torch.argmin(
548548
dist_mat[:, pos_index], dim=0)
549549

0 commit comments

Comments
 (0)