Football Players Detection using YOLOV11 | Kaggle
!pip install comet_ml
import comet_mlcomet_ml.login(project_name="c")
?Comet - Build Better Models Faster
?yolov11訓練
100輪一眨眼訓練完了
然而comet接不到yolo的sdk
優秀
?訓練17輪map就0.99了
?
v5訓練100輪才0.6
有了,就是訓練輪次不夠
效果和11比差遠了
?map在50輪后才穩定上升
有邊框信息了
本地detect讀取邊界框信息
w torch==2.5.1 torchvision --index-url https://download.pytorch.org/whl/cu124
w ultralytics
windows下torch能要我命 睡個午覺先
from ultralytics import YOLO
import numpy as np
# 加載模型
model = YOLO('./best.pt')# 執行預測并獲取結果
results = model.predict(source='./valid/images/screenshot-20250504103355_png.rf.71febf531b60b1e416aece6136e28388.jpg')# 遍歷結果
for result in results:boxes = result.boxes # 獲取所有檢測到的邊框for box in boxes:print("BoundingBox: ", box.xyxy) # 輸出邊框坐標(x1, y1, x2, y2)print("Confidence: ", box.conf) # 置信度分數print("Class: ", box.cls) # 類別IDprint("物體是: ",model.names[int(box.cls.item()) ],"范圍為: ",box.xyxy.cpu().numpy())