tensorflowraspberry-pitensorflow-lite

Is it possible to extract trained class names from tflite model?


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.