cocoa-xu / tflite_elixir

TensorFlow Lite Elixir bindings with optional EdgeTPU support.
Apache License 2.0
20 stars 3 forks source link

ImageClassification.set_label_from_associated_file not working #15

Closed mnishiguchi closed 1 year ago

mnishiguchi commented 1 year ago

When writing a notebook based on the example code in README, I noticed that ImageClassification.set_label_from_associated_file/2 is not working as expected. Class name won't get added to the inference results.

cocoa-xu commented 1 year ago

Hi @mnishiguchi, this function only loads the label file embedded in the model (associated files).

We can use TFLiteElixir.ImageClassification.set_label/2 to set labels.

TFLiteElixir.ImageClassification.set_label/2 currently expects a list of string as the labels.

Perhaps we can extend its ability to load a text file directly in the future.

mnishiguchi commented 1 year ago

@cocoa-xu Thanks! It totally makes sense. I will add some info in the image classification example.