Skip to content

Commit

Permalink
Import segmentation instead of alias.
Browse files Browse the repository at this point in the history
  • Loading branch information
willgraf committed Dec 7, 2021
1 parent bb0fa26 commit 61cb5f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deepcell_toolbox/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
import numpy as np
from scipy import ndimage
from skimage import morphology
from skimage import segmentation
from skimage.feature import peak_local_max
from skimage.exposure import equalize_adapthist
from skimage.exposure import rescale_intensity
from skimage.measure import label
from skimage.segmentation import watershed as sk_watershed


def normalize(image, epsilon=1e-07):
Expand Down Expand Up @@ -231,7 +231,7 @@ def watershed(image, min_distance=10, min_size=50, threshold_abs=0.05):

# markers = label(local_maxi)
markers = ndimage.label(local_maxi)[0]
segments = sk_watershed(-distance, markers, mask=labels)
segments = segmentation.watershed(-distance, markers, mask=labels)
results = np.expand_dims(segments, axis=-1)
results = morphology.remove_small_objects(
results, min_size=min_size, connectivity=1)
Expand Down

0 comments on commit 61cb5f2

Please sign in to comment.