Quantize MobileFaceNet with TFLITE failed

跟風遠走 提交于 2021-01-05 12:50:20

问题


I am trying to find a solution to run face recognition on AI camera. And found that MobileFacenet (code from sirius-ai) is great as a light model!

I succeed to convert to TFLITE with F32 format with good accuracy. However when I failed when quantized to uint8 with the following command:

tflite_convert --output_file tf-lite/MobileFacenet_uint8_128.tflite 
--graph_def_file tf-lite/MobileFacenet.pb 
--input_arrays "input" 
--input_shapes "1,112,112,3" 
--output_arrays output 
--output_format TFLITE 
--mean_values 128 
--std_dev_values 127.5 
--default_ranges_min 0 
--default_ranges_max 255 
--inference_type QUANTIZED_UINT8 
--inference_input_type QUANTIZED_UINT8

This thread help to convert to TFLITE, but not talking about the quantization. Could anyone provide some suggestions? Many thanks!!

来源:https://stackoverflow.com/questions/62804754/quantize-mobilefacenet-with-tflite-failed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!