Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addded decode_predictions2() to utils.py #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dribnet
Copy link

@dribnet dribnet commented Jan 5, 2018

Added a version of decode_predictions specific to vggface2
that returns results in an identical format as the similarily
named function in keras.applications.imagenet_utils

Sample response:

[('n001138', 'Bong_Joon-ho', 0.98794019),
('n009064', 'Yang_Yuanqing', 0.0016884505),
('n007811', 'Satoru_Iwata', 0.0016516199),
('n000161', 'Akio_Toyoda', 0.00053648232),
('n007343', 'Richard_Stallman', 0.00044841404)]

Note: depends on vggface2_class_index.json file.

Added a version of decode_predictions specific to vggface2
that returns results in an identical format as the similarily
named function in keras.applications.imagenet_utils

Sample response:

[('n001138', 'Bong_Joon-ho', 0.98794019),
 ('n009064', 'Yang_Yuanqing', 0.0016884505),
 ('n007811', 'Satoru_Iwata', 0.0016516199),
 ('n000161', 'Akio_Toyoda', 0.00053648232),
 ('n007343', 'Richard_Stallman', 0.00044841404)]

Note: depends on vggface2_class_index.json file.
@dribnet
Copy link
Author

dribnet commented Jan 5, 2018

Here's the vggface2_class_index.json to support this new function. This file could eventually replace the need for rcmalli_vggface_labels_v2.npy (it contains the same label information but also includes class-ids) and is in the same format as the analogous imagenet_class_index.json which is part of the keras distribution. So the code mostly exactly matches that found inkeras.applications.imagenet_utils.decode_predictions and the returned data format also now matches for anyone familiar with that version.

vggface2_class_index.json.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant