Skip to content

Commit

Permalink
Fix issues in ribbon postprocessing
Browse files Browse the repository at this point in the history
  • Loading branch information
constantinpape committed Dec 6, 2024
1 parent 57b7258 commit 064ff2d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions synaptic_reconstruction/tools/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ def _segment_ribbon_AZ(image, model, tiling, scale, verbose, **kwargs):

# If the vesicles were passed then run additional post-processing.
if vesicles is None:
segmentation = predictions

# Otherwise, just return the predictions.
else:
from synaptic_reconstruction.inference.postprocessing import (
segment_ribbon, segment_presynaptic_density, segment_membrane_distance_based,
)
Expand All @@ -85,15 +89,11 @@ def _segment_ribbon_AZ(image, model, tiling, scale, verbose, **kwargs):
)
ref_segmentation = PD if PD.sum() > 0 else ribbon
membrane = segment_membrane_distance_based(
predictions["membrane"], ref_segmentation, n_sclices_exclude=n_slices_exclude, max_distance=500
predictions["membrane"], ref_segmentation, max_distance=500, n_slices_exclude=n_slices_exclude,
)

segmentation = {"ribbon": ribbon, "PD": PD, "membrane": membrane}

# Otherwise, just return the predictions.
else:
segmentation = predictions

return segmentation


Expand Down

0 comments on commit 064ff2d

Please sign in to comment.