classification_models icon indicating copy to clipboard operation
classification_models copied to clipboard

Tensorflow 2.0

Open ibrahim-sheriff opened this issue 5 years ago • 7 comments

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

ibrahim-sheriff avatar Mar 27 '20 02:03 ibrahim-sheriff

faced the same issue.

sourcecode369 avatar Apr 12 '20 15:04 sourcecode369

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

Saqhas avatar May 01 '20 09:05 Saqhas

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

yurayli avatar May 06 '20 10:05 yurayli

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

Grinjero avatar Jun 27 '20 14:06 Grinjero

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)

VirajBagal avatar Aug 17 '20 09:08 VirajBagal

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

stvogel avatar Mar 20 '21 22:03 stvogel

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

georgeAustralia avatar Aug 22 '23 02:08 georgeAustralia