We were using Google's FaceMesh model released by NXP after ptq in this repo:
nxp-demo-experience-demos-list/downloads.json at lf-6.12.3_1.0.0 · nxp-imx-support/nxp-demo-experien...
But this model is based on Google's old FaceMesh model, which had 468 landmark points.
Now we want to move to Google's new FaceMesh model, which has 478 landmark points. We want to run this on iMX 95 FRDM board NPU. So, we wanted to quantize this. We are using NXP's eIQ-neutron-sdk-linux-3.1.3 to quantize this model.
After this quantization, we are seeing significant degradation in model performance, almost unusable for actually using it.
Initially we were quantizing it with MIN-MAX option. That model was unusable. Then we tried using percentile option and found a better performance with percentile set to 95 (even though this was regressor outputs).
But this is still not giving great performance
1) When NXP created the ptq file for old FaceMesh(468) model which option did they use, MIN-MAX? Or percentile?
2) Is there anything else we need to check when the performance degrade drastically after quantization
3) we profiled with the CelebA dataset used the serialize_image.py in scripts dir with model options specific options, should we run the full media pipe and create the calibration dataset or make changes in serialize script
options supplied
serialize_image.py:
-i
-o
-f bin
-t float32
-m 0to1
-s 256, 256
-layout NHWC
-co RGB
tflite-profiler:
--input
--dataset
--output
tflite-quantizer:
--input
--profile
--quantize-inputs=false
--quantize-outputs=false
--quantization-calibration-method= //MinMax or Percentile