修改测试

This commit is contained in:
lee
2025-07-01 13:39:34 +08:00
parent 96a9445761
commit ed6a4144fa
8 changed files with 55 additions and 14 deletions

View File

@ -3,8 +3,9 @@ import numpy as np
# model = YOLOv10.from_pretrained('jameslahm/yolov10{n/s/m/b/l/x}')
# or
# wget https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10{n/s/m/b/l/x}.pt
model = YOLOv10('ckpts/20250514/best_gift_v10n.pt')
model = YOLOv10('ckpts/20250630/best_gift_v10n.pt')
result = model.predict('./data/bandage.jpg', save=False, imgsz=[224, 224], conf=0.1)
# result = model.predict('./data/bandage.jpg', save=True, imgsz=[224, 224], conf=0.1)
result = model.predict('/home/lc/data_center/gift/trace_subimgs/predict_actual_test/gift', save=True, imgsz=[224, 224], conf=0.1)
print(result)
print(result[0].boxes.conf)
# print(result[0].boxes.conf)