tflite

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

      https://jefby.github.io/2018/08/20/%E5%B0%86mobilenet-ssd-tensorflow-pb%E8%BD%AC%E6%8D%A2%E4%B8%BAtflite%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/

3、将tflite模型量化

     官方例子: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/tutorials/post_training_quant.ipynb

 

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,速度慢成狗,弃坑

posted @ 2019-05-29 11:10  牧马人夏峥  阅读(1153)  评论(0编辑  收藏  举报