Closed PCTsai closed 1 year ago
The argumentation of testing code for float32 model is:
--model saved_model_512x512/model_float32.tflite
, and for uint8 model is:
--quantize_mode --model saved_model_512x512/model_full_integer_quant.tflite
Since this is a very old model converted 2 years ago, there is a high possibility that the normalization parameters during quantization are incorrect.
https://github.com/PINTO0309/PINTO_model_zoo/blob/efe3e8da69e1ef14014430b1c88c790976ec10ef/179_person-detection-0202/convert_script.txt#L15-L28
I think we need to remove unnecessary Mul
from the beginning of the model.
You save my days! I've been looking for the problem for several days. Followed by your suggestion, I remove the layer Mul from the beginning of the model and converting again. Finally, the model works well! Thanks for your rapid and useful reply.
Hi Pinto, the accuracy of the model after uint8 quantization drops a lot. This person model is trained by Intel's internal dataset which can not be available for calibration. I have tried a collection of about 700 images to calibrate the model, but the false detection raises a lot. Is there any suggestion for this issue? Thanks.
Issue Type
Support
OS
Windows
OS architecture
x86_64
Programming Language
Python
Framework
TensorFlow
Model name and Weights/Checkpoints URL
https://github.com/PINTO0309/PINTO_model_zoo/tree/main/179_person-detection-0202
Description
Hi PINTO, I'm trying to run the person detection example with pre-built tflite models. I have tried the model version of float32
model_float32.tflite
and full integer quantization (uint8)model_full_integer_quant.tflite
with demo code and added some code snippets for uint8 model.The float32 model works well but not the uint8 model. The confidence result of the uint8 model always outputs a low score not exceed than 0.1, which is quite different from that of the fp32 model. Have you tried this quantized model before?
Relevant Log Output
No response
URL or source code for simple inference testing code