Try   HackMD

YOLO-Fastest訓練到部屬樹莓派Pi4

tags: lab

更新日期:2022/6/42


訓練:

使用darknet cfg檔請參照
https://github.com/LiaoZihZrong/yolo-fastest/blob/main/yolo-fast.cfg

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →


轉模型

轉出我們的檔案

git clone https://github.com/LiaoZihZrong/weight-Yolo-fastest-model-h5

darknet to keras ([tf-14版]轉出h5檔)

python tools/model_converter/convert.py yolo-fast.cfg yolo-fast.weights yolo-fastest.h5

h5 to tflite ([tf2.3版]轉出tflite檔)

python tools/model_converter/custom_tflite_convert.py --keras_model_file yolo-fastest.h5 --output_file yolo-fastest.tflite

部屬到樹莓派

(raspberry pi 4)

pip install tensorflow-2.4.0-cp37-none-linux_armv7l.whl
pip install numpy --upgrade

即可使用!!!

成功影片:
https://youtu.be/UByt0sjbdnU