ã¢ãã«ã»ãã¬ãŒãã³ã°Ultralytics YOLO
ã¯ããã«
ãã£ãŒãã©ãŒãã³ã°ã»ã¢ãã«ã®ãã¬ãŒãã³ã°ã«ã¯ãããŒã¿ãäžããæ£ç¢ºãªäºæž¬ãã§ããããã«ãã©ã¡ãŒã¿ã調æŽããããšãå«ãŸãããUltralytics YOLO11 ã® Train ã¢ãŒãã¯ãææ°ã®ããŒããŠã§ã¢æ©èœããã«ã«æŽ»çšãããå¹æçãã€å¹ççãªç©äœæ€åºã¢ãã«ã®ãã¬ãŒãã³ã°ã®ããã«èšèšãããŠããŸãããã®ã¬ã€ãã§ã¯ãYOLO11'ã®å ç¢ãªæ©èœã»ããã䜿çšããŠç¬èªã®ã¢ãã«ã®ãã¬ãŒãã³ã°ãéå§ããããã«å¿ èŠãªãã¹ãŠã®è©³çŽ°ãã«ããŒããããšãç®çãšããŠããŸãã
èŠããã ïŒ Google Colabã®ã«ã¹ã¿ã ããŒã¿ã»ããã§YOLO ã¢ãã«ããã¬ãŒãã³ã°ããæ¹æ³ã
ãã¬ãŒãã³ã°ã«Ultralytics YOLO ãéžã¶çç±
YOLO11 ããã¬ã€ã³ãã¢ãŒããéžã¶èª¬åŸåã®ããçç±ãããã€ãæããŠã¿ããïŒ
- å¹çïŒã·ã³ã°ã«GPU ã®ã»ããã¢ããã§ããè€æ°ã®GPUã«ãŸãããã¹ã±ãŒãªã³ã°ã§ããããŒããŠã§ã¢ãæ倧éã«æŽ»çšã§ããŸãã
- æ±çšæ§ïŒCOCOãVOCãImageNetã®ãããªå ¥æããããããŒã¿ã»ããã«å ããã«ã¹ã¿ã ããŒã¿ã»ããã§ãåŠç¿ã§ããŸãã
- ãŠãŒã¶ãŒãã¬ã³ããªãŒïŒã·ã³ãã«ãã€ãã¯ãã«ãªCLI ããã³Python ã€ã³ã¿ãŒãã§ãŒã¹ã«ããããããããããã¬ãŒãã³ã°äœéšãæäŸããŸãã
- ãã€ããŒãã©ã¡ãŒã¿ã®æè»æ§ïŒã¢ãã«ã®æ§èœã埮調æŽããããã®ã«ã¹ã¿ãã€ãºå¯èœãªå¹ åºããã€ããŒãã©ã¡ãŒã¿ã
ãã¬ã€ã³ã»ã¢ãŒãã®äž»ãªç¹åŸŽ
以äžã¯ãYOLO11 ããã¬ã€ã³ãã¢ãŒãã®ç¹çãã¹ãç¹åŸŽã§ããïŒ
- ããŒã¿ã»ããã®èªåããŠã³ããŒãïŒCOCOãVOCãImageNetãªã©ã®æšæºããŒã¿ã»ããã¯ãåå䜿çšæã«èªåçã«ããŠã³ããŒããããŸãã
- ãã«ãGPU ãµããŒãïŒè€æ°ã®GPUã§ã·ãŒã ã¬ã¹ã«ãã¬ãŒãã³ã°ã®èŠæš¡ãæ¡å€§ããããã»ã¹ãè¿ éåããŸãã
- ãã€ããŒãã©ã¡ãŒã¿ã®èšå®ïŒYAML èšå®ãã¡ã€ã«ãŸãã¯CLI åŒæ°ãéããŠãã€ããŒãã©ã¡ãŒã¿ãå€æŽãããªãã·ã§ã³ã
- å¯èŠåãšã¢ãã¿ãªã³ã°ïŒãã¬ãŒãã³ã°ã¡ããªã¯ã¹ããªã¢ã«ã¿ã€ã ã§è¿œè·¡ããåŠç¿ããã»ã¹ãå¯èŠåããããšã§ãããè¯ãæŽå¯ãåŸãããšãã§ããŸãã
ããã
- YOLO11 COCOãVOCãImageNetããã®ä»å€ãã®ããŒã¿ã»ããã¯ãåå䜿çšæã«èªåçã«ããŠã³ããŒããããã
yolo train data=coco.yaml
䜿çšäŸ
COCO8ããŒã¿ã»ããã§YOLO11nã100åãã¬ãŒãã³ã°ããã æ代 ç»åãµã€ãº640ã§ããã¬ãŒãã³ã°è£
眮㯠device
åŒæ°ãæž¡ããåŒæ°ãæž¡ãããªãå ŽåGPU device=0
ã䜿çšãããŸãã device='cpu'
ã䜿çšãããããã¬ãŒãã³ã°åŒæ°ã®å
šãªã¹ãã¯äžèšã®ãåŒæ°ãã»ã¯ã·ã§ã³ãåç
§ã
ã·ã³ã°ã«GPU ãCPU ãã¬ãŒãã³ã°äŸ
ããã€ã¹ã¯èªåçã«æ±ºå®ããããGPU ãå©çšå¯èœã§ããã°ããã䜿çšãããããã§ãªããã°CPU ãããã¬ãŒãã³ã°ãéå§ãããã
from ultralytics import YOLO
# Load a model
model = YOLO("yolo11n.yaml") # build a new model from YAML
model = YOLO("yolo11n.pt") # load a pretrained model (recommended for training)
model = YOLO("yolo11n.yaml").load("yolo11n.pt") # build from YAML and transfer weights
# Train the model
results = model.train(data="coco8.yaml", epochs=100, imgsz=640)
# Build a new model from YAML and start training from scratch
yolo detect train data=coco8.yaml model=yolo11n.yaml epochs=100 imgsz=640
# Start training from a pretrained *.pt model
yolo detect train data=coco8.yaml model=yolo11n.pt epochs=100 imgsz=640
# Build a new model from YAML, transfer pretrained weights to it and start training
yolo detect train data=coco8.yaml model=yolo11n.yaml pretrained=yolo11n.pt epochs=100 imgsz=640
ãã«ãGPU ãã¬ãŒãã³ã°
ãã«ãGPU ãã¬ãŒãã³ã°ã¯ããã¬ãŒãã³ã°è² è·ãè€æ°ã®GPUã«åæ£ããããšã§ãå©çšå¯èœãªããŒããŠã§ã¢ãªãœãŒã¹ãããå¹ççã«å©çšããããšãã§ããŸãããã®æ©èœã¯Python API ãšã³ãã³ãã©ã€ã³ã»ã€ã³ã¿ãŒãã§ãŒã¹ã®äž¡æ¹ããå©çšå¯èœã§ãããã«ãGPU ãã¬ãŒãã³ã°ãæå¹ã«ããã«ã¯ã䜿çšãããGPU ããã€ã¹ ID ãæå®ããŸãã
ãã«ãGPU ãã¬ãŒãã³ã°äŸ
2ã€ã®GPUãCUDA ããã€ã¹0ãš1ã§ãã¬ãŒãã³ã°ããã«ã¯ã以äžã®ã³ãã³ãã䜿çšããŸããå¿ èŠã«å¿ããŠGPUãè¿œå ããŠãã ããã
ã¢ããã«ã»ã·ãªã³ã³MPS ãã¬ãŒãã³ã°
Ultralytics YOLO ã¢ãã«ã«çµ±åãããAppleã·ãªã³ã³ãããã®ãµããŒãã«ããã匷åãªMetal Performance Shaders (MPS) ãã¬ãŒã ã¯ãŒã¯ãå©çšããããã€ã¹äžã§ã¢ãã«ããã¬ãŒãã³ã°ããããšãå¯èœã«ãªããŸãããMPS ã¯ãã¢ããã«ã®ã«ã¹ã¿ã ã·ãªã³ã³äžã§èšç®ãšç»ååŠçã¿ã¹ã¯ãå®è¡ããé«æ§èœãªæ¹æ³ãæäŸããŸãã
Appleã®ã·ãªã³ã³ãããã§ãã¬ãŒãã³ã°ãæå¹ã«ããã«ã¯ããã¬ãŒãã³ã°ããã»ã¹ãéå§ããéã«ãããã€ã¹ãšããŠãmps ããæå®ããå¿ èŠããããŸãã以äžã¯ãPython ãã³ãã³ãã©ã€ã³ããè¡ãæ¹æ³ã®äŸã§ãïŒ
MPS ãã¬ãŒãã³ã°äŸ
ã¢ããã«ã®ã·ãªã³ã³ãããã®èšç®èœåã掻çšããªããããã¬ãŒãã³ã°ã¿ã¹ã¯ãããå¹ççã«åŠçããããšãã§ããŸãããã詳现ãªã¬ã€ãã³ã¹ãšé«åºŠãªèšå®ãªãã·ã§ã³ã«ã€ããŠã¯ãPyTorch MPS ããã¥ã¡ã³ããåç §ããŠãã ããã
äžæããŠãããã¬ãŒãã³ã°ã®åé
以åã«ä¿åããç¶æ ããåŠç¿ãåéããããšã¯ããã£ãŒãã©ãŒãã³ã°ã»ã¢ãã«ãæ±ãäžã§éåžžã«éèŠãªæ©èœã§ããããã¯ãåŠç¿ããã»ã¹ãäºæããäžæãããå Žåããæ°ããããŒã¿ãŸãã¯ããå€ãã®ãšããã¯ã§ã¢ãã«ã®åŠç¿ãç¶è¡ãããå Žåãªã©ãããŸããŸãªã·ããªãªã§äŸ¿å©ã§ãã
ãã¬ãŒãã³ã°ãåéããããšãUltralytics YOLO ãæåŸã«ä¿åãããã¢ãã«ã®éã¿ãããŒãããããªããã£ãã€ã¶ã®ç¶æ ãåŠç¿çã¹ã±ãžã¥ãŒã©ããšããã¯æ°ã埩å ãããŸããããã«ãããåŠç¿ããã»ã¹ãäžæãããšããããã·ãŒã ã¬ã¹ã«ç¶ç¶ããããšãã§ããŸãã
ãèšå®ããããšã§ãUltralytics YOLO ã®ãã¬ãŒãã³ã°ãç°¡åã«åéããããšãã§ããŸãã resume
åŒæ° True
ãåŒã³åºããšãã« train
ã¡ãœãããžã®ãã¹ãæå®ããã .pt
ãã¡ã€ã«ã«ã¯ãéšåçã«åŠç¿ãããã¢ãã«ã®éã¿ãå«ãŸããŠããã
以äžã¯ãPython ãã³ãã³ãã©ã€ã³ã䜿ã£ãŠäžæãããã¬ãŒãã³ã°ãåéããæ¹æ³ã®äŸã§ãïŒ
å±¥æŽæžãã¬ãŒãã³ã°ã®äŸ
ã»ããã£ã³ã° resume=True
ãã® train
é¢æ°ã¯ã'path/to/last.pt'ãã¡ã€ã«ã«ä¿åãããŠããç¶æ
ã䜿çšããŠããã¬ãŒãã³ã°ãäžæãããšããããç¶ç¶ããŸãããã resume
åŒæ°ãçç¥ããããããŸã㯠False
ãã® train
é¢æ°ã¯æ°ãããã¬ãŒãã³ã°ã»ãã·ã§ã³ãéå§ããã
ãã§ãã¯ãã€ã³ãã¯ãããã©ã«ãã§ã¯æ¯ãšããã¯çµäºæã«ä¿åãããã save_period
ãã®ããããã¬ãŒãã³ã°èµ°è¡ãåéããã«ã¯ãå°ãªããšã1ãšããã¯ãå®äºããå¿
èŠãããã
åè»èšå®
YOLO ã¢ãã«ã®åŠç¿èšå®ã¯ãåŠç¿ããã»ã¹ã§äœ¿çšãããæ§ã ãªãã€ããŒãã©ã¡ãŒã¿ãšèšå®ãå å«ããããããã®èšå®ã¯ã¢ãã«ã®ããã©ãŒãã³ã¹ãã¹ããŒãã粟床ã«åœ±é¿ãäžãããäž»èŠãªåŠç¿èšå®ã«ã¯ãããããµã€ãºãåŠç¿çãã¢ã¡ã³ã¿ã ããŠã§ã€ãæžè¡°ãå«ãŸãããããã«ããªããã£ãã€ã¶ãæ倱é¢æ°ãåŠç¿ããŒã¿ã»ããã®æ§æãªã©ã®éžæãåŠç¿ããã»ã¹ã«åœ±é¿ãäžããŸããããã©ãŒãã³ã¹ãæé©åããããã«ã¯ããããã®èšå®ãæ éã«ãã¥ãŒãã³ã°ããå®éšããããšãéèŠã§ãã
è°è« | ããã©ã«ã | 説æ |
---|---|---|
model |
None |
ãã¬ãŒãã³ã°çšã®ã¢ãã«ãã¡ã€ã«ãæå®ããŸãããã¡ã€ã«ãžã®ãã¹ãæå®ããŸãã .pt èšç·Žæžã¿ã¢ãã«ãŸã㯠.yaml èšå®ãã¡ã€ã«ãã¢ãã«æ§é ã®å®çŸ©ãéã¿ã®åæåã«äžå¯æ¬ ã |
data |
None |
ããŒã¿ã»ããèšå®ãã¡ã€ã«ãžã®ãã¹ïŒäŸïŒ coco8.yaml ).ãã®ãã¡ã€ã«ã«ã¯ããŒã¿ã»ããåºæã®ãã©ã¡ãŒã¿ãå«ãŸããã æ€èšŒããŒã¿ã¯ã©ã¹åãã¯ã©ã¹æ° |
epochs |
100 |
åŠç¿ãšããã¯ã®ç·æ°ãåãšããã¯ã¯ããŒã¿ã»ããå šäœã«å¯Ÿãããã«ãã¹ãè¡šãããã®å€ã調æŽããããšã§ããã¬ãŒãã³ã°æéãšã¢ãã«ã®ããã©ãŒãã³ã¹ã«åœ±é¿ãäžããããšãã§ããã |
time |
None |
æ倧ãã¬ãŒãã³ã°æéïŒæéåäœïŒãèšå®ãããš epochs åŒæ°ãæå®ããããšã§ãæå®ããæéåŸã«ãã¬ãŒãã³ã°ãèªåçã«åæ¢ããããšãã§ããŸããæéã«å¶çŽã®ãããã¬ãŒãã³ã°ã·ããªãªã«äŸ¿å©ã§ãã |
patience |
100 |
åŠç¿ãæ©æã«åæ¢ããåã«ãæ€èšŒã¡ããªã¯ã¹ã«æ¹åãèŠãããªãå Žåã®ãšããã¯æ°ãæ§èœãé æã¡ã«ãªã£ããšãã«åŠç¿ãåæ¢ããããšã§ããªãŒããŒãã£ããã£ã³ã°ãé²ãããšãã§ããŸãã |
batch |
16 |
ããããµã€ãº3ã€ã®ã¢ãŒããããã batch=16 )ãGPU ã¡ã¢ãªäœ¿çšç60%ã®èªåã¢ãŒã(batch=-1 )ããŸãã¯å©çšçãæå®ããèªåã¢ãŒã(batch=0.70 ). |
imgsz |
640 |
ãã¬ãŒãã³ã°ã®ã¿ãŒã²ããç»åãµã€ãºããã¹ãŠã®ç»åã¯ãã¢ãã«ã«å ¥åãããåã«ãã®æ¬¡å ã«ãªãµã€ãºãããŸããã¢ãã«ã®ç²ŸåºŠãšèšç®ã®è€éãã«åœ±é¿ããŸãã |
save |
True |
ãã¬ãŒãã³ã°ã®ãã§ãã¯ãã€ã³ããšæçµçãªã¢ãã«ã®éã¿ãä¿åã§ããããã«ããŸãããã¬ãŒãã³ã°ã®åéãã¢ãã«ã®ãããã€ã«äŸ¿å©ã§ãã |
save_period |
-1 |
ã¢ãã«ã®ãã§ãã¯ãã€ã³ããä¿åããé »åºŠããšããã¯ã§æå®ããŸããå€ã-1ã«ãããšããã®æ©èœã¯ç¡å¹ã«ãªããŸããé·ããã¬ãŒãã³ã°ã»ãã·ã§ã³äžã«äžéã¢ãã«ãä¿åããã®ã«äŸ¿å©ã§ãã |
cache |
False |
ããŒã¿ã»ããç»åãã¡ã¢ãªäžã«ãã£ãã·ã¥ã§ããããã«ãã (True /ram )ããã£ã¹ã¯äž(disk )ããŸãã¯ç¡å¹ã«ãã(False ).ã¡ã¢ãªäœ¿çšéã®å¢å ãšåŒãæãã«ããã£ã¹ã¯I/Oãåæžããããšã§ãã¬ãŒãã³ã°é床ãåäžãããã |
device |
None |
ãã¬ãŒãã³ã°ã«äœ¿çšããèšç®ããã€ã¹ãæå®ããŸã: ã·ã³ã°ã«GPU (device=0 )ããã«ãGPU(device=0,1 )ãCPU (device=cpu )ããŸãã¯ã¢ããã«ã»ã·ãªã³ã³çšã®MPS (device=mps ). |
workers |
8 |
ããŒã¿ããŒãã®ããã®ã¯ãŒã«ãŒã¹ã¬ããæ°ïŒ1ã¹ã¬ããããã RANK ãã«ãGPU ãã¬ãŒãã³ã°ã®å ŽåïŒãããŒã¿ã®ååŠçãšã¢ãã«ãžã®æå
¥é床ã«åœ±é¿ããç¹ã«ãã«ãGPU ã»ããã¢ããã§æçšã |
project |
None |
ãã¬ãŒãã³ã°åºåãä¿åããããããžã§ã¯ããã£ã¬ã¯ããªã®ååãç°ãªãå®éšãæŽçããŠä¿åã§ããããã«ããã |
name |
None |
ãã¬ãŒãã³ã°å®è¡ã®ååããããžã§ã¯ããã©ã«ãå ã«ãµããã£ã¬ã¯ããªãäœæããããã«ãã¬ãŒãã³ã°ãã°ãšåºåãä¿åããŸãã |
exist_ok |
False |
Trueã®å Žåãæ¢åã®project/nameãã£ã¬ã¯ããªãäžæžãã§ããã以åã®åºåãæåã§æ¶å»ããå¿ èŠããªããç¹°ãè¿ãå®éšããã®ã«äŸ¿å©ã§ãã |
pretrained |
True |
äºåã«èšç·Žãããã¢ãã«ããåŠç¿ãéå§ãããã©ããã決å®ããŸããããŒã«å€ãŸãã¯ç¹å®ã®ã¢ãã«ãžã®æååãã¹ãæå®ããããããéã¿ãèªã¿èŸŒã¿ãŸãããã¬ãŒãã³ã°ã®å¹çãšã¢ãã«ã®ããã©ãŒãã³ã¹ãåäžãããŸãã |
optimizer |
'auto' |
ãã¬ãŒãã³ã°çšãªããã£ãã€ã¶ãŒã®éžæããªãã·ã§ã³ SGD , Adam , AdamW , NAdam , RAdam , RMSProp ãªã©ãããã㯠auto ã¢ãã«æ§æã«åºã¥ãèªåéžæãåæé床ãšå®å®æ§ã«åœ±é¿ããŸãã |
seed |
0 |
ãã¬ãŒãã³ã°çšã®ã©ã³ãã ã·ãŒããèšå®ããåãã³ã³ãã£ã®ã¥ã¬ãŒã·ã§ã³ã§å®è¡ããå Žåã®çµæã®åçŸæ§ã確ä¿ããŸãã |
deterministic |
True |
決å®è«çã¢ã«ãŽãªãºã ã®äœ¿çšã匷å¶ããåçŸæ§ã確ä¿ããããé決å®è«çã¢ã«ãŽãªãºã ã®å¶éã«ãããããã©ãŒãã³ã¹ãšã¹ããŒãã«åœ±é¿ãäžããå¯èœæ§ãããã |
single_cls |
False |
ãã«ãã¯ã©ã¹ããŒã¿ã»ããã®ãã¹ãŠã®ã¯ã©ã¹ã1ã€ã®ã¯ã©ã¹ãšããŠæ±ãããã€ããªåé¡ã¿ã¹ã¯ããåé¡ããããªããžã§ã¯ãã®ååšã«æ³šç®ããå Žåã«äŸ¿å©ã |
rect |
False |
æå°éã®ããã£ã³ã°ã®ããã«ãããæ§æãæé©åããç©åœ¢åŠç¿ãå¯èœã«ãããå¹çãšã¹ããŒããåäžããŸãããã¢ãã«ã®ç²ŸåºŠã«åœ±é¿ãäžããå¯èœæ§ããããŸãã |
cos_lr |
False |
ã³ãµã€ã³åŠç¿çã¹ã±ãžã¥ãŒã©ãå©çšãããšããã¯ã«ããã£ãŠã³ãµã€ã³æ²ç·ã«åŸã£ãŠåŠç¿çã調æŽãããããè¯ãåæã®ããã®åŠç¿ç管çã«åœ¹ç«ã€ã |
close_mosaic |
10 |
ãã¬ãŒãã³ã°å®äºåã«å®å®ããããããæåŸã®Nãšããã¯ã§ã®ã¢ã¶ã€ã¯ããŒã¿å¢å€§ãç¡å¹ã«ããã0ã«èšå®ãããšãã®æ©èœã¯ç¡å¹ã«ãªãã |
resume |
False |
æåŸã«ä¿åãããã§ãã¯ãã€ã³ããããã¬ãŒãã³ã°ãåéãã¢ãã«ã®éã¿ããªããã£ãã€ã¶ã®ç¶æ ããšããã¯ã«ãŠã³ããèªåçã«ããŒãããã·ãŒã ã¬ã¹ã«ãã¬ãŒãã³ã°ãç¶ç¶ã |
amp |
True |
èªåæ··å粟床(AMP)ãã¬ãŒãã³ã°ãå¯èœã«ãªããã¡ã¢ãªäœ¿çšéãåæžãã粟床ãžã®åœ±é¿ãæå°éã«æããªãããã¬ãŒãã³ã°ãé«éåã§ããå¯èœæ§ããããŸãã |
fraction |
1.0 |
åŠç¿ã«äœ¿çšããããŒã¿ã»ããã®å²åãæå®ããŸããå®éšããªãœãŒã¹ãéãããŠããå Žåã«äŸ¿å©ã§ãã |
profile |
False |
ãã¬ãŒãã³ã°äžã®ONNX ãšTensorRT é床ã®ãããã¡ã€ãªã³ã°ãå¯èœã«ããã¢ãã«å±éã®æé©åã«åœ¹ç«ã€ã |
freeze |
None |
ã¢ãã«ã®æåã®Nå±€ããŸãã¯ã€ã³ããã¯ã¹ã§æå®ããå±€ãããªãŒãºããåŠç¿å¯èœãªãã©ã¡ãŒã¿ã®æ°ãæžããã埮調æŽã転移åŠç¿ã«åœ¹ç«ã€ã |
lr0 |
0.01 |
åæåŠç¿ç SGD=1E-2 , Adam=1E-3 ) .ãã®å€ã調æŽããããšã¯ãæé©åããã»ã¹ã«ãšã£ãŠéåžžã«éèŠã§ãããã¢ãã«ã®éã¿ã®æŽæ°é床ã«åœ±é¿ããã |
lrf |
0.01 |
åæåŠç¿çã«å¯ŸããæçµåŠç¿çã®å²å = (lr0 * lrf )ãã¹ã±ãžã¥ãŒã©ãšçµã¿åãããŠäœ¿çšããæéçµéãšãšãã«åŠç¿çã調æŽããã |
momentum |
0.937 |
SGDã®å Žåã¯ã¢ã¡ã³ã¿ã ä¿æ°ãAdamãªããã£ãã€ã¶ã®å Žåã¯Î²1ãéå»ã®åŸé ãçŸåšã®æŽæ°ã«åæ ãããã |
weight_decay |
0.0005 |
L2æ£ååé ã¯ããªãŒããŒãã£ããã£ã³ã°ãé²ãããã«å€§ããªéã¿ã«ããã«ãã£ãäžããã |
warmup_epochs |
3.0 |
åŠç¿çã®ãŠã©ãŒã ã¢ããã®ããã®ãšããã¯æ°ãäœãå€ããåæåŠç¿çãŸã§åŸã ã«åŠç¿çãäžããŠãããæ©ã段éã§åŠç¿ãå®å®ãããã |
warmup_momentum |
0.8 |
ãŠã©ãŒã ã¢ããæã®åæã¢ã¡ã³ã¿ã ã¯ããŠã©ãŒã ã¢ããæéäžã«èšå®ãããã¢ã¡ã³ã¿ã ã«åŸã ã«èª¿æŽãããã |
warmup_bias_lr |
0.1 |
ãŠã©ãŒã ã¢ãããã§ãŒãºã«ããããã€ã¢ã¹ãã©ã¡ãŒã¿ã®åŠç¿çã¯ãåæãšããã¯ã«ãããã¢ãã«åŠç¿ãå®å®ãããã®ã«åœ¹ç«ã€ã |
box |
7.5 |
ããŠã³ãã£ã³ã°ããã¯ã¹ã®åº§æšãæ£ç¢ºã«äºæž¬ããããšã«ã©ã®çšåºŠéç¹ã眮ããã«åœ±é¿ããã |
cls |
0.5 |
å šæ倱é¢æ°ã«ãããåé¡æ倱ã®éã¿ã§ãä»ã®ã³ã³ããŒãã³ãã«å¯Ÿããæ£ããã¯ã©ã¹äºæž¬ã®éèŠæ§ã«åœ±é¿ããã |
dfl |
1.5 |
ååžãã©ãŒã«ã«ãã¹ã®éã¿ãYOLO ã®ç¹å®ã®ããŒãžã§ã³ã§ã现ããåé¡ã«äœ¿çšãããã |
pose |
12.0 |
ããŒãºæšå®çšã«åŠç¿ãããã¢ãã«ã«ãããããŒãºãã¹ã®éã¿ãããŒãºããŒãã€ã³ããæ£ç¢ºã«äºæž¬ããããšã«éç¹ã眮ãããŠããããšã圱é¿ããŠããã |
kobj |
2.0 |
ããŒãºæšå®ã¢ãã«ã«ãããããŒãã€ã³ãã®ãªããžã§ã¯ããã¹æ倱ã®éã¿ãæ€åºä¿¡é ŒåºŠãšããŒãºç²ŸåºŠã®ãã©ã³ã¹ã |
label_smoothing |
0.0 |
ã©ãã«ã¹ã ãŒãžã³ã°ãé©çšããããŒãã©ãã«ãã¿ãŒã²ããã©ãã«ãšã©ãã«äžã®äžæ§ååžã®æ··åã«æãããããããšã§ãæ±åãæ¹åããããšãã§ããã |
nbs |
64 |
ãã¹ãæ£èŠåããããã®å ¬ç§°ããããµã€ãºã |
overlap_mask |
True |
ãªããžã§ã¯ãã®ãã¹ã¯ããã¬ãŒãã³ã°çšã«1ã€ã®ãã¹ã¯ã«ããŒãžãããããªããžã§ã¯ãããšã«å¥ã ã«ãããã決å®ããŸãããªãŒããŒã©ããããå Žåãå°ãããã¹ã¯ã¯ããŒãžæã«å€§ãããã¹ã¯ã®äžã«ãªãŒããŒã¬ã€ãããŸãã |
mask_ratio |
4 |
ã»ã°ã¡ã³ããŒã·ã§ã³ãã¹ã¯ã®ããŠã³ãµã³ãã«æ¯ããã¬ãŒãã³ã°æã«äœ¿çšãããã¹ã¯ã®è§£å床ã«åœ±é¿ããã |
dropout |
0.0 |
åé¡ã¿ã¹ã¯ã«ãããæ£ååã®ããã®ããããã¢ãŠãçããã¬ãŒãã³ã°äžã«ãŠããããã©ã³ãã ã«çç¥ããããšã§ãªãŒããŒãã£ããã£ã³ã°ãé²ãã |
val |
True |
ãã¬ãŒãã³ã°äžã«æ€èšŒãæå¹ã«ããå¥ã®ããŒã¿ã»ããã§ã¢ãã«ã®æ§èœãå®æçã«è©äŸ¡ã§ããããã«ããã |
plots |
False |
äºæž¬äŸã ãã§ãªããèšç·Žãšæ€èšŒã®ã¡ããªã¯ã¹ã®ãããããçæããŠä¿åããããšã§ãã¢ãã«ã®ããã©ãŒãã³ã¹ãšåŠç¿ã®é²è¡ã«é¢ããèŠèŠçãªæŽå¯ãæäŸããŸãã |
ããããµã€ãºèšå®ã«é¢ãã泚æäºé
ã«ã€ã㊠batch
åŒæ°ã¯3ã€ã®æ¹æ³ã§èšå®ã§ããïŒ
- åºå®ããããµã€ãº:æŽæ°å€ãèšå®ããïŒäŸïŒ
batch=16
)ãããããããã®ç»åæ°ãçŽæ¥æå®ããã - ãªãŒãã¢ãŒã (60%GPU ã¡ã¢ãªãŒ):çšé
batch=-1
ã䜿çšããŠãCUDA ã¡ã¢ãªäœ¿çšçãçŽ 60% ã«ãªãããã«ããããµã€ãºãèªåçã«èª¿æŽããŸãã - å©çšçã«ãããªãŒãã¢ãŒã:端æ°å€ãèšå®ããïŒäŸïŒ
batch=0.70
) ã䜿ã£ãŠãGPU ã¡ã¢ãªäœ¿çšéã®æå®ãããå²åã«åºã¥ããŠããããµã€ãºã調æŽããã
ãªãŒã°ã¡ã³ããŒã·ã§ã³ã®èšå®ãšãã€ããŒãã©ã¡ãŒã¿
ãªãŒã°ã¡ã³ããŒã·ã§ã³æè¡ã¯ãåŠç¿ããŒã¿ã«å¯å€æ§ãå°å ¥ããããšã§ãYOLO ã¢ãã«ã®ããã¹ãæ§ãšããã©ãŒãã³ã¹ãåäžãããã¢ãã«ãæªç¥ã®ããŒã¿ã«å¯ŸããŠããè¯ãæ±åã§ããããã«ããããã«äžå¯æ¬ ã§ãã以äžã®è¡šã¯ãããããã®ãªãŒã°ã¡ã³ããŒã·ã§ã³ã®ç®çãšå¹æã®æŠèŠã§ãïŒ
è°è« | ã¿ã€ã | ããã©ã«ã | ã¬ã³ãž | 説æ |
---|---|---|---|---|
hsv_h |
float |
0.015 |
0.0 - 1.0 |
ç»åã®è²çžãã«ã©ãŒãã€ãŒã«ã®æ°åã®äžã ã調æŽããè²ã®ã°ãã€ããå°å ¥ããŸããç°ãªãç §ææ¡ä»¶ã§ã®ã¢ãã«ã®äžè¬åãå©ããŸãã |
hsv_s |
float |
0.7 |
0.0 - 1.0 |
ç»åã®åœ©åºŠãã»ãã®å°ãå€åãããè²ã®æ¿ãã«åœ±é¿ãäžããŸããç°ãªãç°å¢æ¡ä»¶ãã·ãã¥ã¬ãŒãããã®ã«äŸ¿å©ã§ãã |
hsv_v |
float |
0.4 |
0.0 - 1.0 |
ç»åã®å€ïŒæããïŒãå°æ°ã§å€æŽããããŸããŸãªç §ææ¡ä»¶äžã§ã¢ãã«ãããŸãæ©èœããããã«ããŸãã |
degrees |
float |
0.0 |
-180 - +180 |
æå®ãã床æ°ã®ç¯å²å ã§ç»åãã©ã³ãã ã«å転ãããããŸããŸãªåãã®ãªããžã§ã¯ããèªèããã¢ãã«ã®èœåãåäžãããŸãã |
translate |
float |
0.1 |
0.0 - 1.0 |
ç»åãæ°Žå¹³æ¹åãšåçŽæ¹åã«ç»åãµã€ãºã®æ°åã®äžã ãå¹³è¡ç§»åãããéšåçã«èŠããç©äœãæ€åºããåŠç¿ã«åœ¹ç«ãŠãã |
scale |
float |
0.5 |
>=0.0 |
ã²ã€ã³ä¿æ°ã§ç»åãã¹ã±ãŒãªã³ã°ããã«ã¡ã©ããç°ãªãè·é¢ã«ããç©äœãã·ãã¥ã¬ãŒãããã |
shear |
float |
0.0 |
-180 - +180 |
ç»åãæå®ããè§åºŠã§åæããç©äœãç°ãªãè§åºŠããèŠããšãã®å¹æãæš¡å£ããã |
perspective |
float |
0.0 |
0.0 - 0.001 |
ç»åã«ã©ã³ãã ãªéèŠå€æãé©çšãã3D空éã®ãªããžã§ã¯ããç解ããã¢ãã«ã®èœåãé«ããã |
flipud |
float |
0.0 |
0.0 - 1.0 |
æå®ããã確çã§ç»åãäžäžå転ããã察象ç©ã®ç¹æ§ã«åœ±é¿ãäžããããšãªãããŒã¿ã®ã°ãã€ãã倧ããããã |
fliplr |
float |
0.5 |
0.0 - 1.0 |
å·Šå³å¯Ÿç§°ã®ãªããžã§ã¯ããåŠç¿ããããããŒã¿ã»ããã®å€æ§æ§ãé«ãããããã®ã«åœ¹ç«ã€ã |
bgr |
float |
0.0 |
0.0 - 1.0 |
æå®ãã確çã§ç»åãã£ã³ãã«ãRGBããBGRã«å転ãããŸãã誀ã£ããã£ã³ãã«é åºã«å¯Ÿããããã¹ãæ§ãé«ããã®ã«åœ¹ç«ã¡ãŸãã |
mosaic |
float |
1.0 |
0.0 - 1.0 |
4æã®ãã¬ãŒãã³ã°ç»åã1æã«åæããç°ãªãã·ãŒã³ã®æ§æããªããžã§ã¯ãã®çžäºäœçšãã·ãã¥ã¬ãŒããè€éãªã·ãŒã³ã®ç解ã«é«ãå¹æãçºæ®ã |
mixup |
float |
0.0 |
0.0 - 1.0 |
2ã€ã®ç»åãšãã®ã©ãã«ããã¬ã³ãããåæç»åãäœæããŸããã©ãã«ãã€ãºãèŠèŠçãªã°ãã€ããå°å ¥ããããšã§ãã¢ãã«ã®æ±åèœåãé«ããã |
copy_paste |
float |
0.0 |
0.0 - 1.0 |
ãªããžã§ã¯ãã®ã€ã³ã¹ã¿ã³ã¹ãå¢ããããããªããžã§ã¯ãã®ãªã¯ã«ãŒãžã§ã³ãåŠç¿ãããããã®ã«äŸ¿å©ã§ãã |
copy_paste_mode |
str |
flip |
- | ã®ãªãã·ã§ã³ã®äžããã³ããŒããŒã¹ãå¢åŒ·æ³ãéžæããã"flip" , "mixup" ). |
auto_augment |
str |
randaugment |
- | äºåã«å®çŸ©ãããè£åŒ·ããªã·ãŒ(randaugment , autoaugment , augmix )ãèŠèŠçç¹åŸŽãå€æ§åããããšã§åé¡ã¿ã¹ã¯ãæé©åããã |
erasing |
float |
0.4 |
0.0 - 0.9 |
åé¡ãã¬ãŒãã³ã°äžã«ç»åã®äžéšãã©ã³ãã ã«æ¶å»ããã¢ãã«ãèªèã®ããã«ããŸãç®ç«ããªãç¹åŸŽã«éäžããããä¿ãã |
crop_fraction |
float |
1.0 |
0.1 - 1.0 |
äžå¿ã®ç¹åŸŽã匷調ãããªããžã§ã¯ãã®ã¹ã±ãŒã«ã«é©å¿ããèæ¯ã®ä¹±ãã軜æžããããã«ãåé¡ç»åããã®ãµã€ãºã®ã»ãã®äžéšã«åãåããŸãã |
ãããã®èšå®ã¯ãããŒã¿ã»ãããšæå ã®ã¿ã¹ã¯ã®ç¹å®ã®èŠä»¶ãæºããããã«èª¿æŽããããšãã§ããŸããç°ãªãå€ã§å®éšããããšã§ãæè¯ã®ã¢ãã«æ§èœã«ã€ãªããæé©ãªãªãŒã°ã¡ã³ããŒã·ã§ã³æŠç¥ãèŠã€ããããšãã§ããŸãã
ã€ã³ãã©ã¡ãŒã·ã§ã³
ãã¬ãŒãã³ã°è£åŒ·äœæŠã®è©³çŽ°ã«ã€ããŠã¯ãåèã»ã¯ã·ã§ã³ãåç §ã®ããšã
ãã®ã³ã°
YOLO11 ã¢ãã«ã®ãã¬ãŒãã³ã°ã«ãããŠãæéã®çµéãšãšãã«ã¢ãã«ã®ããã©ãŒãã³ã¹ã远跡ããããšã¯äŸ¡å€ããããšæããããããããªããããã§ãã®ã³ã°ã掻èºãããUltralytics'YOLO ã¯ãComet ãClearML ãTensorBoard ã®3çš®é¡ã®ãã¬ãŒããµããŒãããŠããã
ãã¬ãŒã䜿çšããã«ã¯ãäžã®ã³ãŒãã¹ããããã®ããããããŠã³ã¡ãã¥ãŒããéžæããå®è¡ããŸããéžæãããã¬ãŒãã€ã³ã¹ããŒã«ãããåæåãããŸãã
Comet
Cometã¯ãããŒã¿ãµã€ãšã³ãã£ã¹ããéçºè ãå®éšãã¢ãã«ã远跡ãæ¯èŒã説æãæé©åã§ãããã©ãããã©ãŒã ã§ãããªã¢ã«ã¿ã€ã ã®ã¡ããªã¯ã¹ãã³ãŒãã®å·®åããã€ããŒãã©ã¡ãŒã¿ã®ãã©ããã³ã°ãªã©ã®æ©èœãæäŸããŸãã
Comet ã䜿çšããïŒ
ãŠã§ããµã€ãããComet ã®ã¢ã«ãŠã³ãã«ãµã€ã³ã€ã³ããAPIããŒãååŸããããšãå¿ããã«ããããç°å¢å€æ°ãã¹ã¯ãªããã«è¿œå ããŠãå®éšã®ãã°ãåãå¿ èŠããããŸãã
ClearML
ClearMLã¯ãå®éšã®ãã©ããã³ã°ãèªååãããªãœãŒã¹ã®å¹ççãªå ±æãæ¯æŽãããªãŒãã³ãœãŒã¹ã®ãã©ãããã©ãŒã ã§ãããããŒã ãMLäœæ¥ãããå¹ççã«ç®¡çãå®è¡ãåçŸã§ããããã«èšèšãããŠããã
ClearML ã䜿çšããïŒ
ãã®ã¹ã¯ãªãããå®è¡ããåŸããã©ãŠã¶ã§ClearML ã¢ã«ãŠã³ãã«ãµã€ã³ã€ã³ããã»ãã·ã§ã³ãèªèšŒããå¿ èŠããããŸãã
ãã³ãœã«ããŒã
TensorBoardã¯ã以äžã®ããã®å¯èŠåããŒã«ãããã§ãã TensorFlow.ããã«ãããTensorFlow ã°ã©ããèŠèŠåããããã°ã©ãã®å®è¡ã«é¢ããå®éçãªã¡ããªã¯ã¹ãããããããããã°ã©ããééããç»åãªã©ã®è¿œå ããŒã¿ã衚瀺ãããããããšãã§ããŸãã
TensorBoard ãGoogle ColabïŒ
TensorBoardãããŒã«ã«ã§äœ¿çšããã«ã¯ã以äžã®ã³ãã³ããå®è¡ããçµæãhttp://localhost:6006/ã
ããã«ãããTensorBoardãããŒãããããã¬ãŒãã³ã°ãã°ãä¿åãããŠãããã£ã¬ã¯ããªã«ç§»åããŸãã
ãã¬ãŒãèšå®ããåŸãã¢ãã«ã®ãã¬ãŒãã³ã°ãé²ããããšãã§ããŸãããã¹ãŠã®ãã¬ãŒãã³ã°ã¡ããªã¯ã¹ã¯ãéžæãããã©ãããã©ãŒã ã«èªåçã«èšé²ããããããã®ãã°ã«ã¢ã¯ã»ã¹ããŠãæéã®çµéãšãšãã«ã¢ãã«ã®ããã©ãŒãã³ã¹ãç£èŠããç°ãªãã¢ãã«ãæ¯èŒããæ¹åãã¹ãé åãç¹å®ããããšãã§ããŸãã
ããããã質å
Ultralytics YOLO11 ã䜿ã£ãç©äœæ€åºã¢ãã«ã®åŠç¿æ¹æ³ã¯ïŒ
Ultralytics YOLO11 ã䜿ã£ãŠç©äœæ€åºã¢ãã«ãåŠç¿ããã«ã¯ãPython API ãŸãã¯CLI ã®ã©ã¡ããã䜿ãããšãã§ããã 以äžã«äž¡æ¹ã®äŸã瀺ãïŒ
ã·ã³ã°ã«GPU ãCPU ãã¬ãŒãã³ã°äŸ
詳现ã«ã€ããŠã¯ãåè»èšå®ã®ã»ã¯ã·ã§ã³ãåç §ããŠãã ããã
Ultralytics YOLO11 ããã¬ã€ã³ã¢ãŒããã®äž»ãªç¹åŸŽã¯ïŒ
Ultralytics YOLO11 ããã¬ã€ã³ãã¢ãŒãã®äž»ãªç¹åŸŽã¯ä»¥äžã®éãïŒ
- ããŒã¿ã»ããã®èªåããŠã³ããŒãCOCOãVOCãImageNetãªã©ã®æšæºããŒã¿ã»ãããèªåçã«ããŠã³ããŒãããŸãã
- ãã«ãGPU ãµããŒãïŒè€æ°ã®GPUã§ãã¬ãŒãã³ã°ãã¹ã±ãŒã«ãããããé«éãªåŠçãå®çŸã
- ãã€ããŒãã©ã¡ãŒã¿ã®èšå®ïŒYAML ãã¡ã€ã«ãŸãã¯CLI åŒæ°ã§ãã€ããŒãã©ã¡ãŒã¿ãã«ã¹ã¿ãã€ãºã
- å¯èŠåãšã¢ãã¿ãªã³ã°ïŒããè¯ãæŽå¯ã®ããã®ãã¬ãŒãã³ã°ã¡ããªã¯ã¹ã®ãªã¢ã«ã¿ã€ã ãã©ããã³ã°ã
ãããã®æ©èœã«ããããã¬ãŒãã³ã°ãå¹ççã«è¡ããããŒãºã«åãããŠã«ã¹ã¿ãã€ãºããããšãã§ããŸãã詳现ã«ã€ããŠã¯ããã¬ã€ã³ã¢ãŒãã®äž»ãªæ©èœã®ã»ã¯ã·ã§ã³ãã芧ãã ããã
Ultralytics YOLO11 ã§äžæããã»ãã·ã§ã³ãããã¬ãŒãã³ã°ãåéããã«ã¯ã©ãããã°ããã§ããïŒ
äžæããã»ãã·ã§ã³ãããã¬ãŒãã³ã°ãåéããã«ã¯ resume
åŒæ° True
ãéžæããæåŸã«ä¿åãããã§ãã¯ãã€ã³ããžã®ãã¹ãæå®ããã
å±¥æŽæžãã¬ãŒãã³ã°ã®äŸ
詳ããã¯ãäžæããããã¬ãŒãã³ã°ã®åéãã®ã»ã¯ã·ã§ã³ãã芧ãã ããã
YOLO11 ãã¢ããã«ã®ã·ãªã³ã³ãããã§ã¢ãã«ããã¬ãŒãã³ã°ã§ããŸããïŒ
ã¯ããUltralytics YOLO11 ã¯ãMetal Performance Shaders (MPS) ãã¬ãŒã ã¯ãŒã¯ãå©çšããAppleã·ãªã³ã³ãããã§ã®ãã¬ãŒãã³ã°ããµããŒãããŠããŸãããã¬ãŒãã³ã°ããã€ã¹ãšããŠãmps ããæå®ããŠãã ããã
MPS ãã¬ãŒãã³ã°äŸ
詳现ã«ã€ããŠã¯ãApple SiliconMPS Trainingã»ã¯ã·ã§ã³ãåç §ããŠãã ããã
äžè¬çãªãã¬ãŒãã³ã°ã®èšå®ãšãã®æ¹æ³ã¯ïŒ
Ultralytics YOLO11 ã§ã¯ããããã»ãµã€ãºãåŠç¿çããšããã¯æ°ãªã©ãæ§ã ãªåŠç¿èšå®ãåŒæ°ã§èšå®ããããšãã§ããã以äžã¯ãã®æŠèŠã§ããïŒ
è°è« | ããã©ã«ã | 説æ |
---|---|---|
model |
None |
ãã¬ãŒãã³ã°çšã¢ãã«ãã¡ã€ã«ãžã®ãã¹ã |
data |
None |
ããŒã¿ã»ããèšå®ãã¡ã€ã«ãžã®ãã¹ïŒäŸïŒ coco8.yaml ). |
epochs |
100 |
ãã¬ãŒãã³ã°ãšããã¯ã®ç·æ°ã |
batch |
16 |
ããããµã€ãºã¯ãæŽæ°ãŸãã¯èªåã¢ãŒããšããŠèª¿æŽå¯èœã |
imgsz |
640 |
ãã¬ãŒãã³ã°ã®ã¿ãŒã²ããç»åãµã€ãºã |
device |
None |
ãã¬ãŒãã³ã°çšã®èšç®æ© cpu , 0 , 0,1 ããã㯠mps . |
save |
True |
ãã¬ãŒãã³ã°ã®ãã§ãã¯ãã€ã³ããšæçµçãªã¢ãã«ã®éã¿ãä¿åã§ããããã«ããŸãã |
ãã¬ãŒãã³ã°èšå®ã®è©³çŽ°ã«ã€ããŠã¯ããã¬ãŒãã³ã°èšå®ã®ã»ã¯ã·ã§ã³ãã芧ãã ããã