Skip to content

Commit 4245c5b

Browse files
authored
Add boundary threshold to hmap (#95)
added boundary threshold for hmap calculation in mitochondria segmentation
1 parent 0483f53 commit 4245c5b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

synapse_net/inference/mitochondria.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ def _run_segmentation(
3232
print("Compute connected components in", time.time() - t0, "s")
3333

3434
t0 = time.time()
35-
hmap = boundaries + ((dist.max() - dist) / dist.max())
35+
hmap = (dist.max() - dist) / dist.max()
36+
hmap[boundaries > boundary_threshold] = (hmap + boundaries).max()
3637
mask = (foreground + boundaries) > 0.5
3738

3839
seg = np.zeros_like(seeds)

0 commit comments

Comments
 (0)