Skip to content

☕tf.keras prediction decoder for simpler imagenet synset.

License

Notifications You must be signed in to change notification settings

gWOLF3/amerikana

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

☕ amerikana: tf.keras prediction decoder for imagenet-simple-labels

PyPI version

a simpler, more human readable imagenet synset for keras.

comparison:

ID ImageNet Keras Simple
87 African grey, African gray, Psittacus erithacus African_grey grey parrot
97 drake drake duck
913 wreck wreck shipwreck
930 French loaf French_loaf baguette

quickstart:

should be used as a drop in replacement for tf.keras.applications.imagenet_utils.decode_predictions

install with pip:

pip install amerikana

import:

from amerikana import decode_predictions

instead of:

from tensorflow.keras.applications.imagenet_utils import decode_predictions

example use:

predictions = model.predict(processed_image)
labels = decode_predictions(predictions)
print(labels)

credit:

  • simplified labels list: imagenet-simple-labels. see information and comparison for simplified labels there.

  • the module code used in this project is a derivative of tf.keras imagenet_utils.

enjoy!

About

☕tf.keras prediction decoder for simpler imagenet synset.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages