ã¢ãã«ã®è©äŸ¡ãšåŸ®èª¿æŽã«é¢ããæŽå¯
ã¯ããã«
ã³ã³ãã¥ãŒã¿ã»ããžã§ã³ã»ã¢ãã«ããã¬ãŒãã³ã°ãããããããè©äŸ¡ããæé©ã«åäœããããã«æ¹è¯ããããšãäžå¯æ¬ ã§ããã¢ãã«ããã¬ãŒãã³ã°ããã ãã§ã¯ååã§ã¯ãããŸãããã¢ãã«ãæ£ç¢ºã§ãå¹ççã§ãã³ã³ãã¥ãŒã¿ããžã§ã³ãããžã§ã¯ãã®ç®çãéæããŠããããšã確èªããå¿ èŠããããŸããã¢ãã«ãè©äŸ¡ãã埮調æŽããããšã§ã匱ç¹ãç¹å®ãã粟床ãåäžãããå šäœçãªããã©ãŒãã³ã¹ãé«ããããšãã§ããŸãã
èŠããã ïŒ ã¢ãã«è©äŸ¡ãšãã¡ã€ã³ãã¥ãŒãã³ã°ãžã®æŽå¯ïœå¹³åå¹³å粟床åäžã®ãã³ã
ãã®ã¬ã€ãã§ã¯ãã³ã³ãã¥ãŒã¿ããžã§ã³ãããžã§ã¯ãã®ãã®ã¹ããããããã¢ãããŒããããããããã¢ãã«ã®è©äŸ¡ãšåŸ®èª¿æŽã«é¢ããæŽå¯ãå ±æããŸããè©äŸ¡ææšãç解ãã埮調æŽãã¯ããã¯ãå®è£ ããæ¹æ³ã«ã€ããŠèª¬æããã¢ãã«ã®èœåãåäžãããããã®ç¥èãæäŸããŸãã
ã¡ããªã¯ã¹ãçšããã¢ãã«æ§èœã®è©äŸ¡
ã¢ãã«ã®æ§èœãè©äŸ¡ããããšã¯ããã®ã¢ãã«ãã©ãã ãå¹æçã«æ©èœããããç解ããã®ã«åœ¹ç«ã€ãããã©ãŒãã³ã¹ã枬å®ããããã«ãããŸããŸãªæž¬å®åºæºãçšããããŸãããããã®ããã©ãŒãã³ã¹æž¬å®åºæºã¯ãæ確ãªæ°å€çæŽå¯ãæäŸããã¢ãã«ãæå³ããç®æšã確å®ã«éæããããã®æ¹åã®æéãšãªããŸããããã€ãã®äž»èŠãªæž¬å®åºæºã詳ããèŠãŠã¿ãŸãããã
ã³ã³ãã£ãã³ã¹ã»ã¹ã³ã¢
確信床ã¹ã³ã¢ã¯ãæ€åºãããç©äœãç¹å®ã®ã¯ã©ã¹ã«å±ãããšããã¢ãã«ã®ç¢ºä¿¡åºŠãè¡šããã¹ã³ã¢ã®ç¯å²ã¯0ãã1ã§ãã¹ã³ã¢ãé«ãã»ã©ä¿¡é ŒåºŠãé«ãããšã瀺ããä¿¡é Œã¹ã³ã¢ã¯äºæž¬ã®ãã£ã«ã¿ãªã³ã°ã«åœ¹ç«ã¡ãæå®ããããããå€ä»¥äžã®ä¿¡é Œã¹ã³ã¢ãæã€æ€åºã®ã¿ãæå¹ãšã¿ãªãããŸãã
Quick Tip: When running inferences, if you aren't seeing any predictions, and you've checked everything else, try lowering the confidence score. Sometimes, the threshold is too high, causing the model to ignore valid predictions. Lowering the score allows the model to consider more possibilities. This might not meet your project goals, but it's a good way to see what the model can do and decide how to fine-tune it.
ãŠããªã³äº€å·®ç¹
Intersection over Union(IoU)ã¯ãäºæž¬ãããããŠã³ãã£ã³ã°ããã¯ã¹ãã°ã©ã³ããã¥ã«ãŒã¹ã®ããŠã³ãã£ã³ã°ããã¯ã¹ãšã©ã®çšåºŠéãªã£ãŠãããã枬å®ããããªããžã§ã¯ãæ€åºã«ãããã¡ããªãã¯ã§ãããIoUå€ã¯0ãã1ã®ç¯å²ã§ã1ã¯å®å šäžèŽãæå³ããŸããIoUã¯ãäºæž¬ãããå¢çãå®éã®ãªããžã§ã¯ãã®å¢çã«ã©ãã ãè¿ããã枬å®ãããããäžå¯æ¬ ã§ãã
å¹³åå¹³å粟床
å¹³åå¹³å粟床ïŒmean Average PrecisionïŒmAPïŒã¯ããªããžã§ã¯ãæ€åºã¢ãã«ãã©ã®çšåºŠåªããŠãããã枬å®ããæ¹æ³ã§ããããã¯ãåãªããžã§ã¯ãã¯ã©ã¹ã®æ€åºç²ŸåºŠã調ã¹ããããã®ã¹ã³ã¢ãå¹³åããã¢ãã«ãã©ãã ãæ£ç¢ºã«ãªããžã§ã¯ããèå¥ã»åé¡ã§ãããã瀺ãç·åçãªæ°å€ãäžããã
2ã€ã®å ·äœçãªmAPææšã«æ³šç®ããŠã¿ããïŒ
- mAP@.5:IoU (Intersection over Union)ãããå€0.5ã§ã®å¹³å粟床ã枬å®ããã®ææšã¯ãã¢ãã«ãããç·©ã粟床èŠä»¶ã§ãªããžã§ã¯ããæ£ããèŠã€ããããšãã§ãããã©ããããã§ãã¯ãããå®ç§ãªé 眮ãå¿ èŠãšããããªããžã§ã¯ããããããæ£ããäœçœ®ã«ãããã©ããã«çŠç¹ãåœãŠãŸããããã¯ãã¢ãã«ãäžè¬çã«ãªããžã§ã¯ããèŠã€ããã®ãåŸæãã©ããã確èªããã®ã«åœ¹ç«ã¡ãŸãã
- mAP@.5:.95ïŒ0.05å»ã¿ã§0.5ãã0.95ãŸã§ã®è€æ°ã®IoUãããå€ã§èšç®ãããmAPå€ãå¹³åããããã®ææšã¯ãã詳现ã§å³å¯ã§ãããã®ææšã¯ãç°ãªãå³å¯ãã®ã¬ãã«ã«ãããŠãã¢ãã«ãã©ã®çšåºŠæ£ç¢ºã«ç©äœãèŠã€ããããšãã§ãããã®å šäœåã瀺ããæ£ç¢ºãªç©äœæ€åºãå¿ èŠãšããã¢ããªã±ãŒã·ã§ã³ã«ç¹ã«æçšã§ãã
ãã®ä»ã®mAPã¡ããªã¯ã¹ã«ã¯ã0.75ãšããããå³ããIoUãããå€ã䜿çšããmAP@0.75ãç°ãªããµã€ãºã®ãªããžã§ã¯ãã«ããã£ãŠç²ŸåºŠãè©äŸ¡ããmAP@smallãmediumãlargeãããã
YOLO11 ã¢ãã«ã®æ§èœè©äŸ¡
YOLO11 ã«ã€ããŠã¯ãæ€èšŒã¢ãŒãã䜿çšããŠã¢ãã«ãè©äŸ¡ããããšãã§ããŸãããŸããYOLO11 ããã©ãŒãã³ã¹ã»ã¡ããªã¯ã¹ãšãã®è§£éæ¹æ³ã«ã€ããŠè©³ãã解説ããã¬ã€ãããã²ã芧ãã ããã
ã³ãã¥ããã£ã§ãããã質å
YOLO11 ã¢ãã«ãè©äŸ¡ããéãããã€ãã®åé¡ã«ã¶ã€ãããããããŸãããã³ãã¥ããã£ã§ãããã質åã«åºã¥ããYOLO11 ã¢ãã«ãæ倧éã«æŽ»çšããããã®ãã³ããããã€ãã玹ä»ããŸãïŒ
å¯å€ç»åãµã€ãºã®åŠç
ããŸããŸãªãµã€ãºã®ç»åã§YOLO11 ã¢ãã«ãè©äŸ¡ããããšã§ãå€æ§ãªããŒã¿ã»ããã«å¯Ÿããæ§èœãç解ããããšãã§ããŸããã¢ãã«ã rect=true
æ€èšŒãã©ã¡ãŒã¿ãYOLO11 ã¯ãç»åãµã€ãºã«åºã¥ããŠåãããã®ãããã¯ãŒã¯ã®ã¹ãã©ã€ãã調æŽããã¢ãã«ãåäžã®ãµã€ãºã«åŒ·å¶ããããšãªããé·æ¹åœ¢ã®ç»åãåŠçã§ããããã«ããŸãã
ã«ã€ã㊠imgsz
ããªããŒã·ã§ã³ãã©ã¡ãŒã¿ã¯ãç»åãªãµã€ãºã®æ倧寞æ³ãèšå®ããŸããããŒã¿ã»ããã®æ倧寞æ³ãšãGPU ã®å©çšå¯èœãªã¡ã¢ãªã«åºã¥ããŠèª¿æŽã§ããŸãããã ã imgsz
ã»ããã rect=true
ã¯ãã¹ãã©ã€ããåçã«èª¿æŽããããšã§ãããŸããŸãªç»åãµã€ãºãå¹æçã«ç®¡çããããšãã§ããŸãã
YOLO11 ã¡ããªã¯ã¹ãžã®ã¢ã¯ã»ã¹
YOLO11 ã¢ãã«ã®ããã©ãŒãã³ã¹ãããæ·±ãç解ãããå ŽåãPython ã®ã³ãŒããæ°è¡æžãã ãã§ãç¹å®ã®è©äŸ¡ã¡ããªã¯ã¹ã«ç°¡åã«ã¢ã¯ã»ã¹ããããšãã§ããŸãã以äžã®ã³ãŒãã»ã¹ããããã¯ãã¢ãã«ãããŒãããè©äŸ¡ãå®è¡ããã¢ãã«ã®æ§èœã瀺ãæ§ã ãªã¡ããªã¯ã¹ãåºåããŸãã
䜿çšæ¹æ³
from ultralytics import YOLO
# Load the model
model = YOLO("yolo11n.pt")
# Run the evaluation
results = model.val(data="coco8.yaml")
# Print specific metrics
print("Class indices with average precision:", results.ap_class_index)
print("Average precision for all classes:", results.box.all_ap)
print("Average precision:", results.box.ap)
print("Average precision at IoU=0.50:", results.box.ap50)
print("Class indices for average precision:", results.box.ap_class_index)
print("Class-specific results:", results.box.class_result)
print("F1 score:", results.box.f1)
print("F1 score curve:", results.box.f1_curve)
print("Overall fitness score:", results.box.fitness)
print("Mean average precision:", results.box.map)
print("Mean average precision at IoU=0.50:", results.box.map50)
print("Mean average precision at IoU=0.75:", results.box.map75)
print("Mean average precision for different IoU thresholds:", results.box.maps)
print("Mean results for different metrics:", results.box.mean_results)
print("Mean precision:", results.box.mp)
print("Mean recall:", results.box.mr)
print("Precision:", results.box.p)
print("Precision curve:", results.box.p_curve)
print("Precision values:", results.box.prec_values)
print("Specific precision metrics:", results.box.px)
print("Recall:", results.box.r)
print("Recall curve:", results.box.r_curve)
çµæãªããžã§ã¯ãã«ã¯ãååŠçæéãæšè«æéãæ倱ãåŸåŠçæéãªã©ã®é床ã¡ããªã¯ã¹ãå«ãŸããŸãããããã®ã¡ããªã¯ã¹ãåæããããšã§ãYOLO11 ã¢ãã«ã®ããã©ãŒãã³ã¹ãåäžãããããã®åŸ®èª¿æŽãæé©åãå¯èœã«ãªããç¹å®ã®ãŠãŒã¹ã±ãŒã¹ã«å¯ŸããŠããå¹æçã«ãªããŸãã
埮調æŽã®ä»çµã¿
ãã¡ã€ã³ãã¥ãŒãã³ã°ãšã¯ãäºåã«èšç·Žãããã¢ãã«ããç¹å®ã®ã¿ã¹ã¯ãããŒã¿ã»ããã§ã®ããã©ãŒãã³ã¹ãåäžãããããã«ããã®ãã©ã¡ãŒã¿ã調æŽããããšã§ãããã¢ãã«ã®åãã¬ãŒãã³ã°ãšããŠãç¥ããããã®ããã»ã¹ã«ãããã¢ãã«ã¯å®äžçã®ã¢ããªã±ãŒã·ã§ã³ã§ééããç¹å®ã®ããŒã¿ãããããç解ããçµæãäºæž¬ã§ããããã«ãªããŸããæé©ãªçµæãåŸãããã«ãã¢ãã«è©äŸ¡ã«åºã¥ããŠã¢ãã«ãåãã¬ãŒãã³ã°ããããšãã§ããŸãã
ã¢ãã«ã埮調æŽããããã®ãã³ã
ã¢ãã«ã®åŸ®èª¿æŽãšã¯ãæé©ãªããã©ãŒãã³ã¹ãéæããããã«ãããã€ãã®éèŠãªãã©ã¡ãŒã¿ãšãã¯ããã¯ã«çŽ°å¿ã®æ³šæãæãããšãæå³ããŸããããã§ã¯ããã®ããã»ã¹ãéããŠããªããå°ãããã«äžå¯æ¬ ãªãã³ããããã€ãã玹ä»ããŸãã
é«ãåŠç¿çããå§ãã
éåžžãæåã®åŠç¿ãšããã¯ã§ã¯åŠç¿çãäœãèšå®ããåŠç¿ããã»ã¹ãå®å®ãããããã«åŸã ã«äžããŠãããããããã¢ãã«ã¯ãã§ã«ä»¥åã®ããŒã¿ã»ããããããã€ãã®ç¹åŸŽãåŠç¿ããŠãããããããã«é«ãåŠç¿çã§éå§ããæ¹ãæçã§ããã
YOLO11 ã¢ãã«ãè©äŸ¡ããéã以äžã®ããã«èšå®ã§ããŸãã warmup_epochs
ããªããŒã·ã§ã³ã»ãã©ã¡ãŒã¿ã warmup_epochs=0
åŠç¿çãé«ããªããããªãããã«ããããã§ããããã®ããã»ã¹ã«åŸãããšã§ãæ°ããããŒã¿ã®ãã¥ã¢ã³ã¹ã«èª¿æŽããªãããäžããããéã¿ããåŠç¿ãç¶ããããã
å°ããªãªããžã§ã¯ãã®ã€ã¡ãŒãžã»ã¿ã€ãªã³ã°
ç»åã®ã¿ã€ãªã³ã°ã«ãããå°ããªç©äœã®æ€åºç²ŸåºŠãåäžãããããšãã§ããã1280x1280ã®ç»åãè€æ°ã®640x640ã®ã»ã°ã¡ã³ãã«åå²ãããªã©ã倧ããªç»åãå°ããªã»ã°ã¡ã³ãã«åå²ããããšã§ãå ã®è§£å床ãç¶æããã¢ãã«ã¯é«è§£å床ã®æçããåŠç¿ããããšãã§ããŸããYOLO11 ã䜿çšããå Žåã¯ããããã®æ°ããã»ã°ã¡ã³ãã®ã©ãã«ãæ£ãã調æŽããŠãã ããã
å°å瀟äŒãšã®é¢ãã
ä»ã®ã³ã³ãã¥ãŒã¿ã»ããžã§ã³æ奜家ãšã¢ã€ãã¢ã質åãå ±æããããšã§ããããžã§ã¯ãã®é害ã«å¯Ÿããåµé çãªè§£æ±ºçãã²ãããããšããããŸããããã§ã¯ãåŠã³ããã©ãã«ã·ã¥ãŒãã£ã³ã°ããã€ãªããããã®åªããæ¹æ³ãããã€ã玹ä»ããŸãã
ãã«ããšãµããŒããæ¢ã
- GitHub IssuesïŒ YOLO11 GitHub ãªããžããªãæ¢çŽ¢ããIssues ã¿ãã§è³ªåããã°å ±åãæ©èœææ¡ãè¡ã£ãŠãã ãããã³ãã¥ããã£ãšã¡ã³ãããŒã¯ãããªããééããåé¡ããµããŒãããŸãã
- Ultralytics DiscordãµãŒããŒïŒ Ultralytics Discord ãµãŒããŒã«åå ããŠãä»ã®ãŠãŒã¶ãŒãéçºè ãšã€ãªããããµããŒããåããç¥èãå ±æããã¢ã€ãã¢ãåºãåããŸãããã
å ¬åŒææž
- Ultralytics YOLO11 ããã¥ã¡ã³ãæ§ã ãªã³ã³ãã¥ãŒã¿ããžã§ã³ã¿ã¹ã¯ããããžã§ã¯ãã«é¢ããå æ¬çãªã¬ã€ãã貎éãªæŽå¯ã«ã€ããŠã¯ã YOLO11 ã®å ¬åŒããã¥ã¡ã³ããã芧ãã ããã
æçµçãªææ³
ã³ã³ãã¥ãŒã¿ããžã§ã³ã¢ãã«ã®è©äŸ¡ãšåŸ®èª¿æŽã¯ãã¢ãã«ã®å±éãæåãããããã®éèŠãªã¹ãããã§ãããããã®ã¹ãããã¯ãã¢ãã«ãæ£ç¢ºã§ãå¹ççã§ãã¢ããªã±ãŒã·ã§ã³å šäœã«é©ããŠããããšã確èªããã®ã«åœ¹ç«ã¡ãŸããå¯èœãªéãæé«ã®ã¢ãã«ããã¬ãŒãã³ã°ããéµã¯ãç¶ç¶çãªå®éšãšåŠç¿ã§ãããã©ã¡ãŒã¿ã埮調æŽããæ°ãããã¯ããã¯ãè©Šããç°ãªãããŒã¿ã»ãããæ¢çŽ¢ããããšããããããªãã§ãã ãããå®éšãç¶ããå¯èœæ§ã®éçãæŒãåºããŸãããïŒ
ããããã質å
YOLO11 ã¢ãã«ã®ããã©ãŒãã³ã¹ãè©äŸ¡ããããã®äž»ãªææšã¯ïŒ
YOLO11 ã¢ãã«ã®æ§èœãè©äŸ¡ããããã«ãéèŠãªã¡ããªã¯ã¹ã«ã¯ä¿¡é Œã¹ã³ã¢ãIntersection over Union (IoU)ãå¹³åå¹³å粟床 (mAP) ãå«ãŸãããConfidence Scoreã¯ãæ€åºãããåãªããžã§ã¯ãã¯ã©ã¹ã«å¯Ÿããã¢ãã«ã®ç¢ºå®æ§ã枬å®ããŸããIoUã¯ãäºæž¬ãããããŠã³ãã£ã³ã°ããã¯ã¹ãã©ãã ãã°ã©ãŠã³ããã¥ã«ãŒã¹ãšéãªã£ãŠããããè©äŸ¡ããŸããå¹³åå¹³å粟床ïŒmAPïŒã¯ãã¯ã©ã¹éã®ç²ŸåºŠã¹ã³ã¢ãéçŽããmAP@.5ãšmAP@.5:.95 ã¯ãIoUã®ãããå€ãå€åãããããã®2ã€ã®äžè¬çãªã¿ã€ãã§ãããããã®ã¡ããªã¯ã¹ã®è©³çŽ°ã«ã€ããŠã¯ãYOLO11 ããã©ãŒãã³ã¹ã»ã¡ããªã¯ã¹ã»ã¬ã€ããã芧ãã ããã
ç¹å®ã®ããŒã¿ã»ããçšã«äºåã«èšç·ŽãããYOLO11 ã¢ãã«ã埮調æŽããã«ã¯ã©ãããã°ããã§ããïŒ
äºåã«èšç·ŽãããYOLO11 ã¢ãã«ã®åŸ®èª¿æŽã«ã¯ãç¹å®ã®ã¿ã¹ã¯ãããŒã¿ã»ããã§ã®ããã©ãŒãã³ã¹ãåäžãããããã«ããã®ãã©ã¡ãŒã¿ã調æŽããããšãå«ãŸããŸããã¡ããªã¯ã¹ã䜿ã£ãŠã¢ãã«ãè©äŸ¡ããããšããå§ãã次㫠warmup_epochs
ãã©ã¡ãŒã¿ã0ã«èšå®ããã以äžã®ãããªãã©ã¡ãŒã¿ã䜿çšããã rect=true
æ§ã
ãªç»åãµã€ãºãå¹æçã«æ±ãããã«ãã詳现ãªã¬ã€ãã³ã¹ã«ã€ããŠã¯ã以äžã®ã»ã¯ã·ã§ã³ãåç
§ããŠãã ããã YOLO11 ã¢ãã«ã®åŸ®èª¿æŽ.
YOLO11 ã¢ãã«ãè©äŸ¡ããéãå¯å€ç»åãµã€ãºãã©ã®ããã«æ±ãã°ããã§ããããïŒ
è©äŸ¡äžã«å¯å€ç»åãµã€ãºãæ±ãã«ã¯ rect=true
YOLO11ããã¯ãç»åãµã€ãºã«åºã¥ããŠããããããšã«ãããã¯ãŒã¯ã®ã¹ãã©ã€ãã調æŽãããã®ã§ããããã®ãã©ã¡ãŒã¿ã¯ imgsz
ãã©ã¡ãŒã¿ã¯ç»åã®ãªãµã€ãºã®æ倧寞æ³ãèšå®ããŸãïŒããã©ã«ãã¯640ïŒãèª¿æŽ imgsz
ããããŒã¿ã»ãããšGPU ã¡ã¢ãªã«åãããŠå€æŽããŠãã ããã詳现㯠å¯å€ç»åãµã€ãºã®åãæ±ãã«é¢ããã»ã¯ã·ã§ã³.
YOLO11 ã¢ãã«ã®å¹³åå¹³å粟床ãåäžãããããã«ãã©ã®ãããªå®çšçãªæ段ãè¬ããããšãã§ããŸããïŒ
YOLO11 ã¢ãã«ã®å¹³åå¹³å粟床(mAP)ãåäžãããã«ã¯ãããã€ãã®ã¹ããããèžãå¿ èŠãããïŒ
- ãã€ããŒãã©ã¡ãŒã¿ã®èª¿æŽïŒåŠç¿çãããããµã€ãºãç»åè£åŒ·ãå€ããŠå®éšããã
- ããŒã¿æ¡åŒµ:MosaicãMixUpã®ãããªãã¯ããã¯ã䜿ã£ãŠãå€æ§ãªãã¬ãŒãã³ã°ãµã³ãã«ãäœæããã
- ç»åã¿ã€ãªã³ã°ïŒå°ããªç©äœã®æ€åºç²ŸåºŠãåäžãããããã«ã倧ããªç»åãå°ããªã¿ã€ã«ã«åå²ããŸãã å ·äœçãªæŠç¥ã«ã€ããŠã¯ãã¢ãã«ã®åŸ®èª¿æŽã«é¢ãã詳现ãªã¬ã€ããåç §ããŠãã ããã
Python ã§YOLO11 ã¢ãã«ã®è©äŸ¡ææšã«ã¢ã¯ã»ã¹ããã«ã¯ïŒ
以äžã®æé ã§ãPython ã䜿çšããŠYOLO11 ã¢ãã«è©äŸ¡ã¡ããªã¯ã¹ã«ã¢ã¯ã»ã¹ã§ããŸãïŒ
䜿çšæ¹æ³
from ultralytics import YOLO
# Load the model
model = YOLO("yolo11n.pt")
# Run the evaluation
results = model.val(data="coco8.yaml")
# Print specific metrics
print("Class indices with average precision:", results.ap_class_index)
print("Average precision for all classes:", results.box.all_ap)
print("Mean average precision at IoU=0.50:", results.box.map50)
print("Mean recall:", results.box.mr)
ãããã®ææšãåæããããšã¯ãYOLO11 ã¢ãã«ã®åŸ®èª¿æŽãšæé©åã«åœ¹ç«ã¡ãŸãã詳ããã¯ãYOLO11 ã¡ããªã¯ã¹ã®ã¬ã€ããã芧ãã ããã