Skip to main content

☕ a simpler imagenet class synset and decoder utility. pluggable and 100% tf.keras compatible

Project description

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

a simpler, more human readable imagenet synset for keras.

comparison:

ID ImageNet Keras Simple (this repo)
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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for amerikana, version 1.1
Filename, size File type Python version Upload date Hashes
Filename, size amerikana-1.1.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page