☕ 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
amerikana-1.1.tar.gz
(3.0 kB
view details)
File details
Details for the file amerikana-1.1.tar.gz
.
File metadata
- Download URL: amerikana-1.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20ddc9818943a83b1f57a7247a88bbe817894095c01f1d81bfff0df6e36ffbbf |
|
MD5 | 0f907a8725c5d7d3a024e48c4a1a72a1 |
|
BLAKE2b-256 | a89c6156d641f5b6c8071ca1c83ab3e46635c601a20ebb9220fd23c6b32cc031 |