Open dribnet opened 6 years ago
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.
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.