🔄Update: [Lab-4] yolov8n Val
This commit is contained in:
@@ -0,0 +1,14 @@
|
|||||||
|
from ultralytics import YOLO
|
||||||
|
|
||||||
|
# 加载训练得到的最佳模型
|
||||||
|
best_model = YOLO('runs/detect/yolov8n_coco128_exp1/weights/best.pt')
|
||||||
|
# 在验证集上评估模型
|
||||||
|
metrics = best_model.val()
|
||||||
|
# 程序会自动打印出mAP、 Precision、 Recall等关键指标
|
||||||
|
|
||||||
|
# 加载训练得到的最佳模型
|
||||||
|
best_model = YOLO('runs/detect/yolov8n_coco128_exp1/weights/best.pt')
|
||||||
|
|
||||||
|
# 在验证集上评估模型
|
||||||
|
metrics = best_model.val()
|
||||||
|
# 程序会自动打印出mAP、 Precision、 Recall等关键指标。
|
||||||
Reference in New Issue
Block a user