Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions monai/apps/nuclick/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,14 @@ def inclusion_map(self, mask, dtype):

def exclusion_map(self, others, dtype, jitter_range, drop_rate):
point_mask = torch.zeros_like(others, dtype=dtype)
if np.random.choice([True, False], p=[drop_rate, 1 - drop_rate]):
if self.R.choice([True, False], p=[drop_rate, 1 - drop_rate]):
return point_mask
Comment thread
ericspod marked this conversation as resolved.

max_x = point_mask.shape[0] - 1
max_y = point_mask.shape[1] - 1
stats = measure.regionprops(convert_to_numpy(others))
for stat in stats:
if np.random.choice([True, False], p=[drop_rate, 1 - drop_rate]):
if self.R.choice([True, False], p=[drop_rate, 1 - drop_rate]):
continue

# random jitter
Expand Down
Loading