1.检测模型训练
- 更新yaml文件
- 下载预训练模型,放到 traing.py文件所在文件夹https://github.com/ultralytics/yolov5/releases/download/v6.1/yolov5s.pt
https://github.com/ultralytics/yolov5/releases/download/v6.1/yolov5s.pt
- 模型训练
新建训练环境:
conda create -n yolov5_train
激活环境:
conda activate rknntk_yolov5_train
安装安装包:
pip install -r requriments.txt
运行 train.py
python train.py --epochs 60 --img 1280 --data dataset/dataset.yaml --weights ./yolov5s.pt --batch-size 24
- 模型测试
python detect.py --weights ./runs/train/exp/weights/last.pt --imgsz 1280 --source ~/Videos/car.mp4
- pt转onnx
python3 export.py --weights runs/train/exp/weights/best.pt --img 1280 --batch 1 --opset 12
2.模拟测试
GitHub - rockchip-linux/rknpuhttps://github.com/rockchip-linux/rknpu
新建训练环境:
conda create -n rknn_toolkit
激活环境: