qubvel / classification_models

Classification models trained on ImageNet. Keras.
MIT License
1.22k stars 307 forks source link

Tensorflow 2.0 #47

Open ibrahim-sheriff opened 4 years ago

ibrahim-sheriff commented 4 years ago

Does this work with tensorflow 2.0 keras, because I am trying to use within tf2.0 but failed.

sourcecode369 commented 4 years ago

faced the same issue.

Saqhas commented 4 years ago

It seems to be resolved now. Try in colab or Kaggle Try with Tensorflow > 2.1.0

yurayli commented 4 years ago

remember to modify from classification_models.keras import Classifiers to from classification_models.tfkeras import Classifiers

Grinjero commented 4 years ago

Tried it on colab after installing it with pip. It seems it can find the module classification_models, but cant find classification_models.tfkeras

VirajBagal commented 4 years ago

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)

stvogel commented 3 years ago

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 :-)

georgeAustralia commented 1 year ago

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()