How can I keep the accuracy of my custom vision AI once exported as a TensorFlow lite model?

Adam Cameron 0 Reputation points
2025-03-04T21:30:44.7466667+00:00

Hello! I've created a custom vision project to analyze images of pottery sherds. I have three tags, with each tag associated with about 325 photos. I made an Android application on Android Studios that uses the exported TensorFlow lite model. When tested, the trained model works well on the custom vision website, but the accuracy is significantly worse on the Android app. I am using the same testing images. I used the metadata properties file provided when exporting to match my image preprocessing method as precisely as possible. I'm unsure which direction I should take my troubleshooting next. Should I try to remake the application to take a model.pb file and lose out on performance? Should I make a Python app that converts a model.pb file into a model.tflite file without Quantization? Any input would be greatly appreciated.

Azure AI Custom Vision
Azure AI Custom Vision
An Azure artificial intelligence service and end-to-end platform for applying computer vision to specific domains.
274 questions
{count} votes

Accepted answer
  1. Manas Mohanty 1,610 Reputation points Microsoft External Staff
    2025-03-05T09:28:48.4433333+00:00

    Hi Adam Cameron

    Ideally, we should quantize the model to optimize model weights to run on edge devices and retain accuracy close to original model

    Please check the documentation on Quantization aware training and post training quantization .

    Also, Adopt preprocessing techniques before inputting data.

    Hope it helps address your issue.

    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    Thank you

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.