Closed Digital2Slave closed 1 year ago
The image of yolov5-P-R shows that something wrong during testing
The image of yolov5-P-R shows that something wrong during testing
Thanks.
I change yolov5 version from v5.0 to v6.1, and rerun val.py
.
$ python3 val.py --weights runs/train/pddf_yolov5l_v0.3.6/weights/best.pt --task test --data data/epbox_1zhanshou.yaml --img-size 640 --conf-thres 0.30 --iou-thres 0.45 --name pddf_yolov5l_v0.3.6
val: data=data/epbox_1zhanshou.yaml, weights=['runs/train/pddf_yolov5l_v0.3.6/weights/best.pt'], batch_size=32, imgsz=640, conf_thres=0.3, iou_thres=0.45, task=test, device=, workers=8, single_cls=False, augment=False, verbose=False, save_txt=False, save_hybrid=False, save_conf=False, save_json=False, project=runs/val, name=pddf_yolov5l_v0.3.6, exist_ok=False, half=False, dnn=False
WARNING: confidence threshold 0.3 >> 0.001 will produce invalid mAP values.
YOLOv5 🚀 2022-2-22 torch 1.7.1+cu110 CUDA:0 (NVIDIA GeForce RTX 3060, 12047MiB)
Fusing layers...
Model Summary: 400 layers, 47440052 parameters, 0 gradients
test: Scanning '/home/epbox/AI/dataset/pf/tradeInBox/v0.3.5_yolov7/labels/test' images and labels...1308 found, 0 missing, 340 empty, 0 corrupt: 100%|█████████████████| 1308/1308 [00:00<00:00, 23696.43it/s]
test: New cache created: /home/epbox/AI/dataset/pf/tradeInBox/v0.3.5_yolov7/labels/test.cache
Class Images Labels P R mAP@.5 mAP@.5:.95: 100%|██████████| 41/41 [00:20<00:00, 2.03it/s]
all 1308 6082 0.527 0.437 0.472 0.213
scratch 1308 306 0.406 0.346 0.335 0.146
crack 1308 2918 0.507 0.518 0.476 0.194
leakage 1308 400 0.661 0.596 0.659 0.349
membrane 1308 746 0.649 0.512 0.599 0.25
wiredscreen 1308 430 0.672 0.563 0.616 0.313
blurredscreen 1308 84 0.674 0.488 0.592 0.281
highlight 1308 170 0.556 0.629 0.638 0.272
crush 1308 100 0.419 0.25 0.364 0.142
agingred 1308 122 0.449 0.443 0.389 0.195
aginggreen 1308 626 0.534 0.46 0.449 0.219
agingdark 1308 12 0.6 0.25 0.375 0.188
aginglight 1308 20 0.318 0.35 0.259 0.118
clash 1308 16 0.5 0.0625 0.266 0.0531
dotleakage 1308 132 0.432 0.644 0.592 0.256
Speed: 0.1ms pre-process, 11.8ms inference, 2.0ms NMS per image at shape (32, 3, 640, 640)
Results saved to runs/val/pddf_yolov5l_v0.3.6
In your yolov5 testing results:
WARNING: confidence threshold 0.3 >> 0.001 will produce invalid mAP values.
From training, your could find:
yolov5: mAP@.5=0.354, mAP@.5:.9=0.138.
yolov7: mAP@.5=0.369, mAP@.5:.9=0.139.
By the way, metric code of yolov7 and yolov5 have a little bit different, you have to use same metric code for evaluation. For example, from your P-R curve, you could find that metric code of yolov5 force set max value of recall to one. So usually, metric code of yolov7 usually shows 1\~3% lower value than metric code of yolov5 when evaluating a same model.
Got it! Thanks a lot. @WongKinYiu
Why is yolov7's inference speed slower than yolov5l? @WongKinYiu
1. yolov5
2. yolov7
3. yolov5 vs yolov7 PR curve
3.1 yolov5
3.2 yolov7