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

SyntaxError in FatSegNet running on CPU Docker #12

Open
AlbCol opened this issue Nov 16, 2021 · 5 comments
Open

SyntaxError in FatSegNet running on CPU Docker #12

AlbCol opened this issue Nov 16, 2021 · 5 comments

Comments

@AlbCol
Copy link

AlbCol commented Nov 16, 2021

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
Copy link
Collaborator

Which operating system are you running the docker?

@AlbCol
Copy link
Author

AlbCol commented Nov 16, 2021

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
Copy link
Author

AlbCol commented Nov 22, 2021

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

Many thanks

@santiestrada32
Copy link
Collaborator

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
Copy link
Author

AlbCol commented Nov 25, 2021

I used the pytorch version and it works.

Thanks!

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

No branches or pull requests

2 participants