Issue
I have tried to search everywhere, tried everything in tflite_interpreter = tf.lite.Interpreter(model_path='model.tflite')
, read tflite documentation but I cannot find the method to extract the class names from the model.
Is it possible?
Solution
When you create data for training, you encode the labels to numerical representations. After that the labels are lost, if you know the data with which the model was trained, then, you can know the label_names. Information of label_names is not stored in the model.
Answered By - Abhishek Verma Answer Checked By - David Goodson (WPSolving Volunteer)