Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in deep_watershed.py #134

Open
joshuagohos opened this issue Dec 21, 2022 · 10 comments
Open

Error in deep_watershed.py #134

joshuagohos opened this issue Dec 21, 2022 · 10 comments
Labels
chore Maintenance
Milestone

Comments

@joshuagohos
Copy link

Running segmentations_predictions = app.predict(X_train, image_mpp=0.5) throws:

TypeError: h_maxima() got an unexpected keyword argument 'footprint'

Referencing /usr/local/lib/python3.8/dist-packages/deepcell_toolbox/deep_watershed.py

This was not present before (the commands worked fine). It just occurred around 12PM 21 Dec 2022. This same error also applies to the Nuclear-Application and Cytoplasm-Application.

This error occurs as I am trying out the notebook https://github.com/vanvalenlab/deepcell-tf/tree/master/notebooks/applications/Mesmer-Application.ipynb.

Here is the snapshow of the above ipynb as I ran it in Colab.
Screenshot 2022-12-21 at 5 09 03 PM

@rossbar
Copy link
Contributor

rossbar commented Dec 21, 2022

Thanks for reporting @joshuagohos . Can you share how the environment was created (for example, did you use conda or pip)? Also can you share what version of scikit-image is installed in your environment?

@rossbar rossbar added the chore Maintenance label Dec 21, 2022
@rossbar rossbar added this to the 0.13.1 milestone Dec 21, 2022
@joshuagohos
Copy link
Author

In Colab, I used ! pip install deepcell.

Checking the scikit-image version in Colab, I get:

import skimage
skimage.__version__

0.18.3

The package installation output for ! pip install deepcell is pasted here:

Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Collecting deepcell
  Downloading DeepCell-0.12.4.tar.gz (143 kB)
     |████████████████████████████████| 143 kB 4.1 MB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: opencv-python-headless<5 in /usr/local/lib/python3.8/dist-packages (from deepcell) (4.6.0.66)
Requirement already satisfied: scikit-learn>=0.20.4 in /usr/local/lib/python3.8/dist-packages (from deepcell) (1.0.2)
Requirement already satisfied: scipy<2,>=1.2.3 in /usr/local/lib/python3.8/dist-packages (from deepcell) (1.7.3)
Collecting deepcell-tracking~=0.6.1
  Downloading DeepCell_Tracking-0.6.4.tar.gz (37 kB)
Collecting pydot<2,>=1.4.2
  Downloading pydot-1.4.2-py2.py3-none-any.whl (21 kB)
Requirement already satisfied: matplotlib in /usr/local/lib/python3.8/dist-packages (from deepcell) (3.2.2)
Collecting tensorflow~=2.8.0
  Downloading tensorflow-2.8.4-cp38-cp38-manylinux2010_x86_64.whl (498.0 MB)
     |████████████████████████████████| 498.0 MB 11 kB/s 
Collecting tensorflow-addons~=0.16.1
  Downloading tensorflow_addons-0.16.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.1 MB)
     |████████████████████████████████| 1.1 MB 57.9 MB/s 
Requirement already satisfied: scikit-image>=0.14.5 in /usr/local/lib/python3.8/dist-packages (from deepcell) (0.18.3)
Collecting deepcell-toolbox~=0.12.0
  Downloading DeepCell_Toolbox-0.12.0.tar.gz (39 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: numpy<1.24,>=1.16.6 in /usr/local/lib/python3.8/dist-packages (from deepcell) (1.21.6)
Collecting jupyter<2,>=1.0.0
  Downloading jupyter-1.0.0-py2.py3-none-any.whl (2.7 kB)
Collecting spektral~=1.0.4
  Downloading spektral-1.0.8-py3-none-any.whl (123 kB)
     |████████████████████████████████| 123 kB 32.6 MB/s 
Requirement already satisfied: pandas in /usr/local/lib/python3.8/dist-packages (from deepcell-toolbox~=0.12.0->deepcell) (1.3.5)
Requirement already satisfied: tqdm in /usr/local/lib/python3.8/dist-packages (from deepcell-toolbox~=0.12.0->deepcell) (4.64.1)
Requirement already satisfied: networkx>=2.1 in /usr/local/lib/python3.8/dist-packages (from deepcell-toolbox~=0.12.0->deepcell) (2.8.8)
Requirement already satisfied: cython>=0.28.0 in /usr/local/lib/python3.8/dist-packages (from deepcell-toolbox~=0.12.0->deepcell) (0.29.32)
Requirement already satisfied: ipywidgets in /usr/local/lib/python3.8/dist-packages (from jupyter<2,>=1.0.0->deepcell) (7.7.1)
Requirement already satisfied: nbconvert in /usr/local/lib/python3.8/dist-packages (from jupyter<2,>=1.0.0->deepcell) (5.6.1)
Collecting qtconsole
  Downloading qtconsole-5.4.0-py3-none-any.whl (121 kB)
     |████████████████████████████████| 121 kB 52.0 MB/s 
Requirement already satisfied: ipykernel in /usr/local/lib/python3.8/dist-packages (from jupyter<2,>=1.0.0->deepcell) (5.3.4)
Requirement already satisfied: notebook in /usr/local/lib/python3.8/dist-packages (from jupyter<2,>=1.0.0->deepcell) (5.7.16)
Requirement already satisfied: jupyter-console in /usr/local/lib/python3.8/dist-packages (from jupyter<2,>=1.0.0->deepcell) (6.1.0)
Requirement already satisfied: pyparsing>=2.1.4 in /usr/local/lib/python3.8/dist-packages (from pydot<2,>=1.4.2->deepcell) (3.0.9)
Requirement already satisfied: tifffile>=2019.7.26 in /usr/local/lib/python3.8/dist-packages (from scikit-image>=0.14.5->deepcell) (2022.10.10)
Requirement already satisfied: PyWavelets>=1.1.1 in /usr/local/lib/python3.8/dist-packages (from scikit-image>=0.14.5->deepcell) (1.4.1)
Requirement already satisfied: imageio>=2.3.0 in /usr/local/lib/python3.8/dist-packages (from scikit-image>=0.14.5->deepcell) (2.9.0)
Requirement already satisfied: pillow!=7.1.0,!=7.1.1,>=4.3.0 in /usr/local/lib/python3.8/dist-packages (from scikit-image>=0.14.5->deepcell) (7.1.2)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.8/dist-packages (from matplotlib->deepcell) (1.4.4)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.8/dist-packages (from matplotlib->deepcell) (0.11.0)
Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.8/dist-packages (from matplotlib->deepcell) (2.8.2)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.8/dist-packages (from python-dateutil>=2.1->matplotlib->deepcell) (1.15.0)
Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.8/dist-packages (from scikit-learn>=0.20.4->deepcell) (3.1.0)
Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.8/dist-packages (from scikit-learn>=0.20.4->deepcell) (1.2.0)
Collecting numpy<1.24,>=1.16.6
  Downloading numpy-1.19.5-cp38-cp38-manylinux2010_x86_64.whl (14.9 MB)
     |████████████████████████████████| 14.9 MB 24.6 MB/s 
Requirement already satisfied: requests in /usr/local/lib/python3.8/dist-packages (from spektral~=1.0.4->deepcell) (2.23.0)
Requirement already satisfied: lxml in /usr/local/lib/python3.8/dist-packages (from spektral~=1.0.4->deepcell) (4.9.2)
Requirement already satisfied: wrapt>=1.11.0 in /usr/local/lib/python3.8/dist-packages (from tensorflow~=2.8.0->deepcell) (1.14.1)
Requirement already satisfied: protobuf<3.20,>=3.9.2 in /usr/local/lib/python3.8/dist-packages (from tensorflow~=2.8.0->deepcell) (3.19.6)
Collecting tensorboard<2.9,>=2.8
  Downloading tensorboard-2.8.0-py3-none-any.whl (5.8 MB)
     |████████████████████████████████| 5.8 MB 60.9 MB/s 
Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python3.8/dist-packages (from tensorflow~=2.8.0->deepcell) (2.1.1)
Requirement already satisfied: flatbuffers>=1.12 in /usr/local/lib/python3.8/dist-packages (from tensorflow~=2.8.0->deepcell) (1.12)
Requirement already satisfied: gast>=0.2.1 in /usr/local/lib/python3.8/dist-packages (from tensorflow~=2.8.0->deepcell) (0.4.0)
Requirement already satisfied: google-pasta>=0.1.1 in /usr/local/lib/python3.8/dist-packages (from tensorflow~=2.8.0->deepcell) (0.2.0)
Requirement already satisfied: astunparse>=1.6.0 in /usr/local/lib/python3.8/dist-packages (from tensorflow~=2.8.0->deepcell) (1.6.3)
Requirement already satisfied: grpcio<2.0,>=1.24.3 in /usr/local/lib/python3.8/dist-packages (from tensorflow~=2.8.0->deepcell) (1.51.1)
Requirement already satisfied: h5py>=2.9.0 in /usr/local/lib/python3.8/dist-packages (from tensorflow~=2.8.0->deepcell) (3.1.0)
Requirement already satisfied: libclang>=9.0.1 in /usr/local/lib/python3.8/dist-packages (from tensorflow~=2.8.0->deepcell) (14.0.6)
Requirement already satisfied: keras-preprocessing>=1.1.1 in /usr/local/lib/python3.8/dist-packages (from tensorflow~=2.8.0->deepcell) (1.1.2)
Requirement already satisfied: setuptools in /usr/local/lib/python3.8/dist-packages (from tensorflow~=2.8.0->deepcell) (57.4.0)
Requirement already satisfied: opt-einsum>=2.3.2 in /usr/local/lib/python3.8/dist-packages (from tensorflow~=2.8.0->deepcell) (3.3.0)
Collecting tensorflow~=2.8.0
  Downloading tensorflow-2.8.3-cp38-cp38-manylinux2010_x86_64.whl (498.4 MB)
     |████████████████████████████████| 498.4 MB 25 kB/s 
  Downloading tensorflow-2.8.2-cp38-cp38-manylinux2010_x86_64.whl (498.0 MB)
     |████████████████████████████████| 498.0 MB 20 kB/s 
  Downloading tensorflow-2.8.1-cp38-cp38-manylinux2010_x86_64.whl (498.0 MB)
     |████████████████████████████████| 498.0 MB 32 kB/s 
  Downloading tensorflow-2.8.0-cp38-cp38-manylinux2010_x86_64.whl (497.6 MB)
     |████████████████████████████████| 497.6 MB 1.9 kB/s 
Collecting tf-estimator-nightly==2.8.0.dev2021122109
  Downloading tf_estimator_nightly-2.8.0.dev2021122109-py2.py3-none-any.whl (462 kB)
     |████████████████████████████████| 462 kB 62.8 MB/s 
INFO: pip is looking at multiple versions of numpy to determine which version is compatible with other requirements. This could take a while.
Collecting numpy<1.24,>=1.16.6
  Downloading numpy-1.19.4-cp38-cp38-manylinux2010_x86_64.whl (14.5 MB)
     |████████████████████████████████| 14.5 MB 47.7 MB/s 
  Downloading numpy-1.19.3-cp38-cp38-manylinux2010_x86_64.whl (14.9 MB)
     |████████████████████████████████| 14.9 MB 44.4 MB/s 
  Downloading numpy-1.19.2-cp38-cp38-manylinux2010_x86_64.whl (14.5 MB)
     |████████████████████████████████| 14.5 MB 57.1 MB/s 
  Downloading numpy-1.19.1-cp38-cp38-manylinux2010_x86_64.whl (14.5 MB)
     |████████████████████████████████| 14.5 MB 56.7 MB/s 
  Downloading numpy-1.19.0-cp38-cp38-manylinux2010_x86_64.whl (14.6 MB)
     |████████████████████████████████| 14.6 MB 148 kB/s 
  Downloading numpy-1.18.5-cp38-cp38-manylinux1_x86_64.whl (20.6 MB)
     |████████████████████████████████| 20.6 MB 1.1 MB/s 
  Downloading numpy-1.18.4-cp38-cp38-manylinux1_x86_64.whl (20.7 MB)
     |████████████████████████████████| 20.7 MB 1.4 MB/s 
INFO: pip is looking at multiple versions of numpy to determine which version is compatible with other requirements. This could take a while.
  Downloading numpy-1.18.3-cp38-cp38-manylinux1_x86_64.whl (20.6 MB)
     |████████████████████████████████| 20.6 MB 92.6 MB/s 
  Downloading numpy-1.18.2-cp38-cp38-manylinux1_x86_64.whl (20.6 MB)
     |████████████████████████████████| 20.6 MB 1.3 MB/s 
  Downloading numpy-1.18.1-cp38-cp38-manylinux1_x86_64.whl (20.6 MB)
     |████████████████████████████████| 20.6 MB 1.3 MB/s 
  Downloading numpy-1.18.0-cp38-cp38-manylinux1_x86_64.whl (20.6 MB)
     |████████████████████████████████| 20.6 MB 1.2 MB/s 
  Downloading numpy-1.17.5-cp38-cp38-manylinux1_x86_64.whl (20.5 MB)
     |████████████████████████████████| 20.5 MB 1.2 MB/s 
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  Downloading numpy-1.17.4-cp38-cp38-manylinux1_x86_64.whl (20.5 MB)
     |████████████████████████████████| 20.5 MB 38.9 MB/s 
  Downloading numpy-1.17.3-cp38-cp38-manylinux1_x86_64.whl (20.5 MB)
     |████████████████████████████████| 20.5 MB 1.2 MB/s 
INFO: pip is looking at multiple versions of spektral to determine which version is compatible with other requirements. This could take a while.
Collecting spektral~=1.0.4
  Downloading spektral-1.0.7-py3-none-any.whl (122 kB)
     |████████████████████████████████| 122 kB 62.0 MB/s 
  Downloading spektral-1.0.6-py3-none-any.whl (114 kB)
     |████████████████████████████████| 114 kB 61.1 MB/s 
Requirement already satisfied: typing-extensions>=3.6.6 in /usr/local/lib/python3.8/dist-packages (from tensorflow~=2.8.0->deepcell) (4.4.0)
Collecting tensorflow-estimator<2.9,>=2.8
  Downloading tensorflow_estimator-2.8.0-py2.py3-none-any.whl (462 kB)
     |████████████████████████████████| 462 kB 60.4 MB/s 
Collecting keras<2.9,>=2.8.0rc0
  Downloading keras-2.8.0-py2.py3-none-any.whl (1.4 MB)
     |████████████████████████████████| 1.4 MB 64.1 MB/s 
Requirement already satisfied: tensorflow-io-gcs-filesystem>=0.23.1 in /usr/local/lib/python3.8/dist-packages (from tensorflow~=2.8.0->deepcell) (0.28.0)
Requirement already satisfied: absl-py>=0.4.0 in /usr/local/lib/python3.8/dist-packages (from tensorflow~=2.8.0->deepcell) (1.3.0)
Requirement already satisfied: wheel<1.0,>=0.23.0 in /usr/local/lib/python3.8/dist-packages (from astunparse>=1.6.0->tensorflow~=2.8.0->deepcell) (0.38.4)
Requirement already satisfied: google-auth<3,>=1.6.3 in /usr/local/lib/python3.8/dist-packages (from tensorboard<2.9,>=2.8->tensorflow~=2.8.0->deepcell) (2.15.0)
Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.8/dist-packages (from tensorboard<2.9,>=2.8->tensorflow~=2.8.0->deepcell) (3.4.1)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /usr/local/lib/python3.8/dist-packages (from tensorboard<2.9,>=2.8->tensorflow~=2.8.0->deepcell) (1.8.1)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in /usr/local/lib/python3.8/dist-packages (from tensorboard<2.9,>=2.8->tensorflow~=2.8.0->deepcell) (0.6.1)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /usr/local/lib/python3.8/dist-packages (from tensorboard<2.9,>=2.8->tensorflow~=2.8.0->deepcell) (0.4.6)
Requirement already satisfied: werkzeug>=0.11.15 in /usr/local/lib/python3.8/dist-packages (from tensorboard<2.9,>=2.8->tensorflow~=2.8.0->deepcell) (1.0.1)
Requirement already satisfied: cachetools<6.0,>=2.0.0 in /usr/local/lib/python3.8/dist-packages (from google-auth<3,>=1.6.3->tensorboard<2.9,>=2.8->tensorflow~=2.8.0->deepcell) (5.2.0)
Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.8/dist-packages (from google-auth<3,>=1.6.3->tensorboard<2.9,>=2.8->tensorflow~=2.8.0->deepcell) (4.9)
Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.8/dist-packages (from google-auth<3,>=1.6.3->tensorboard<2.9,>=2.8->tensorflow~=2.8.0->deepcell) (0.2.8)
Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.8/dist-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.9,>=2.8->tensorflow~=2.8.0->deepcell) (1.3.1)
Requirement already satisfied: importlib-metadata>=4.4 in /usr/local/lib/python3.8/dist-packages (from markdown>=2.6.8->tensorboard<2.9,>=2.8->tensorflow~=2.8.0->deepcell) (5.1.0)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.8/dist-packages (from importlib-metadata>=4.4->markdown>=2.6.8->tensorboard<2.9,>=2.8->tensorflow~=2.8.0->deepcell) (3.11.0)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /usr/local/lib/python3.8/dist-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard<2.9,>=2.8->tensorflow~=2.8.0->deepcell) (0.4.8)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/dist-packages (from requests->spektral~=1.0.4->deepcell) (2022.12.7)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests->spektral~=1.0.4->deepcell) (1.24.3)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.8/dist-packages (from requests->spektral~=1.0.4->deepcell) (3.0.4)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.8/dist-packages (from requests->spektral~=1.0.4->deepcell) (2.10)
Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.8/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.9,>=2.8->tensorflow~=2.8.0->deepcell) (3.2.2)
Requirement already satisfied: typeguard>=2.7 in /usr/local/lib/python3.8/dist-packages (from tensorflow-addons~=0.16.1->deepcell) (2.7.1)
Requirement already satisfied: jupyter-client in /usr/local/lib/python3.8/dist-packages (from ipykernel->jupyter<2,>=1.0.0->deepcell) (6.1.12)
Requirement already satisfied: ipython>=5.0.0 in /usr/local/lib/python3.8/dist-packages (from ipykernel->jupyter<2,>=1.0.0->deepcell) (7.9.0)
Requirement already satisfied: traitlets>=4.1.0 in /usr/local/lib/python3.8/dist-packages (from ipykernel->jupyter<2,>=1.0.0->deepcell) (5.7.1)
Requirement already satisfied: tornado>=4.2 in /usr/local/lib/python3.8/dist-packages (from ipykernel->jupyter<2,>=1.0.0->deepcell) (6.0.4)
Requirement already satisfied: prompt-toolkit<2.1.0,>=2.0.0 in /usr/local/lib/python3.8/dist-packages (from ipython>=5.0.0->ipykernel->jupyter<2,>=1.0.0->deepcell) (2.0.10)
Collecting jedi>=0.10
  Downloading jedi-0.18.2-py2.py3-none-any.whl (1.6 MB)
     |████████████████████████████████| 1.6 MB 52.9 MB/s 
Requirement already satisfied: decorator in /usr/local/lib/python3.8/dist-packages (from ipython>=5.0.0->ipykernel->jupyter<2,>=1.0.0->deepcell) (4.4.2)
Requirement already satisfied: pickleshare in /usr/local/lib/python3.8/dist-packages (from ipython>=5.0.0->ipykernel->jupyter<2,>=1.0.0->deepcell) (0.7.5)
Requirement already satisfied: pygments in /usr/local/lib/python3.8/dist-packages (from ipython>=5.0.0->ipykernel->jupyter<2,>=1.0.0->deepcell) (2.6.1)
Requirement already satisfied: backcall in /usr/local/lib/python3.8/dist-packages (from ipython>=5.0.0->ipykernel->jupyter<2,>=1.0.0->deepcell) (0.2.0)
Requirement already satisfied: pexpect in /usr/local/lib/python3.8/dist-packages (from ipython>=5.0.0->ipykernel->jupyter<2,>=1.0.0->deepcell) (4.8.0)
Requirement already satisfied: parso<0.9.0,>=0.8.0 in /usr/local/lib/python3.8/dist-packages (from jedi>=0.10->ipython>=5.0.0->ipykernel->jupyter<2,>=1.0.0->deepcell) (0.8.3)
Requirement already satisfied: wcwidth in /usr/local/lib/python3.8/dist-packages (from prompt-toolkit<2.1.0,>=2.0.0->ipython>=5.0.0->ipykernel->jupyter<2,>=1.0.0->deepcell) (0.2.5)
Requirement already satisfied: widgetsnbextension~=3.6.0 in /usr/local/lib/python3.8/dist-packages (from ipywidgets->jupyter<2,>=1.0.0->deepcell) (3.6.1)
Requirement already satisfied: jupyterlab-widgets>=1.0.0 in /usr/local/lib/python3.8/dist-packages (from ipywidgets->jupyter<2,>=1.0.0->deepcell) (3.0.4)
Requirement already satisfied: ipython-genutils~=0.2.0 in /usr/local/lib/python3.8/dist-packages (from ipywidgets->jupyter<2,>=1.0.0->deepcell) (0.2.0)
Requirement already satisfied: nbformat in /usr/local/lib/python3.8/dist-packages (from notebook->jupyter<2,>=1.0.0->deepcell) (5.7.0)
Requirement already satisfied: pyzmq>=17 in /usr/local/lib/python3.8/dist-packages (from notebook->jupyter<2,>=1.0.0->deepcell) (23.2.1)
Requirement already satisfied: prometheus-client in /usr/local/lib/python3.8/dist-packages (from notebook->jupyter<2,>=1.0.0->deepcell) (0.15.0)
Requirement already satisfied: terminado>=0.8.1 in /usr/local/lib/python3.8/dist-packages (from notebook->jupyter<2,>=1.0.0->deepcell) (0.13.3)
Requirement already satisfied: Send2Trash in /usr/local/lib/python3.8/dist-packages (from notebook->jupyter<2,>=1.0.0->deepcell) (1.8.0)
Requirement already satisfied: jinja2<=3.0.0 in /usr/local/lib/python3.8/dist-packages (from notebook->jupyter<2,>=1.0.0->deepcell) (2.11.3)
Requirement already satisfied: jupyter-core>=4.4.0 in /usr/local/lib/python3.8/dist-packages (from notebook->jupyter<2,>=1.0.0->deepcell) (5.1.0)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.8/dist-packages (from jinja2<=3.0.0->notebook->jupyter<2,>=1.0.0->deepcell) (2.0.1)
Requirement already satisfied: platformdirs>=2.5 in /usr/local/lib/python3.8/dist-packages (from jupyter-core>=4.4.0->notebook->jupyter<2,>=1.0.0->deepcell) (2.6.0)
Requirement already satisfied: mistune<2,>=0.8.1 in /usr/local/lib/python3.8/dist-packages (from nbconvert->jupyter<2,>=1.0.0->deepcell) (0.8.4)
Requirement already satisfied: defusedxml in /usr/local/lib/python3.8/dist-packages (from nbconvert->jupyter<2,>=1.0.0->deepcell) (0.7.1)
Requirement already satisfied: pandocfilters>=1.4.1 in /usr/local/lib/python3.8/dist-packages (from nbconvert->jupyter<2,>=1.0.0->deepcell) (1.5.0)
Requirement already satisfied: testpath in /usr/local/lib/python3.8/dist-packages (from nbconvert->jupyter<2,>=1.0.0->deepcell) (0.6.0)
Requirement already satisfied: entrypoints>=0.2.2 in /usr/local/lib/python3.8/dist-packages (from nbconvert->jupyter<2,>=1.0.0->deepcell) (0.4)
Requirement already satisfied: bleach in /usr/local/lib/python3.8/dist-packages (from nbconvert->jupyter<2,>=1.0.0->deepcell) (5.0.1)
Requirement already satisfied: fastjsonschema in /usr/local/lib/python3.8/dist-packages (from nbformat->notebook->jupyter<2,>=1.0.0->deepcell) (2.16.2)
Requirement already satisfied: jsonschema>=2.6 in /usr/local/lib/python3.8/dist-packages (from nbformat->notebook->jupyter<2,>=1.0.0->deepcell) (4.3.3)
Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /usr/local/lib/python3.8/dist-packages (from jsonschema>=2.6->nbformat->notebook->jupyter<2,>=1.0.0->deepcell) (0.19.2)
Requirement already satisfied: attrs>=17.4.0 in /usr/local/lib/python3.8/dist-packages (from jsonschema>=2.6->nbformat->notebook->jupyter<2,>=1.0.0->deepcell) (22.1.0)
Requirement already satisfied: importlib-resources>=1.4.0 in /usr/local/lib/python3.8/dist-packages (from jsonschema>=2.6->nbformat->notebook->jupyter<2,>=1.0.0->deepcell) (5.10.1)
Requirement already satisfied: ptyprocess in /usr/local/lib/python3.8/dist-packages (from terminado>=0.8.1->notebook->jupyter<2,>=1.0.0->deepcell) (0.7.0)
Requirement already satisfied: webencodings in /usr/local/lib/python3.8/dist-packages (from bleach->nbconvert->jupyter<2,>=1.0.0->deepcell) (0.5.1)
Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.8/dist-packages (from pandas->deepcell-toolbox~=0.12.0->deepcell) (2022.6)
Collecting qtpy>=2.0.1
  Downloading QtPy-2.3.0-py3-none-any.whl (83 kB)
     |████████████████████████████████| 83 kB 2.4 MB/s 
Requirement already satisfied: packaging in /usr/local/lib/python3.8/dist-packages (from qtpy>=2.0.1->qtconsole->jupyter<2,>=1.0.0->deepcell) (21.3)
Building wheels for collected packages: deepcell, deepcell-toolbox, deepcell-tracking
  Building wheel for deepcell (PEP 517) ... done
  Created wheel for deepcell: filename=DeepCell-0.12.4-py3-none-any.whl size=239669 sha256=4b28bf6bc2647f31191b54004e0b9f9e40aa9cbfd433fb7ac6331d91a53ca793
  Stored in directory: /root/.cache/pip/wheels/a8/47/1a/a797fcb3124a356dc8e103bff5c8b2c2eea39c17129017a028
  Building wheel for deepcell-toolbox (PEP 517) ... done
  Created wheel for deepcell-toolbox: filename=DeepCell_Toolbox-0.12.0-cp38-cp38-linux_x86_64.whl size=130750 sha256=fb922469da71810e8dd43d3dda1efd080e391fa557532ac158dc0f4b06ae2743
  Stored in directory: /root/.cache/pip/wheels/1f/e7/4f/4e745266b97d65b0dbdb12ad81189721dfd4843b76d67e27eb
  Building wheel for deepcell-tracking (setup.py) ... done
  Created wheel for deepcell-tracking: filename=DeepCell_Tracking-0.6.4-py3-none-any.whl size=49893 sha256=94ee9e16edd5b9bfd1eee0fe7796db003c56585fe135b8e2d78a64dc6b02a066
  Stored in directory: /root/.cache/pip/wheels/e7/25/a5/8756a87dfcc8c4062f0ec25db96374494d65f03d0df8db9643
Successfully built deepcell deepcell-toolbox deepcell-tracking
Installing collected packages: jedi, tensorflow-estimator, tensorboard, qtpy, keras, tensorflow, qtconsole, deepcell-toolbox, tensorflow-addons, spektral, pydot, jupyter, deepcell-tracking, deepcell
  Attempting uninstall: tensorflow-estimator
    Found existing installation: tensorflow-estimator 2.9.0
    Uninstalling tensorflow-estimator-2.9.0:
      Successfully uninstalled tensorflow-estimator-2.9.0
  Attempting uninstall: tensorboard
    Found existing installation: tensorboard 2.9.1
    Uninstalling tensorboard-2.9.1:
      Successfully uninstalled tensorboard-2.9.1
  Attempting uninstall: keras
    Found existing installation: keras 2.9.0
    Uninstalling keras-2.9.0:
      Successfully uninstalled keras-2.9.0
  Attempting uninstall: tensorflow
    Found existing installation: tensorflow 2.9.2
    Uninstalling tensorflow-2.9.2:
      Successfully uninstalled tensorflow-2.9.2
  Attempting uninstall: pydot
    Found existing installation: pydot 1.3.0
    Uninstalling pydot-1.3.0:
      Successfully uninstalled pydot-1.3.0
Successfully installed deepcell-0.12.4 deepcell-toolbox-0.12.0 deepcell-tracking-0.6.4 jedi-0.18.2 jupyter-1.0.0 keras-2.8.0 pydot-1.4.2 qtconsole-5.4.0 qtpy-2.3.0 spektral-1.0.6 tensorboard-2.8.0 tensorflow-2.8.4 tensorflow-addons-0.16.1 tensorflow-estimator-2.8.0

@rossbar
Copy link
Contributor

rossbar commented Dec 22, 2022

Interesting - that install log looks like a lot of old versions and unnecessary downloads. For example the cascading back through versions of numpy all the way back to 1.17 is probably dominating install time. Unfortunately it's always tough to say what causes things like this due to transitive dependencies.

For this particular case, after you've run pip install deepcell, can you try pip install --upgrade scikit-image? That should bring you up to a version that supports the correct call signatures for the function in question.

@joshuagohos
Copy link
Author

Ok. I've added it in the following:
! pip install deepcell ! pip install --upgrade scikit-image
Now, checking the version yields:
import skimage skimage.__version__
0.19.3

I am now able to run app.predict() based on the NuclearSegmentation application. So it works insofar as the previous bug is now gone.

But, one caveat is that it seems to give me different segmentation results than what I got before when trying on my own image data.

Before the above error and using the previous scikit-image version, applying nuclear-application segmentation gave me this segmentation:
Screenshot 2022-12-22 at 2 31 36 PM

But with this update of scikit-image, the same app.predict() from. Nuclear Segmentation, I get:
Screenshot 2022-12-22 at 2 35 18 PM

The color scaling rendering is a little different, but the segmentation is applied on the same base image.

Moreover, both are different from what I get from the online DeepCell predict -> label result:
Screenshot 2022-12-22 at 2 37 32 PM
Again, apologies for the different color rendering, but they are all of the same base image.

I've reflected this in another issue intro-to-deepcell#45

rossbar added a commit to rossbar/deepcell-toolbox that referenced this issue Dec 22, 2022
skimage-0.19 introduced the deprecations for the selem keyword
args. This will fix issues like vanvalenlabgh-134.
@rossbar
Copy link
Contributor

rossbar commented Dec 22, 2022

I am now able to run app.predict() based on the NuclearSegmentation application. So it works insofar as the previous bug is now gone.

Great, thanks for checking!

But, one caveat is that it seems to give me different segmentation results than what I got before when trying on my own image data.

The scope here is much larger than the original issue. There are many potential sources of variability: model versions, data versions, any additions or alterations vis-a-vis model training (if applicable), pre- or post- processing steps that involve random processes, dependency management, etc.

At this point I don't have any concrete suggestions for a fully reproducible workflow for your use-case. Some (non-expert) suggestions that I'd offer:

  • Perhaps look into running your workflows within the provided containers. That at least should help eliminate some of the potential variability in environment/dependency management.

Before the above error and using the previous scikit-image version, applying nuclear-application segmentation gave me this segmentation:

  • If you want to recover the previous library versions, you can do pip install deepcell==0.12.3. Though beware that this assumes you are running in a "clean" environment on colab, which doesn't seem to be the case in the above build log.

@msschwartz21
Copy link
Member

I just want to add that there was an update to the NuclearSegmentation model between deepcell 0.12.3 and deepcell 0.12.4 so I would second Ross's suggestion to revert to the previous version with deepcell==0.12.3.

@joshuagohos
Copy link
Author

joshuagohos commented Dec 23, 2022

Thanks. Concur with your suggestions and will try them in Colab. Are the Docker container versions more recommended then in this case?

@joshuagohos
Copy link
Author

I confirm that reverting to deepcell==0.12.3 reinstates my previous segmentation results. Thanks! The only issue remaining is the comparability between the kiosk/online versions and the notebook application version.

@msschwartz21
Copy link
Member

I checked and the same models should be deployed in both deepcell 0.12.3 and in the kiosk. We'll look into possible differences after the holidays and let you know if we find anything.

@joshuagohos
Copy link
Author

Thanks. If it helps, I found that changing the resolution parameter in the notebook command modulates the segmentation result to be closer to the online version.

In the online version, I set the image resolution to 1 micron to get the result.

In the notebook, if I do app.predict(myimagearray, image_mpp=1.0), this yields the segmentation that is quite different. But if I do image_mpp = 1.3 the segmentation approaches the online one.

Is the online version applying some additional rescaling beyond the initial 1 micron setting that the noteboook version does not do?

In any case, happy holidays!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Maintenance
Projects
None yet
Development

No branches or pull requests

3 participants