Open ibrahim-sheriff opened 4 years ago
faced the same issue.
It seems to be resolved now. Try in colab or Kaggle Try with Tensorflow > 2.1.0
remember to modify
from classification_models.keras import Classifiers
to
from classification_models.tfkeras import Classifiers
Tried it on colab after installing it with pip. It seems it can find the module classification_models, but cant find classification_models.tfkeras
I installed using pip install git+https://github.com/qubvel/classification_models.git
But I am getting this error when importing: cannot import name 'get_submodules_from_kwargs' from 'classification_models' (/opt/conda/lib/python3.7/site-packages/classification_models/__init__.py)
Hmm, this is still an issue. Got the same error with these versions:
Keras 2.4.3
Keras-Applications 1.0.8
Keras-Preprocessing 1.1.2
tensorflow 2.3.0
Tried also with Keras-Application==1.0.7 (as this was mentioned somewhere else), but still the same error.
Ahh. Finally got it running by installing the most recent:
pip install image-classifiers==1.0.0b1
even though it warns about segmentation-models 1.0.1 requires image-classifiers==1.0.0, but you have image-classifiers 1.0.0b1 which is incompatible.
but well ignoring this for now :-)
The following worked for me: ( I had to install keras-applications . Then all worked )
!pip install image-classifiers !pip install keras-applications from classification_models.tfkeras import Classifiers Classifiers.models_names()
Does this work with tensorflow 2.0 keras, because I am trying to use within tf2.0 but failed.