-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheval.py
More file actions
26 lines (23 loc) · 1.39 KB
/
eval.py
File metadata and controls
26 lines (23 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from ultralytics import YOLO
# Load a model
model = YOLO("yolo11s.yaml")
model = YOLO("yolo11s.pt") # load an official model
# Validate the model
metrics = model.val(data="coco.yaml",batch=16, onnxpath='./yolo11s_qat_slim.onnx') # no arguments needed, dataset and settings remembered
metrics.box.map # map50-95
metrics.box.map50 # map50
metrics.box.map75 # map75
metrics.box.maps # a list contains map50-95 of each category
# yolov11官方精度
# Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.466
# Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.635
# Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.503
# Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.292
# Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.511
# Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.638
# Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.362
# Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.598
# Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.651
# Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.472
# Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.709
# Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.813