A YOLOv4 reproduction by PaddlePaddle
数据集已挂载至aistudio项目中,如果需要本地训练可以从这里下载数据集,和标签文件
数据集目录大致如下,可根据实际情况修改
Data
|-- coco
| |-- annotions
| |-- images
| |-- train2017
| |-- val2017
| |-- test2017
| |-- labels
| |-- train2017
| |-- val2017
| |-- train2017.cache(初始解压可删除,训练时会自动生成)
| |-- val2017.cache(初始解压可删除,训练时会自动生成)
| |-- test-dev2017.txt
| |-- val2017.txt
| |-- train2017.txt
python train.py --batch-size 16 --img 416 416 --data coco.yaml --cfg cfg/yolov4-pacsp.cfg --weights '' --name yolov4-pacsp --notest
python train_multi_gpu.py --batch-size 32 --img 416 416 --data coco.yaml --cfg cfg/yolov4-pacsp.cfg --weights '' --name yolov4-pacsp --notest
多卡训练项目已提交至脚本任务YOLOv4
多卡训练日志可在此处下载,提取码:0cxk
python testdev.py --img 416 --conf 0.001 --batch 32 --data coco.yaml --cfg cfg/yolov4-mish-416.cfg --weights weights/yolov4-mish-416.weights
完成后会生成detections_test-dev2017_yolov4_results.json
文件,你需要将其压缩为detections_test-dev2017_yolov4_results.zip
并在COCO Detection Challenge网站提交
提交完成后等待验证结束,点击View scoring output log
即可下载stdout.txt并查看验证情况
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.413
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.622
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.453
Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.203
Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.450
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.565
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.328
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.527
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.564
Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.327
Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.620
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.754
Model | Frame | Test Size | APtest | AP50test | AP75test | APStest | APMtest | APLtest | cfg | weights |
---|---|---|---|---|---|---|---|---|---|---|
YOLOv4mish-416 | Paddle | 416 | 0.413 | 0.622 | 0.453 | 0.203 | 0.450 | 0.565 | cfg | weights/r2nw |
YOLOv4leaky-416 | Paddle | 416 | 0.405 | 0.616 | 0.443 | 0.195 | 0.441 | 0.552 | cfg | weights/wx7w |
YOLOv4 | Paddle | 416 | 0.409 | 0.614 | 0.447 | 0.188 | 0.449 | 0.572 | cfg | weights/lwdy |
YOLOv4mish-416 | Darknet | 416 | 0.415 | 0.633 | 0.447 | 0.219 | 0.444 | 0.553 | cfg | weights |
YOLOv4leaky-416 | Darknet | 416 | 0.407 | 0.627 | 0.439 | 0.214 | 0.437 | 0.540 | cfg | weights |
YOLOv4 | Darknet | 416 | 0.412 | - | - | - | - | - | cfg | weights |
验证所产生的json文件可在此处下载yolov4-mish-416/rmb5,yolov4-leaky-416/nkfo,darknet/lww5
python detect.py --cfg cfg/yolov4-pacsp-x.cfg --weights weights/yolov4-pacsp-x.weights
运行结果将会保存在inference/output文件夹下
姓名 | 郭权浩 |
---|---|
学校 | 电子科技大学研2020级 |
研究方向 | 计算机视觉 |
主页 | Deep Hao的主页 |
如有错误,请及时留言纠正,非常蟹蟹! | |
后续会有更多论文复现系列推出,欢迎大家有问题留言交流学习,共同进步成长! |