Ultralytics YOLO ãã€ããŒãã©ã¡ãŒã¿èª¿æŽã¬ã€ã
ã¯ããã«
ãã€ããŒãã©ã¡ãŒã¿ã®ãã¥ãŒãã³ã°ã¯ãåã«1åéãã®èšå®ã§ã¯ãªãã粟床ã粟床ãæ³èµ·ãªã©ã®æ©æ¢°åŠç¿ã¢ãã«ã®æ§èœææšãæé©åããããšãç®çãšããå埩ããã»ã¹ã§ãããUltralytics YOLO ã®æèã§ã¯ããããã®ãã€ããŒãã©ã¡ãŒã¿ã¯ãåŠç¿çãããå±€ã®æ°ã䜿çšãã掻æ§åé¢æ°ã®çš®é¡ãªã©ã®ã¢ãŒããã¯ãã£ã®è©³çŽ°ãŸã§ãå€å²ã«ãããã
ãã€ããŒãã©ã¡ãŒã¿ãšã¯äœãïŒ
ãã€ããŒãã©ã¡ãŒã¿ã¯ãã¢ã«ãŽãªãºã ã®ãã€ã¬ãã«ã§æ§é çãªèšå®ã§ããããããã¯åŠç¿ãã§ãŒãºã®åã«èšå®ãããåŠç¿ãã§ãŒãºäžã¯äžå®ã§ããã以äžã¯ãUltralytics YOLO ã§ãã調æŽããããã€ããŒãã©ã¡ãŒã¿ã§ãïŒ
- åŠç¿ç
lr0
:ã®æå°å€ã«åãã£ãŠç§»åããªãããåå埩ã§ã¹ããããµã€ãºã決å®ããã æ倱é¢æ°. - ããããµã€ãº
batch
:ãã©ã¯ãŒããã¹ã§åæã«åŠçãããç»åã®æ°ã - ãšããã¯æ°
epochs
:ãšããã¯ãšã¯ããã¹ãŠã®åŠç¿äŸãå®å šã«åé²ã»åŸéãããããšã§ããã - ã¢ãŒããã¯ãã£ã®ä»æ§ïŒãã£ã³ãã«æ°ãå±€æ°ã掻æ§åé¢æ°ã®çš®é¡ãªã©ã
YOLO11 ã§äœ¿çšããããªãŒã°ã¡ã³ããŒã·ã§ã³ã»ãã€ããŒãã©ã¡ãŒã¿ã®å®å šãªãªã¹ãã«ã€ããŠã¯ãã³ã³ãã£ã®ã¥ã¬ãŒã·ã§ã³ã»ããŒãžãåç §ããããã
éºäŒçé²åãšçªç¶å€ç°
Ultralytics YOLO ã¯éºäŒçã¢ã«ãŽãªãºã ã䜿ã£ãŠãã€ããŒãã©ã¡ãŒã¿ãæé©åãããéºäŒçã¢ã«ãŽãªãºã ã¯ãèªç¶æ·æ±°ãšéºäŒåŠã®ã¡ã«ããºã ã«çæ³ãåŸãŠããã
- çªç¶å€ç°ïŒUltralytics YOLO ã®æèã§ã¯ãçªç¶å€ç°ã¯ãæ¢åã®ãã€ããŒãã©ã¡ãŒã¿ã«å°ããªã©ã³ãã ãªå€æŽãå ããè©äŸ¡ã®ããã®æ°ããåè£ãçæããããšã«ãã£ãŠããã€ããŒãã©ã¡ãŒã¿ç©ºéãå±æçã«æ¢çŽ¢ããã®ã«åœ¹ç«ã€ã
- ã¯ãã¹ãªãŒããŒïŒã¯ãã¹ãªãŒããŒã¯äžè¬çãªéºäŒçã¢ã«ãŽãªãºã ææ³ã§ããããUltralytics YOLO ã§ã¯çŸåšããã€ããŒãã©ã¡ãŒã¿ã®ãã¥ãŒãã³ã°ã«ã¯äœ¿çšãããŠããªããäž»ã«ãæ°ãããã€ããŒãã©ã¡ãŒã¿ã»ãããçæããããã®çªç¶å€ç°ã«çŠç¹ãåœãŠãããŠããã
ãã€ããŒãã©ã¡ãŒã¿ã®ãã¥ãŒãã³ã°ã®æºå
ãã¥ãŒãã³ã°ã»ããã»ã¹ãå§ããåã«ãéèŠãªããšãããïŒ
- 枬å®åºæºãç¹å®ããïŒã¢ãã«ã®ããã©ãŒãã³ã¹ãè©äŸ¡ããããã«äœ¿çšããææšã決å®ããŸããããã¯ãAP50ãF1ã¹ã³ã¢ããŸãã¯ãã®ä»ã§ããã
- ãã¥ãŒãã³ã°äºç®ã®èšå®ïŒã©ãã ãã®èšç®ãªãœãŒã¹ãå²ãåœãŠãããå®çŸ©ããããã€ããŒãã©ã¡ãŒã¿ã®ãã¥ãŒãã³ã°ã¯èšç®éãå€ããªãããšããããŸãã
ã¹ããã
ãã€ããŒãã©ã¡ãŒã¿ã®åæå
åæãã€ããŒãã©ã¡ãŒã¿ã®åŠ¥åœãªã»ããããå§ãããããã¯ãUltralytics YOLO ã«ãã£ãŠèšå®ãããããã©ã«ãã®ãã€ããŒãã©ã¡ãŒã¿ã§ããããããã¡ã€ã³ç¥èãéå»ã®å®éšã«åºã¥ãããã®ã§ãããã
ãã€ããŒãã©ã¡ãŒã¿ã®å€ç°
ã䜿çšããã _mutate
ã¡ãœããã䜿ã£ãŠãæ¢åã®ãã€ããŒãã©ã¡ãŒã¿ã®éåã«åºã¥ããŠæ°ãããã€ããŒãã©ã¡ãŒã¿ã®éåãçæããã
ééæš¡å
å€ç°ããããã€ããŒãã©ã¡ãŒã¿ã®ã»ããã䜿ã£ãŠãã¬ãŒãã³ã°ãè¡ãããããã®åŸããã¬ãŒãã³ã°ã®ããã©ãŒãã³ã¹ãè©äŸ¡ãããã
ã¢ãã«ã®è©äŸ¡
ã¢ãã«ã®ããã©ãŒãã³ã¹ãè©äŸ¡ããããã«ãAP50ãF1ã¹ã³ã¢ããŸãã¯ã«ã¹ã¿ã ã¡ããªã¯ã¹ã®ãããªã¡ããªã¯ã¹ã䜿çšããŸãã
ãã°çµæ
å°æ¥ã®åèã®ããã«ãããã©ãŒãã³ã¹ã¡ããªã¯ã¹ãšå¯Ÿå¿ãããã€ããŒãã©ã¡ãŒã¿ã®äž¡æ¹ãèšé²ããããšã¯éåžžã«éèŠã§ããã
ãªããŒã
ãã®ããã»ã¹ã¯ãèšå®ãããå埩åæ°ã«éããããããã©ãŒãã³ã¹ææšãæºè¶³ã®ãããã®ã«ãªããŸã§ç¹°ãè¿ãããã
䜿çšäŸ
ã®äœ¿ãæ¹ã¯ä»¥äžã®éãã model.tune()
ã¡ãœãããå©çšããã Tuner
COCO8äžã§AdamWãªããã£ãã€ã¶ã䜿çšãã30ãšããã¯ã®YOLO11nã®ãã€ããŒãã©ã¡ãŒã¿ãã¥ãŒãã³ã°ãè¡ãã¯ã©ã¹ã§ããã¥ãŒãã³ã°ãé«éåããããã«ãæçµãšããã¯ä»¥å€ã®ããããããã§ãã¯ãã€ã³ããæ€èšŒãã¹ãããããã
äŸ
çµæ
ãã€ããŒãã©ã¡ãŒã¿ã®ãã¥ãŒãã³ã°ã»ããã»ã¹ãæ£åžžã«å®äºãããšããã¥ãŒãã³ã°ã®çµæãã«ãã»ã«åããããã€ãã®ãã¡ã€ã«ãšãã£ã¬ã¯ããªãåŸãããŸãã以äžãããããã«ã€ããŠèª¬æããŸãïŒ
ãã¡ã€ã«æ§æ
çµæã®ãã£ã¬ã¯ããªæ§é ã¯ãããªãããã¬ãŒãã³ã°ã»ãã£ã¬ã¯ã㪠train1/
åã
ã®ãã¥ãŒãã³ã°å埩ãã€ãŸã1ã»ããã®ãã€ããŒãã©ã¡ãŒã¿ã§èšç·Žããã1ã€ã®ã¢ãã«ãå«ãŸãããã€ãŸã tune/
ãã£ã¬ã¯ããªã«ã¯ããã¹ãŠã®åå¥ã¢ãã«ãã¬ãŒãã³ã°ã®ãã¥ãŒãã³ã°çµæãå«ãŸããŠããŸãïŒ
runs/
âââ detect/
âââ train1/
âââ train2/
âââ ...
âââ tune/
âââ best_hyperparameters.yaml
âââ best_fitness.png
âââ tune_results.csv
âââ tune_scatter_plots.png
âââ weights/
âââ last.pt
âââ best.pt
ãã¡ã€ã«ã®èª¬æ
best_hyperparameters.yaml
ãã®YAMLãã¡ã€ã«ã«ã¯ããã¥ãŒãã³ã°ããã»ã¹ã§èŠã€ãã£ãæé©ãªãã€ããŒãã©ã¡ãŒã¿ãå«ãŸããŸãããã®ãã¡ã€ã«ã䜿çšããŠãæé©åãããèšå®ã§å°æ¥ã®åŠç¿ãåæåããããšãã§ããŸãã
- ãã©ãŒãããYAML
- 䜿ãæ¹ãã€ããŒãã©ã¡ãŒã¿ã®çµæ
-
äŸ
# 558/900 iterations complete â (45536.81s) # Results saved to /usr/src/ultralytics/runs/detect/tune # Best fitness=0.64297 observed at iteration 498 # Best fitness metrics are {'metrics/precision(B)': 0.87247, 'metrics/recall(B)': 0.71387, 'metrics/mAP50(B)': 0.79106, 'metrics/mAP50-95(B)': 0.62651, 'val/box_loss': 2.79884, 'val/cls_loss': 2.72386, 'val/dfl_loss': 0.68503, 'fitness': 0.64297} # Best fitness model is /usr/src/ultralytics/runs/detect/train498 # Best fitness hyperparameters are printed below. lr0: 0.00269 lrf: 0.00288 momentum: 0.73375 weight_decay: 0.00015 warmup_epochs: 1.22935 warmup_momentum: 0.1525 box: 18.27875 cls: 1.32899 dfl: 0.56016 hsv_h: 0.01148 hsv_s: 0.53554 hsv_v: 0.13636 degrees: 0.0 translate: 0.12431 scale: 0.07643 shear: 0.0 perspective: 0.0 flipud: 0.0 fliplr: 0.08631 mosaic: 0.42551 mixup: 0.0 copy_paste: 0.0
ãã¹ããã£ãããã¹.png
ããã¯å埩åæ°ã«å¯Ÿãããã£ãããã¹ïŒéåžžAP50ã®ãããªæ§èœææšïŒã衚瀺ããããããã§ããããã¯ãéºäŒçã¢ã«ãŽãªãºã ãæéãšãšãã«ã©ã®çšåºŠããŸããã£ãããèŠèŠåããã®ã«åœ¹ç«ã¡ãŸãã
- ãã©ãŒãããPNG
- 䜿ãæ¹ããã©ãŒãã³ã¹ã®å¯èŠå
tune_results.csv
ãã¥ãŒãã³ã°äžã®åå埩ã®è©³çŽ°ãªçµæãå«ãCSVãã¡ã€ã«ããã¡ã€ã«ã®åè¡ã¯1åã®å埩ãè¡šãããã£ãããã¹ã»ã¹ã³ã¢ã粟床ããªã³ãŒã«ãªã©ã®ã¡ããªã¯ã¹ãšã䜿çšããããã€ããŒãã©ã¡ãŒã¿ãå«ãŸããã
- ãã©ãŒãããCSV
- 䜿ãæ¹ïŒå埩ããšã®çµæ远跡ã
- äŸ:
fitness,lr0,lrf,momentum,weight_decay,warmup_epochs,warmup_momentum,box,cls,dfl,hsv_h,hsv_s,hsv_v,degrees,translate,scale,shear,perspective,flipud,fliplr,mosaic,mixup,copy_paste 0.05021,0.01,0.01,0.937,0.0005,3.0,0.8,7.5,0.5,1.5,0.015,0.7,0.4,0.0,0.1,0.5,0.0,0.0,0.0,0.5,1.0,0.0,0.0 0.07217,0.01003,0.00967,0.93897,0.00049,2.79757,0.81075,7.5,0.50746,1.44826,0.01503,0.72948,0.40658,0.0,0.0987,0.4922,0.0,0.0,0.0,0.49729,1.0,0.0,0.0 0.06584,0.01003,0.00855,0.91009,0.00073,3.42176,0.95,8.64301,0.54594,1.72261,0.01503,0.59179,0.40658,0.0,0.0987,0.46955,0.0,0.0,0.0,0.49729,0.80187,0.0,0.0
tune_scatter_plots.png
ãã®ãã¡ã€ã«ã«ã¯ tune_results.csv
ããã¯ãç°ãªããã€ããŒãã©ã¡ãŒã¿ãšããã©ãŒãã³ã¹ã»ã¡ããªã¯ã¹ã®é¢ä¿ãèŠèŠåããã®ã«åœ¹ç«ã¡ãŸãã0ã«åæåããããã€ããŒãã©ã¡ãŒã¿ã¯ãã¥ãŒãã³ã°ãããªãããšã«æ³šæããŠãã ããã degrees
ãã㊠shear
ã®äžã«ããã
- ãã©ãŒãããPNG
- 䜿ãæ¹æ¢çŽ¢çããŒã¿åæ
ãŠã§ã€ã
ãã®ãã£ã¬ã¯ããªã«ã¯ PyTorchãã®ãã£ã¬ã¯ããªã«ã¯ããã€ããŒãã©ã¡ãŒã¿ã»ãã¥ãŒãã³ã°ã»ããã»ã¹ã®æåŸã®å埩ãšæè¯ã®å埩ã®ããã«ä¿åãããã¢ãã«ãå«ãŸããŸãã
last.pt
:last.ptã¯ãã¬ãŒãã³ã°ã®æåŸã®ãšããã¯ããã®éã¿ã§ãããbest.pt
:æé«ã®ãã£ãããã¹ã¹ã³ã¢ãéæããå埩ã®best.ptéã¿ã
ãããã®çµæã䜿çšããããšã§ãå°æ¥ã®ã¢ãã«ã®ãã¬ãŒãã³ã°ãåæã«ãããŠãããå€ãã®æ å ±ã«åºã¥ãã決å®ãäžãããšãã§ããŸãããããã®ææç©ãèªç±ã«åç §ããããªãã®ã¢ãã«ãã©ã®çšåºŠããŸããã£ããããŸãã©ã®ããã«ããã°ããã«æ¹åã§ããããç解ããŠãã ããã
çµè«
Ultralytics YOLO ã®ãã€ããŒãã©ã¡ãŒã¿ã»ãã¥ãŒãã³ã°ã»ããã»ã¹ã¯ãçªç¶å€ç°ã«çŠç¹ãåœãŠãéºäŒçã¢ã«ãŽãªãºã ã»ããŒã¹ã®ã¢ãããŒãã®ãããã§ãç°¡çŽ åãããŠããªãã匷åã§ããããã®ã¬ã€ãã«æŠèª¬ãããŠããã¹ãããã«åŸãããšã§ãããè¯ãããã©ãŒãã³ã¹ãéæããããã«ã¢ãã«ãäœç³»çã«ãã¥ãŒãã³ã°ããããšãã§ããŸãã
ããã«èªã
- ãŠã£ãããã£ã¢ã§ã®ãã€ããŒãã©ã¡ãŒã¿æé©å
- YOLOv5 ãã€ããŒãã©ã¡ãŒã¿é²åã¬ã€ã
- ã¬ã€ãã¥ãŒã³ãšãã€ããŒãã©ã¡ãŒã¿ã®å¹ççãªãã¥ãŒãã³ã°YOLO11
ããæ·±ãæŽå¯ã«ã€ããŠã¯ Tuner
ã¯ã©ã¹ã®ãœãŒã¹ã³ãŒããšä»å±ã®ããã¥ã¡ã³ããæäŸããŠããŸããã質åãæ©èœãªã¯ãšã¹ãããã®ä»ãµããŒããå¿
èŠãªå Žåã¯ããæ°è»œã«äžèšãŸã§ãé£çµ¡ãã ããã ã®ãããã ãŸã㯠ãã£ã¹ã³ãŒã.
ããããã質å
ãã€ããŒãã©ã¡ãŒã¿ã®ãã¥ãŒãã³ã°äžã«Ultralytics YOLO ã®åŠç¿çãæé©åããã«ã¯ïŒ
Ultralytics YOLO ã®åŠç¿ã¬ãŒããæé©åããã«ã¯ããŸãã次ã®ããã«ããŠåæåŠç¿ã¬ãŒããèšå®ããã lr0
ãã©ã¡ãŒã¿ã䜿çšããŸããäžè¬çãªå€ã¯ 0.001
ãžã® 0.01
.ãã€ããŒãã©ã¡ãŒã¿ã®ãã¥ãŒãã³ã°ã®éçšã§ããã®å€ã¯æé©ãªèšå®ãèŠã€ããããã«å€æŽããããããªã㯠model.tune()
ã¡ãœããã䜿ã£ãŠãã®ããã»ã¹ãèªååããããšãã§ãããäŸãã°
äŸ
詳ããã¯ãUltralytics YOLO ã® èšå®ããŒãžãã芧ãã ããã
YOLO11 ããã€ããŒãã©ã¡ãŒã¿ã®ãã¥ãŒãã³ã°ã«éºäŒçã¢ã«ãŽãªãºã ã䜿çšããå©ç¹ã¯äœã§ããïŒ
Ultralytics YOLO11 ã«ãããéºäŒçã¢ã«ãŽãªãºã ã¯ããã€ããŒãã©ã¡ãŒã¿ç©ºéãæ¢çŽ¢ããããã®ããã¹ããªæ¹æ³ãæäŸããé«åºŠã«æé©åãããã¢ãã«æ§èœããããããäž»ãªå©ç¹ã¯ä»¥äžã®ãšããã§ããïŒ
- å¹ççãªæ¢çŽ¢ïŒçªç¶å€ç°ã®ãããªéºäŒçã¢ã«ãŽãªãºã ã¯ã倧èŠæš¡ãªãã€ããŒãã©ã¡ãŒã¿ã®ã»ãããçŽ æ©ãæ¢çŽ¢ããããšãã§ããã
- ããŒã«ã«ã»ãããã ã®åé¿ïŒã©ã³ãã æ§ãå°å ¥ããããšã§ãããŒã«ã«ã»ãããã ãåé¿ããããè¯ã倧åçæé©åãä¿èšŒããã
- ããã©ãŒãã³ã¹ææšïŒAP50ãF1ã¹ã³ã¢ãªã©ã®ããã©ãŒãã³ã¹ææšã«åºã¥ããŠé©å¿ããã
éºäŒçã¢ã«ãŽãªãºã ãã©ã®ããã«ãã€ããŒãã©ã¡ãŒã¿ãæé©åã§ãããã«ã€ããŠã¯ããã€ããŒãã©ã¡ãŒã¿é²åã¬ã€ããã芧ãã ããã
Ultralytics YOLO ã®å Žåããã€ããŒãã©ã¡ãŒã¿ã®ãã¥ãŒãã³ã°ã«ãããæéã¯ïŒ
Ultralytics YOLO ã«ãããã€ããŒãã©ã¡ãŒã¿ã®ãã¥ãŒãã³ã°ã«èŠããæéã¯ãããŒã¿ã»ããã®ãµã€ãºãã¢ãã«ã¢ãŒããã¯ãã£ã®è€éããå埩åæ°ãå©çšå¯èœãªèšç®ãªãœãŒã¹ãªã©ãããã€ãã®èŠå ã«å€§ããäŸåãããäŸãã°ãCOCO8 ã®ãããªããŒã¿ã»ãã㧠YOLO11n ã 30 ãšãã㯠ãã¥ãŒãã³ã°ããã«ã¯ãããŒããŠã§ã¢ã«ãããããæ°æéããæ°æ¥ãããã
ãã¥ãŒãã³ã°æéãå¹æçã«ç®¡çããããã«ããããããæ確ãªãã¥ãŒãã³ã°äºç®ãå®çŸ©ããŠããïŒå éšã»ã¯ã·ã§ã³ã®ãªã³ã¯ïŒãããã¯ããªãœãŒã¹é åãšæé©åç®æšã®ãã©ã³ã¹ããšãã®ã«åœ¹ç«ã¡ãŸãã
YOLO ããã€ããŒãã©ã¡ãŒã¿ã®ãã¥ãŒãã³ã°äžã«ã¢ãã«ã®ããã©ãŒãã³ã¹ãè©äŸ¡ããã«ã¯ãã©ã®ãããªææšã䜿çšããã°ããã§ããããïŒ
YOLO ã§ãã€ããŒãã©ã¡ãŒã¿ã®ãã¥ãŒãã³ã°ãè¡ãéã«ã¢ãã«ã®ããã©ãŒãã³ã¹ãè©äŸ¡ããå Žåãããã€ãã®äž»èŠãªã¡ããªã¯ã¹ã䜿çšããããšãã§ããŸãïŒ
- AP50: IoUéŸå€0.50ã«ãããå¹³å粟床ã
- F1ã¹ã³ã¢ïŒç²ŸåºŠãšæ³èµ·ã®èª¿åå¹³åã
- PrecisionãšRecallïŒçéœæ§ãšåœéœæ§ããã³åœé°æ§ãèå¥ããã¢ãã«ã®ç²ŸåºŠã瀺ãåã ã®æž¬å®åºæºã
ãããã®ã¡ããªã¯ã¹ã¯ãã¢ãã«ã®ããã©ãŒãã³ã¹ã®ããŸããŸãªåŽé¢ãç解ããã®ã«åœ¹ç«ã¡ãŸããå æ¬çãªæŠèŠã«ã€ããŠã¯ãUltralytics YOLO ããã©ãŒãã³ã¹ã»ã¡ããªã¯ã¹ã»ã¬ã€ãããåç §ãã ããã
YOLO ã¢ãã«ã®ãã€ããŒãã©ã¡ãŒã¿ãã¥ãŒãã³ã°ã«Ultralytics HUB ã䜿çšã§ããŸããïŒ
ã¯ããYOLO ã¢ãã«ã®ãã€ããŒãã©ã¡ãŒã¿ã»ãã¥ãŒãã³ã°ã«Ultralytics HUB ã䜿çšããããšãã§ããŸããHUBã¯ãããŒã¿ã»ããã®ã¢ããããŒããã¢ãã«ã®ãã¬ãŒãã³ã°ãããã³ãã€ããŒã»ãã©ã¡ãŒã¿ã»ãã¥ãŒãã³ã°ãå¹ççã«å®è¡ããããã®ã³ãŒãäžèŠã®ãã©ãããã©ãŒã ãæäŸããŸããHUBã¯ããã¥ãŒãã³ã°ã®é²æãšçµæããªã¢ã«ã¿ã€ã ã§è¿œè·¡ããå¯èŠåããŸãã
ãã€ããŒãã©ã¡ãŒã¿ãã¥ãŒãã³ã°ã®ããã®Ultralytics HUB ã®äœ¿çšã«ã€ããŠã¯ãUltralytics HUBCloud Trainingããã¥ã¡ã³ããåç §ããŠãã ããã