Skip to content
Snippets Groups Projects
Commit a4994d5a authored by Farzaneh Labbaf's avatar Farzaneh Labbaf
Browse files

Update packages and fix deprecated syntax in updated packages

parent dddb220b
No related branches found
No related tags found
No related merge requests found
numpy>=1.17.4 numpy>=1.17.4
PyQt5>=5.14.2 PyQt5>=5.14.2
matplotlib>=3.1.1 matplotlib>=3.1.1
nd2reader==3.2.1 nd2reader==3.3.0
h5py==2.9.0 h5py==3.8.0
scikit-image>=0.15.0 scikit-image>=0.15.0
openpyxl==3.1.2
Tensorflow==2.11.0 Tensorflow==2.11.0
opencv-python-headless>=4.7.0.72 opencv-python-headless>=4.7.0.72
pandas>=0.25.3 pandas>=0.25.3
munkres==1.1.2 munkres
sklearn==0.0 sklearn
imageio>=2.6.1 imageio>=2.6.1
Pillow>=6.2.1 Pillow>=6.2.1
from scipy import ndimage as ndi from scipy import ndimage as ndi
from skimage.feature import peak_local_max from skimage.feature import peak_local_max
from skimage.morphology import watershed, dilation from skimage.morphology import dilation
from skimage.segmentation import watershed
from skimage.filters import gaussian from skimage.filters import gaussian
from skimage.measure import label from skimage.measure import label
...@@ -25,10 +26,13 @@ def segment(th, pred, min_distance=10, topology=None): ...@@ -25,10 +26,13 @@ def segment(th, pred, min_distance=10, topology=None):
elif callable(topology): elif callable(topology):
topology = topology(dtr) topology = topology(dtr)
m = peak_local_max(-topology, min_distance, indices=False) coords = peak_local_max(-topology, min_distance)
# to fix deprecation of indices in peak_local_max
mask = np.zeros(dtr.shape, dtype=bool)
mask[tuple(coords.T)] = True
# Uncomment to start with cross for every pixel instead of single pixel # Uncomment to start with cross for every pixel instead of single pixel
m_lab = label(m) #comment this m_lab = label(mask) #comment this
#m_dil = dilation(m) #m_dil = dilation(m)
#m_lab = label(m_dil) #m_lab = label(m_dil)
wsh = watershed(topology, m_lab, mask=th, connectivity=2) wsh = watershed(topology, m_lab, mask=th, connectivity=2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment