Android-TensorFlow-Lite-Example icon indicating copy to clipboard operation
Android-TensorFlow-Lite-Example copied to clipboard

Replaced the model and the label but it Crashes!

Open bathanfritz opened this issue 6 years ago • 2 comments

OS: Ubuntu 16.0.4 64bit Python version: 3.6.5 on virtual env Tensorflow version: 1.11.0

I retrained a model with model architecture (mobilenet_v1_224) . cant freeze it because it says it is already frozen after retraining. then I convert it using toco. I import it to assets folder ,the graph.tflite and labels.txt, edit the model and label variables in MainActivity, but when I launched it in my device and hit "Detect Object" button, it crashes.Am I missing something? How can I fix this. Please help me, Thank you very much!!

bathanfritz avatar Oct 05 '18 07:10 bathanfritz

Okay, now, I noticed that my model is not quantized, I try to quantized the model for now

EDIT: I quantized my retrained graph but cant convert it to tflite with QUANTIZED_UINT8

bathanfritz avatar Oct 05 '18 13:10 bathanfritz

My recent PR has added support for float models. Simply change the variable QUANT to false in TensorFlowImageClassifier.java along with changing the model and lebels name.

soum-io avatar Feb 05 '19 15:02 soum-io