Deep-MI / FatSegNet

Deep CNN for Abdominal Adipose Tissue Segmentation on Dixon MRI
Apache License 2.0
22 stars 12 forks source link

SyntaxError in FatSegNet running on CPU Docker #12

Open AlbCol opened 2 years ago

AlbCol commented 2 years ago

Dear FatSegNet developers,

When trying to run FatSegNet using CPU docker image with below command.

docker run -it --rm --name fatsegnet -u $(id -u) -v //c/Users/PWS1/Desktop/dataset/:/tool/Data -v //c/Users/PWS1/Desktop/output/:/tool/Output adipose_tool:cpu_v1

I am facing this issue:

/usr/local/lib/python3.5/dist-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters Traceback (most recent call last): File "./run_FatSegNet.py", line 8, in from Code.adipose_pipeline import run_adipose_pipeline File "/tool/Code/adipose_pipeline.py", line 27, in from Code.utilities.metrics import calculate_statistics_v2 File "/tool/Code/utilities/metrics.py", line 17, in from skimage.measure import perimeter File "/usr/local/lib/python3.5/dist-packages/skimage/init.py", line 135, in from .data import data_dir File "/usr/local/lib/python3.5/dist-packages/skimage/data/init.py", line 13, in from ..io import imread, use_plugin File "/usr/local/lib/python3.5/dist-packages/skimage/io/init.py", line 15, in reset_plugins() File "/usr/local/lib/python3.5/dist-packages/skimage/io/manage_plugins.py", line 91, in reset_plugins _load_preferred_plugins() File "/usr/local/lib/python3.5/dist-packages/skimage/io/manage_plugins.py", line 71, in _load_preferred_plugins _set_plugin(p_type, preferred_plugins['all']) File "/usr/local/lib/python3.5/dist-packages/skimage/io/manage_plugins.py", line 83, in _set_plugin use_plugin(plugin, kind=plugin_type) File "/usr/local/lib/python3.5/dist-packages/skimage/io/manage_plugins.py", line 254, in use_plugin _load(name) File "/usr/local/lib/python3.5/dist-packages/skimage/io/manage_plugins.py", line 298, in _load fromlist=[modname]) File "/usr/local/lib/python3.5/dist-packages/skimage/io/_plugins/imageio_plugin.py", line 3, in from imageio import imread, imsave File "/usr/local/lib/python3.5/dist-packages/imageio/init.py", line 21, in from . import config File "/usr/local/lib/python3.5/dist-packages/imageio/config/init.py", line 1, in from .extensions import known_extensions File "/usr/local/lib/python3.5/dist-packages/imageio/config/extensions.py", line 828 _extension_dict: Dict[str, List[FileExtension]] = dict() ^ SyntaxError: invalid syntax

Any leads would be truly appreciated! Thanks!

santiestrada32 commented 2 years ago

Which operating system are you running the docker?

AlbCol commented 2 years ago

I'm using WSL2 on a Windows10 PC. I tried Ubuntu 16.04, 18.04 and 20.04 and the message is always the same.

AlbCol commented 2 years ago

Dear @santiestrada32, Do you have any suggestions as to why this error occurred?

Many thanks

santiestrada32 commented 2 years ago

There is an error in the skiimage library you can try to set up a newer version of the library in docker image creation. We are moving our all code to pytorch you can try our pytorch version https://github.com/reuter-lab/FatSegNet_pytorch.

AlbCol commented 2 years ago

I used the pytorch version and it works.

Thanks!