1、编译libtensorflow-lite.a库:
ubuntu下交叉环境编译:
https://blog.csdn.net/computerme/article/details/80345065
https://blog.csdn.net/dia323/article/details/89388097
https://www.wandouip.com/t5i36754/
2、将pb模型转为tflite
tflite_convert --output_file MTCNN_mobile/pnet.tflite --graph_def_file frozen_graphs/pnet.pb --input_arrays "input" --input_shapes "1,600,800,3" --output_arrays cls_prob,bbox_pred,landmark_pred --output_format TFLITE
https://github.com/jiangxiluning/facenet_mtcnn_to_mobile/blob/master/mtcnn/to_tflite.sh
3、将tflite模型量化
github上的一些使用例子:
https://github.com/mattn/webcam-detect-tflite
https://github.com/mattn/tflite-sin
https://github.com/ninetailskim/tflite/tree/master/SSD_mobileNet
https://github.com/nxp-gf/MTCNN-tflite
https://github.com/jiangxiluning/facenet_mtcnn_to_mobile
在树莓派下测mtcnn,速度慢成狗,弃坑
手机扫一扫
移动阅读更方便
你可能感兴趣的文章