Skip to content

Commit ca8b02c

Browse files
committed
added foreground threshold to hmap
1 parent 38f7907 commit ca8b02c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

synapse_net/inference/mitochondria.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def _run_segmentation(
3333

3434
t0 = time.time()
3535
hmap = (dist.max() - dist) / dist.max()
36-
hmap[boundaries > boundary_threshold] = (hmap + boundaries).max()
36+
hmap[np.logical_and(boundaries > boundary_threshold, foreground < boundary_threshold)] = (hmap + boundaries).max()
3737
mask = (foreground + boundaries) > 0.5
3838

3939
seg = np.zeros_like(seeds)

0 commit comments

Comments
 (0)