tensorflow / flutter-tflite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Model far less accurate when testing with example code

ViggoSeerden opened this issue · comments

I used the image_classification_mobilenet example as a basis for the object detection in my flutter app, with my own custom model trained using Teachable Machine with Google. After training, you have the option to upload images to test the accuracy of your new model before downloading it and its labels.

When testing the accuracy directly after training, my model seems to be pretty accurate, and for this image specifically returns the correct result:

Screenshot 2024-03-25 004011

However, when in the app, it gives me entirely different results:

Screenshot_2024-03-27-09-31-07-74_b76ff0e94eeb43d5b3b13feca02fd56a

Even using a much clearer image, the result is entirely inaccurate:

Screenshot_2024-03-27-09-31-14-23_b76ff0e94eeb43d5b3b13feca02fd56a

The example I used has only been slightly altered, since I changed a List and an int to a List and double respectively, at lines 80 and 87 in the isolate_inference.dart file.

Does anyone know why this issue occurs? Is my model the issue or is something going wrong in the example? Thanks in advance