I know that keras provides a
.class_indicies dictionary containing the mapping from class names to class as part of
.flow_from_directory() from its
ImageDataGenerator class (https://keras.io/preprocessing/image/).
HOWEVER, is there a way to access the corresponding class labels from an existing saved model (a model saved in as an .h5 file)? This seems important when putting my model into production and serving predictions since the classes are not known upfront and therefore the images are not separated in pre-labeled directories.
Similarly, are there any good examples of how a keras model should be deployed into production (especially for mobile)? Thanks!