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

AttributeError: module 'deepcell.utils' has no attribute 'get_image' #12

Closed
ArtemSokolov opened this issue Jul 26, 2021 · 3 comments · Fixed by #14
Closed

AttributeError: module 'deepcell.utils' has no attribute 'get_image' #12

ArtemSokolov opened this issue Jul 26, 2021 · 3 comments · Fixed by #14
Labels
bug Something isn't working

Comments

@ArtemSokolov
Copy link

I am getting the following error when attempting to run the Docker container:

Traceback (most recent call last):
  File "main.py", line 156, in <module>
    compartment=ARGS.compartment
  File "main.py", line 77, in run
    nuclear_img = deepcell.utils.get_image(nuclear_path)
AttributeError: module 'deepcell.utils' has no attribute 'get_image'

Command executed:

docker run --rm -v "$PWD":/data vanvalenlab/deepcell-applications --nuclear-image /data/exemplar-001.ome.tif --output-directory /data

where exemplar-001.ome.tif is a stitched and registered image from MCMICRO's minimal working dataset. Assuming nextflow and Docker are installed, the .ome.tif can be reproduced with:

nextflow run labsyspharm/mcmicro/exemplar.nf --name exemplar-001 --path .
nextflow run labsyspharm/mcmicro --in ./exemplar-001 --stop-at registration
ls ./exemplar-001/registration/exemplar-001.ome.tif
@willgraf
Copy link
Contributor

willgraf commented Aug 2, 2021

Can you please confirm which version of deepcell you are using?

Also, the Docker image tag you are using (if using a pre-built image).

willgraf added a commit that referenced this issue Aug 2, 2021
@ArtemSokolov
Copy link
Author

Hi @willgraf,

The container image was built directly from the GitHub repo (commit 4f71fb2) by running

docker build -t vanvalenlab/deepcell-applications .

as suggested in the README.

@willgraf
Copy link
Contributor

willgraf commented Aug 2, 2021

Thank you! It looks like this is an issue with breaking changes between deepcell 0.6.x and 0.8.x.

A fix is in-progress, but in the meantime, the get_image function can be imported from deepcell.utils.io_utils as a patch.

willgraf added a commit that referenced this issue Aug 12, 2021
* Update `.gitignore` and `.dockerignore` and add several other repository config files

* Update default deepcell version to 0.9.2.

* Rename `main.py` to `run_app.py`

* Refactor `MultiplexSegmentation` to `Mesmer`

* Import `get_image` from `deepcell.utils.io_utils` (Fixes #12)

* Add GitHub Actions workflows from `vanvalenlab/deepcell-tf`

* Replace `skimage` with `tifffile`

* New `deepcell_applications` for application-generalized functions

* Refactor mpp to image_mpp to match mesmer signature.

* Pin the `deepcell` version to prevent breaking changes.

* Update README with new parameters

* Refactor `get_arg_parser` for application-based subparsers.

* Add badges to README

* Add batch_size as a possible inference value.

Co-authored-by: Noah F. Greenwald <noahfgreenwald@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants