持之以恒

导航

yolov5 训练部署 - 爬坑记录

yolov5爬坑记

  1. training

    1. prepare images need to be trained and manual label training images
    2. prepare data for ./data/testImage.yaml
    3. python train.py --img 130 --batch 16 --epochs 60 --data ./data/testImage.yaml --weights yolov5s.pt
    4. 虚拟化 pytorch_yolov5> tensorboard --logdir runs\train
  2. detect
    python detect.py --source testImg --weights best.pt --img 130

  3. Export torch script model
    cd pytorch_yolov5; python export.py --weights .\best360.pt --data=data\testImage.yaml

  4. 部署yolov5
    git clone https://github.com/yasenh/libtorch-yolov5.git
    wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.9.0%2Bcpu.zip

注释detector.h找不到的头文件

include <c10/cuda/CUDAStream.h>

include <ATen/cuda/CUDAEvent.h>

reference link:
https://www.cnblogs.com/winslam/p/14614632.html

posted on 2021-09-29 22:46  beilei  阅读(164)  评论(0编辑  收藏  举报