ZFTurbo / segmentation_models_3D

Set of models for segmentation of 3D volumes
MIT License
124 stars 26 forks source link

ImportError #1

Open Johnnytroll opened 3 years ago

Johnnytroll commented 3 years ago

Hi, I work in google colab, try to import segmentation_models_3D as sm, but I get an ImportError: cannot import name 'base' from 'segmentation_models_3D'. I installed keras >= 2.2.0, tensorflow >= 1.13.1, keras_applications >= 1.0.7, classification_models_3D, efficientnet_3D, segmentation_models_3D. What should I do to solve my problem?

ZFTurbo commented 3 years ago

Please try to install the following versions:

tensorflow==2.5.0 and keras==2.4.3

or if you need TF1 then:

tensorflow==1.15.0 and keras==2.3.1

I check it worked on them.

Also on TF2 please add the following line after import:

sm.set_framework('tf.keras')

Johnnytroll commented 3 years ago

Thanks, it works!