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

相关文章:

  • 2022-12-23
  • 2021-07-13
  • 2021-05-08
  • 2021-05-26
  • 2022-12-23
  • 2021-04-25
  • 2021-08-14
  • 2022-12-23
猜你喜欢
  • 2021-11-07
  • 2021-09-02
  • 2022-01-12
  • 2022-01-08
  • 2022-02-08
  • 2021-06-25
  • 2021-08-05
相关资源
相似解决方案