Skip to content

Commit

Permalink
Only keep FP removal for Napari UI
Browse files Browse the repository at this point in the history
  • Loading branch information
qin-yu committed Feb 20, 2024
1 parent 80376ea commit a09d752
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions plantseg/segmentation/functional/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ def gasp(boundary_pmaps: np.array,
gasp_linkage_criteria: str = 'average',
beta: float = 0.5,
post_minsize: int = 100,
n_threads: int = 6,
foreground_pmap: np.array = None,
foreground_threshold: float = 0.6) -> np.array:
n_threads: int = 6) -> np.array:
"""
Implementation of the GASP algorithm for segmentation from affinities.
Expand Down Expand Up @@ -136,13 +134,6 @@ def superpixel_gen(*args, **kwargs):
# init and run size threshold
if post_minsize > 0:
segmentation, _ = apply_size_filter(segmentation.astype('uint32'), boundary_pmaps, post_minsize)

if foreground_pmap is not None:
segmentation = remove_false_positives_by_foreground_probability(
segmentation,
foreground_pmap,
foreground_threshold,
)
return segmentation


Expand Down

0 comments on commit a09d752

Please sign in to comment.