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 rain
  2. detect
    python detect.py --source testImg --weights best.pt --img 130

  3. Export torch script model
    cd pytorch_yolov5; python export.py --weights .est360.pt --data=data estImage.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

原文地址:https://www.cnblogs.com/beilei123/p/15345735.html