ãã¬ãŒãã³ã°YOLO11 withClearML: MLOps ã¯ãŒã¯ãããŒã®åçå
MLOpsã¯ãå®ç°å¢ã«ãããæ©æ¢°åŠç¿ã¢ãã«ã®äœæãšãããã€ã®ã®ã£ãããåãããã®ã§ããMLOpsã¯ãå¹ççãªãããã€ã¡ã³ããã¹ã±ãŒã©ããªãã£ãç¶ç¶çãªç®¡çã«éç¹ã眮ããã¢ãã«ãå®çšçãªã¢ããªã±ãŒã·ã§ã³ã§åªããããã©ãŒãã³ã¹ãçºæ®ã§ããããã«ããŸãã
Ultralytics YOLO11ã¯ãClearML ãšç°¡åã«çµ±åã§ããç©äœæ€åºã¢ãã«ã®ãã¬ãŒãã³ã°ãšç®¡çãåçåãã匷åããŸãããã®ã¬ã€ãã§ã¯ãClearML ã®ã»ããã¢ããæ¹æ³ãå®éšã®ç®¡çæ¹æ³ãã¢ãã«ç®¡çã®èªååæ¹æ³ãå¹æçãªã³ã©ãã¬ãŒã·ã§ã³æ¹æ³ã«ã€ããŠè©³ãã説æããŸãã
ClearML
ClearMLã¯ãæ©æ¢°åŠç¿ã¯ãŒã¯ãããŒãèªååãç£èŠããªãŒã±ã¹ãã¬ãŒã·ã§ã³ããããã«å·§ã¿ã«èšèšãããé©æ°çãªãªãŒãã³ãœãŒã¹ã®MLOpsãã©ãããã©ãŒã ã§ãããã®äž»ãªæ©èœã«ã¯ãå®éšã®å®å šãªåçŸæ§ãå®çŸããããã®ãã¹ãŠã®åŠç¿ããŒã¿ãšæšè«ããŒã¿ã®èªåãã®ã³ã°ãç°¡åãªããŒã¿å¯èŠåãšåæã®ããã®çŽæçãªWeb UIãé«åºŠãªãã€ããŒãã©ã¡ãŒã¿æé©åã¢ã«ãŽãªãºã ãããŸããŸãªãã©ãããã©ãŒã ãžã®å¹ççãªãããã€ã®ããã®å ç¢ãªã¢ãã«ç®¡çãªã©ããããŸãã
YOLO11 ãã¬ãŒãã³ã°ClearML
YOLO11 ãšClearML ãçµ±åããããšã§ããã¬ãŒãã³ã°ããã»ã¹ãæ¹åããæ©æ¢°åŠç¿ã¯ãŒã¯ãããŒã«èªååãšå¹çåãããããããšãã§ããŸãã
ã€ã³ã¹ããŒã«
å¿ èŠãªããã±ãŒãžãã€ã³ã¹ããŒã«ããã«ã¯
ã€ã³ã¹ããŒã«
ã€ã³ã¹ããŒã«ããã»ã¹ã«é¢ãã詳现ãªèª¬æãšãã¹ããã©ã¯ãã£ã¹ã«ã€ããŠã¯ãYOLO11 ã€ã³ã¹ããŒã«ã¬ã€ããã芧ãã ãããYOLO11 ã«å¿ èŠãªããã±ãŒãžã®ã€ã³ã¹ããŒã«äžã«ãäœããã®åé¡ãçºçããå Žåã¯ã解決çãšãã³ãã«ã€ããŠãããããåé¡ã¬ã€ããåç §ããŠãã ããã
èšå®ClearML
å¿ èŠãªããã±ãŒãžãã€ã³ã¹ããŒã«ãããã次ã®ã¹ãããã¯ClearML SDK ã®åæåãšèšå®ã§ããããã«ã¯ãClearML ã¢ã«ãŠã³ãã®èšå®ãšãéçºç°å¢ãšClearML ãµãŒããŒéã®ã·ãŒã ã¬ã¹ãªæ¥ç¶ã«å¿ èŠãªèªèšŒæ å ±ã®ååŸãå«ãŸããŸãã
ClearML SDKãããªãã®ç°å¢ã§åæåããããšããå§ããŸããclearml-init'ã³ãã³ãã¯ã»ããã¢ããããã»ã¹ãéå§ããå¿ èŠãªèªèšŒæ å ±ã®å ¥åãä¿ããŸãã
ãã®ã³ãã³ããå®è¡ããåŸãClearML èšå®ããŒãžã«ã¢ã¯ã»ã¹ãããå³äžã«ç§»åãã"Settings "ãéžæãããWorkspace" ã»ã¯ã·ã§ã³ã«ç§»åãã"Create new credentials" ãã¯ãªãã¯ãããJupyter Notebook ãŸãã¯ããŒã«ã«ã®Python ç°å¢ã®ã©ã¡ãã§ClearML ãèšå®ãããã«å¿ããŠã"Create Credentials" ãããã¢ããã§æäŸãããè³æ Œæ å ±ã䜿çšããŠãæ瀺ããããšããã«èšå®ãå®äºããã
䜿çšæ¹æ³
䜿ãæ¹ã®èª¬æã«å ¥ãåã«ã Ultralytics ãæäŸããYOLO11 ã¢ãã«ã®ã©ã€ã³ããããã確èªãã ãããããã¯ãããªãã®ãããžã§ã¯ãã®èŠä»¶ã«æãé©ããã¢ãã«ãéžæããã®ã«åœ¹ç«ã¡ãŸãã
䜿çšæ¹æ³
from clearml import Task
from ultralytics import YOLO
# Step 1: Creating a ClearML Task
task = Task.init(project_name="my_project", task_name="my_yolov8_task")
# Step 2: Selecting the YOLO11 Model
model_variant = "yolo11n"
task.set_parameter("model_variant", model_variant)
# Step 3: Loading the YOLO11 Model
model = YOLO(f"{model_variant}.pt")
# Step 4: Setting Up Training Arguments
args = dict(data="coco8.yaml", epochs=16)
task.connect(args)
# Step 5: Initiating Model Training
results = model.train(**args)
ã³ãŒããç解ãã
äžã®ã³ãŒãã»ã¹ããããã§çŽ¹ä»ãããŠããæé ãç解ãããã
ã¹ããã1ïŒClearML ã¿ã¹ã¯ã®äœæïŒClearML ã§æ°ããã¿ã¹ã¯ãåæåãããããžã§ã¯ãåãšã¿ã¹ã¯åãæå®ããããã®ã¿ã¹ã¯ã¯ã¢ãã«ã®ãã¬ãŒãã³ã°ã远跡ã»ç®¡çããŸãã
ã¹ããã2ïŒYOLO11 ã¢ãã«ã®éžæ:ã«ã€ã㊠model_variant
å€æ°ã¯YOLO11 ã¢ãã«ã®äžã€ã§ãããyolo11nãã«èšå®ãããããã® variant ã¯è¿œè·¡ã®ããã«ClearML ã«èšé²ãããŸãã
ã¹ããã3ïŒYOLO11 ã¢ãã«ã®ããŒãïŒéžæãããYOLO11 ã¢ãã«ã¯ãUltralytics'YOLO ã¯ã©ã¹ã䜿çšããŠããŒãããããã¬ãŒãã³ã°ã®æºåãããŸãã
ã¹ããã4ïŒãã¬ãŒãã³ã°ã®è«ç¹ãèšå®ãã:ããŒã¿ã»ãã (coco8.yaml
ã®æ°ïŒãš æ代 (16
)ã¯èŸæžã«æŽçãããClearML ã¿ã¹ã¯ã«æ¥ç¶ããããããã«ãã£ãŠãClearML UIãä»ãã远跡ãšæœåšçãªä¿®æ£ãå¯èœã«ãªããã¢ãã«ãã¬ãŒãã³ã°ããã»ã¹ãšãã¹ããã©ã¯ãã£ã¹ã®è©³çŽ°ã«ã€ããŠã¯ãæã
ã® YOLO11 ã¢ãã«ã»ãã¬ãŒãã³ã°ã»ã¬ã€ã.
ã¹ããã5ïŒã¢ãã«ãã¬ãŒãã³ã°ã®éå§:æå®ãããåŒæ°ã§ã¢ãã«åŠç¿ãéå§ããããã¬ãŒãã³ã°ã®çµæ㯠results
å€æ°ã§ããã
ã¢ãŠãããããç解ãã
äžèšã®ã³ãŒãã»ã¹ãããããå®è¡ãããšã次ã®ãããªåºåãæåŸ ã§ããïŒ
- æ°ããClearML ã¿ã¹ã¯ã®äœæã瀺ã確èªã¡ãã»ãŒãžãšããã®äžæã®IDã
- ã³ãŒãã®å®è¡ãClearML ã«ãã£ãŠè¿œè·¡ãããŠããããšã瀺ããä¿åãããŠããã¹ã¯ãªããã³ãŒãã«é¢ããæ å ±ã¡ãã»ãŒãžã
- ãã¬ãŒãã³ã°ã®é²æç¶æ³ã確èªãã詳现ãªãã°ãé²èŠ§ã§ããClearML çµæããŒãžãžã®URLãªã³ã¯ã
- YOLO11 ã¢ãã«ãšæå®ãããããŒã¿ã»ããã®é²æç¶æ³ãããŠã³ããŒãããç¶ããŠã¢ãã«ã»ã¢ãŒããã¯ãã£ãšãã¬ãŒãã³ã°æ§æã®æŠèŠã衚瀺ããŸãã
- TensorBoardãAutomaticMixed Precision(AMP)ãããŒã¿ã»ããã®æºåãªã©ãããŸããŸãªãã¬ãŒãã³ã°ã³ã³ããŒãã³ãã®åæåã¡ãã»ãŒãžã
- æåŸã«ãæå®ãããããŒã¿ã»ããäžã§ã¢ãã«ãåŠç¿ããã«ã€ããŠé²æãæŽæ°ãããåŠç¿ããã»ã¹ãéå§ãããŸãããã¬ãŒãã³ã°äžã«äœ¿çšãããããã©ãŒãã³ã¹ã»ã¡ããªã¯ã¹ã®è©³çŽ°ã«ã€ããŠã¯ãããã©ãŒãã³ã¹ã»ã¡ããªã¯ã¹ã®ã¬ã€ãããèªã¿ãã ããã
ClearML çµæããŒãžã®è¡šç€º
䜿çšæ³ã³ãŒãã¹ããããã®åºåã«ããClearML çµæããŒãžãžã®URLãªã³ã¯ãã¯ãªãã¯ãããšãã¢ãã«ã®ãã¬ãŒãã³ã°ããã»ã¹ã®å æ¬çãªãã¥ãŒã«ã¢ã¯ã»ã¹ã§ããŸãã
ClearML çµæããŒãžã®äž»ãªç¹åŸŽ
-
ãªã¢ã«ã¿ã€ã ã»ã¡ããªãã¯ã¹ã»ãã©ããã³ã°
- æ倱ã粟床ãæ€èšŒã¹ã³ã¢ãªã©ã®éèŠãªã¡ããªã¯ã¹ããçºçæã«è¿œè·¡ããŸãã
- ã¿ã€ã ãªãŒãªã¢ãã«æ§èœèª¿æŽã®ããã®å³æãã£ãŒãããã¯ãæäŸããŸãã
-
å®éšæ¯èŒ
- ç°ãªããã¬ãŒãã³ã°ã䞊ã¹ãŠæ¯èŒããã
- ãã€ããŒãã©ã¡ãŒã¿ã®ãã¥ãŒãã³ã°ãšæãå¹æçãªã¢ãã«ã®ç¹å®ã«äžå¯æ¬ ã
-
詳现ãã°ãšåºå
- å æ¬çãªãã°ãã¡ããªã¯ã¹ã®ã°ã©ã衚瀺ãã³ã³ãœãŒã«åºåã«ã¢ã¯ã»ã¹ã§ããŸãã
- ã¢ãã«ã®è¡åãšåé¡è§£æ±ºã«ã€ããŠç解ãæ·±ããã
-
è³æºå©çšã¢ãã¿ãªã³ã°
- CPU ãGPU ãã¡ã¢ãªãªã©ã®èšç®ãªãœãŒã¹ã®å©çšç¶æ³ãç£èŠããã
- ãã¬ãŒãã³ã°ã®å¹çãšã³ã¹ããæé©åããéµ
-
ã¢ãã«ææç©ç®¡ç
- åŠç¿æžã¿ã¢ãã«ããã§ãã¯ãã€ã³ããªã©ã®ã¢ãã«ææç©ã衚瀺ãããŠã³ããŒããå ±æã§ããŸãã
- ã³ã©ãã¬ãŒã·ã§ã³ã匷åããã¢ãã«ã®å±éãšå ±æãåçåããŸãã
ClearML çµæããŒãžãã©ã®ãããªãã®ããèŠèŠçãªãŠã©ãŒã¯ã¹ã«ãŒã¯ä»¥äžã®ãããªãã芧ãã ããïŒ
èŠããã ïŒ YOLO11 MLOpsã®çµ±åClearML
ã®é«åºŠãªæ©èœClearML
ClearML ã«ã¯ãMLOpsäœéšãåäžãããããã€ãã®é«åºŠãªæ©èœããããŸãã
ãªã¢ãŒãå®è¡
ClearMLã®ãªã¢ãŒãå®è¡æ©èœã¯ãç°ãªããã·ã³äžã§ã®å®éšã®åçŸãšæäœã容æã«ãããã€ã³ã¹ããŒã«ãããããã±ãŒãžãã³ããããããŠããªãå€æŽã®ãããªéèŠãªè©³çŽ°ããã°ã«èšé²ãããã¿ã¹ã¯ããšã³ãã¥ãŒããããšãClearML ãšãŒãžã§ã³ããããããã«ããç°å¢ãåäœæããŠå®éšãå®è¡ãã詳现ãªçµæãå ±åããã
ClearML ãšãŒãžã§ã³ãã®ãããã€ã¯ç°¡åã§ã以äžã®ã³ãã³ãã䜿çšããŠããŸããŸãªãã·ã³ã§å®è¡ã§ããïŒ
ãã®èšå®ã¯ãã¯ã©ãŠãVMãããŒã«ã«GPUããŸãã¯ã©ãããããã«é©çšã§ããŸããClearML ãªãŒãã¹ã±ãŒã©ã¯ãAWSãGCPãAzureãªã©ã®ãã©ãããã©ãŒã äžã®ã¯ã©ãŠãã¯ãŒã¯ããŒãã®ç®¡çãæ¯æŽãããšãŒãžã§ã³ãã®ãããã€ãèªååãããªãœãŒã¹äºç®ã«åºã¥ããŠãªãœãŒã¹ã調æŽããŸãã
ã¯ããŒã³ãç·šéããšã³ãã¥ãŒ
ClearMLã®ãŠãŒã¶ãŒãã¬ã³ããªãŒãªã€ã³ã¿ãŒãã§ãŒã¹ã«ãããã¿ã¹ã¯ã®ã¯ããŒã³äœæãç·šéããã¥ãŒã€ã³ã°ãç°¡åã«è¡ããããŠãŒã¶ãŒã¯æ¢åã®å®éšã®ã¯ããŒã³ãäœæããUIãããã©ã¡ãŒã¿ããã®ä»ã®è©³çŽ°ã調æŽããã¿ã¹ã¯ã®å®è¡ãéå§ããããšãã§ããŸãããã®åçåãããããã»ã¹ã«ãããã¿ã¹ã¯ãå®è¡ããClearML ãšãŒãžã§ã³ããæŽæ°ãããèšå®ã䜿çšããããšãä¿èšŒãããå埩çãªå®éšãšã¢ãã«ã®åŸ®èª¿æŽã«çæ³çã§ãã
æŠèŠ
ãã®ã¬ã€ãã§ã¯ãClearML ãšUltralytics'YOLO11 ãçµ±åããããã»ã¹ã説æããŸãããåæã»ããã¢ããããé«åºŠãªã¢ãã«ç®¡çãŸã§ãã¹ãŠãã«ããŒããæ©æ¢°åŠç¿ãããžã§ã¯ãã«ãããå¹ççãªãã¬ãŒãã³ã°ãå®éšè¿œè·¡ãã¯ãŒã¯ãããŒã®æé©åã®ããã«ClearML ã掻çšããæ¹æ³ãçºèŠããŠããã ããŸããã
䜿ãæ¹ã®è©³çŽ°ã«ã€ããŠã¯ãClearML ã®å ¬åŒããã¥ã¡ã³ããã芧ãã ããã
ããã«ãUltralytics ã®çµ±åã¬ã€ãããŒãžã§ã¯ãUltralytics ã®ãã®ä»ã®çµ±åãæ©èœã«ã€ããŠèª¿ã¹ãããšãã§ããŸãã ã¯ããªãœãŒã¹ãèŠèã®å®åº«ã§ãã
ããããã質å
Ultralytics YOLO11 ãClearML ãšçµ±åããããã»ã¹ã¯ïŒ
Ultralytics YOLO11 ãšClearML ã®çµ±åã«ã¯ãMLOps ã®ã¯ãŒã¯ãããŒãåçåããããã®äžé£ã®ã¹ããããå¿ èŠã§ãããŸããå¿ èŠãªããã±ãŒãžãã€ã³ã¹ããŒã«ããïŒ
次ã«ãClearML SDKãã䜿ãã®ç°å¢ã§åæåããïŒ
ãã®åŸãClearML Settings ããŒãžãããããªãã®èªèšŒæ å ±ã䜿ã£ãŠClearML ãèšå®ããŸããã¢ãã«ã®éžæãšãã¬ãŒãã³ã°èšå®ãå«ãã»ããã¢ããããã»ã¹å šäœã®è©³çŽ°ãªèª¬æã¯ãYOLO11 ã¢ãã«ãã¬ãŒãã³ã°ã¬ã€ãã«èšèŒãããŠããŸãã
ãªãæ©æ¢°åŠç¿ãããžã§ã¯ãã«Ultralytics YOLO11 ã䜿ã£ãŠClearML ã䜿ãã¹ããªã®ãïŒ
Ultralytics YOLO11 ãšå ±ã«ClearML ã䜿çšãããšãå®éšè¿œè·¡ã®èªååãã¯ãŒã¯ãããŒã®åçåãããã³å ç¢ãªã¢ãã«ç®¡çãå¯èœã«ããããšã§ãæ©æ¢°åŠç¿ãããžã§ã¯ãã匷åãããŸããClearML ã¯ããªã¢ã«ã¿ã€ã ã®ã¡ããªã¯ã¹è¿œè·¡ããªãœãŒã¹äœ¿çšçã®ã¢ãã¿ãªã³ã°ãããã³å®éšãæ¯èŒããããã®ãŠãŒã¶ãŒãã¬ã³ããªãŒãªã€ã³ã¿ãŒãã§ã€ã¹ãæäŸããŸãããããã®æ©èœã¯ãã¢ãã«ã®ããã©ãŒãã³ã¹ãæé©åããéçºããã»ã¹ãå¹çåããã®ã«åœ¹ç«ã¡ãŸããMLOpsçµ±åã¬ã€ãã§ããã®ã¡ãªãããšæé ã®è©³çŽ°ãã芧ãã ããã
YOLO11 ãšClearML ã®çµ±åäžã«ããããåé¡ã®ãã©ãã«ã·ã¥ãŒãã£ã³ã°æ¹æ³ã¯ïŒ
YOLO11 ãšClearML ã®çµ±åäžã«åé¡ãçºçããå Žåã¯ããããããåé¡ãã¬ã€ãã§è§£æ±ºçãšãã³ããåç §ããŠãã ãããå žåçãªåé¡ã«ã¯ãããã±ãŒãžã®ã€ã³ã¹ããŒã«ã»ãšã©ãŒãã¯ã¬ãã³ã·ã£ã«ã®ã»ããã¢ããããŸãã¯æ§æã®åé¡ããããŸãããã®ã¬ã€ãã§ã¯ããã®ãããªäžè¬çãªåé¡ãå¹ççã«è§£æ±ºããããã®ãã©ãã«ã·ã¥ãŒãã£ã³ã°æé ãé ãè¿œã£ãŠèª¬æããŸãã
YOLO11 ã¢ãã«ãã¬ãŒãã³ã°çšã®ClearML ã¿ã¹ã¯ã¯ã©ã®ããã«èšå®ããã®ã§ããïŒ
YOLO11 ãã¬ãŒãã³ã°ã®ããã®ClearML ã¿ã¹ã¯ã®ã»ããã¢ããã«ã¯ãã¿ã¹ã¯ã®åæåãã¢ãã«ããªã¢ã³ãã®éžæãã¢ãã«ã®ããŒãããã¬ãŒãã³ã°åŒæ°ã®èšå®ããããŠæåŸã«ã¢ãã«ã®ãã¬ãŒãã³ã°ã®éå§ãå«ãŸããŸãã以äžã«ç°¡åãªäŸã瀺ãïŒ
from clearml import Task
from ultralytics import YOLO
# Step 1: Creating a ClearML Task
task = Task.init(project_name="my_project", task_name="my_yolov8_task")
# Step 2: Selecting the YOLO11 Model
model_variant = "yolo11n"
task.set_parameter("model_variant", model_variant)
# Step 3: Loading the YOLO11 Model
model = YOLO(f"{model_variant}.pt")
# Step 4: Setting Up Training Arguments
args = dict(data="coco8.yaml", epochs=16)
task.connect(args)
# Step 5: Initiating Model Training
results = model.train(**args)
ãããã®æé ã®è©³çŽ°ã«ã€ããŠã¯ãå©çšã¬ã€ããåç §ããŠãã ããã
ClearML YOLO11 ãã¬ãŒãã³ã°ã®çµæã¯ã©ãã§èŠãããšãã§ããŸããïŒ
ClearML ã§YOLO11 ãã¬ãŒãã³ã°ã¹ã¯ãªãããå®è¡ããåŸãClearML çµæããŒãžã§çµæã衚瀺ã§ããŸããåºåã«ã¯ãClearML ããã·ã¥ããŒããžã® URL ãªã³ã¯ãå«ãŸããŠãããã¡ããªãã¯ã®è¿œè·¡ãå®éšã®æ¯èŒããªãœãŒã¹ã®äœ¿çšç¶æ³ã®ç£èŠãè¡ãããšãã§ããŸããçµæã®è¡šç€ºæ¹æ³ãšè§£éæ¹æ³ã®è©³çŽ°ã«ã€ããŠã¯ããClearML çµæããŒãžã®è¡šç€ºãã®ã»ã¯ã·ã§ã³ãåç §ããŠãã ããã