μ½˜ν…μΈ λ‘œ κ±΄λ„ˆλ›°κΈ°

Elevating YOLO11 Training: Simplify Your Logging Process with Comet ML

Logging key training details such as parameters, metrics, image predictions, and model checkpoints is essential in machine learningβ€”it keeps your project transparent, your progress measurable, and your results repeatable.

Ultralytics YOLO11 seamlessly integrates with Comet ML, efficiently capturing and optimizing every aspect of your YOLO11 object detection model's training process. In this guide, we'll cover the installation process, Comet ML setup, real-time insights, custom logging, and offline usage, ensuring that your YOLO11 training is thoroughly documented and fine-tuned for outstanding results.

Comet ML

Comet ML κ°œμš”

Comet ML은 λ¨Έμ‹  λŸ¬λ‹ λͺ¨λΈκ³Ό μ‹€ν—˜μ„ 좔적, 비ꡐ, μ„€λͺ…, μ΅œμ ν™”ν•˜κΈ° μœ„ν•œ ν”Œλž«νΌμž…λ‹ˆλ‹€. λͺ¨λΈ ν›ˆλ ¨ 쀑에 λ©”νŠΈλ¦­, λ§€κ°œλ³€μˆ˜, λ―Έλ””μ–΄ 등을 κΈ°λ‘ν•˜κ³  미적으둜 보기 쒋은 μ›Ή μΈν„°νŽ˜μ΄μŠ€λ₯Ό 톡해 μ‹€ν—˜μ„ λͺ¨λ‹ˆν„°λ§ν•  수 μžˆμŠ΅λ‹ˆλ‹€. Comet ML은 데이터 κ³Όν•™μžκ°€ 더 λΉ λ₯΄κ²Œ λ°˜λ³΅ν•˜κ³ , 투λͺ…μ„±κ³Ό μž¬ν˜„μ„±μ„ 높이며, ν”„λ‘œλ•μ…˜ λͺ¨λΈμ„ κ°œλ°œν•˜λŠ” 데 도움을 μ€λ‹ˆλ‹€.

Harnessing the Power of YOLO11 and Comet ML

By combining Ultralytics YOLO11 with Comet ML, you unlock a range of benefits. These include simplified experiment management, real-time insights for quick adjustments, flexible and tailored logging options, and the ability to log experiments offline when internet access is limited. This integration empowers you to make data-driven decisions, analyze performance metrics, and achieve exceptional results.

μ„€μΉ˜

ν•„μš”ν•œ νŒ¨ν‚€μ§€λ₯Ό μ„€μΉ˜ν•˜λ €λ©΄ μ‹€ν–‰ν•©λ‹ˆλ‹€:

μ„€μΉ˜

# Install the required packages for YOLO11 and Comet ML
pip install ultralytics comet_ml torch torchvision

Comet ML ꡬ성

ν•„μš”ν•œ νŒ¨ν‚€μ§€λ₯Ό μ„€μΉ˜ν•œ ν›„ κ°€μž…ν•˜κ³  Comet API ν‚€λ₯Ό 받은 ν›„ μ„€μ •ν•΄μ•Ό ν•©λ‹ˆλ‹€.

Comet ML ꡬ성

# Set your Comet Api Key
export COMET_API_KEY=<Your API Key>

그런 λ‹€μŒ Comet ν”„λ‘œμ νŠΈλ₯Ό μ΄ˆκΈ°ν™”ν•  수 μžˆμŠ΅λ‹ˆλ‹€. Comet μ—μ„œ μžλ™μœΌλ‘œ API ν‚€λ₯Ό κ°μ§€ν•˜κ³  섀정을 μ§„ν–‰ν•©λ‹ˆλ‹€.

import comet_ml

comet_ml.login(project_name="comet-example-yolov8-coco128")

Google Colab λ…ΈνŠΈλΆμ„ μ‚¬μš© 쀑인 경우, μœ„μ˜ μ½”λ“œμ—μ„œ μ΄ˆκΈ°ν™”λ₯Ό μœ„ν•΄ API ν‚€λ₯Ό μž…λ ₯ν•˜λΌλŠ” λ©”μ‹œμ§€κ°€ ν‘œμ‹œλ©λ‹ˆλ‹€.

μ‚¬μš©λ²•

Before diving into the usage instructions, be sure to check out the range of YOLO11 models offered by Ultralytics. This will help you choose the most appropriate model for your project requirements.

μ‚¬μš©λ²•

from ultralytics import YOLO

# Load a model
model = YOLO("yolo11n.pt")

# Train the model
results = model.train(
    data="coco8.yaml",
    project="comet-example-yolov8-coco128",
    batch=32,
    save_period=1,
    save_json=True,
    epochs=3,
)

After running the training code, Comet ML will create an experiment in your Comet workspace to track the run automatically. You will then be provided with a link to view the detailed logging of your YOLO11 model's training process.

Comet automatically logs the following data with no additional configuration: metrics such as mAP and loss, hyperparameters, model checkpoints, interactive confusion matrix, and image bounding box predictions.

Comet ML μ‹œκ°ν™”λ₯Ό ν†΅ν•œ λͺ¨λΈ μ„±λŠ₯ μ΄ν•΄ν•˜κΈ°

Let's dive into what you'll see on the Comet ML dashboard once your YOLO11 model begins training. The dashboard is where all the action happens, presenting a range of automatically logged information through visuals and statistics. Here's a quick tour:

μ‹€ν—˜ νŒ¨λ„

The experiment panels section of the Comet ML dashboard organize and present the different runs and their metrics, such as segment mask loss, class loss, precision, and mean average precision.

Comet ML κ°œμš”

λ©”νŠΈλ¦­

λ©”νŠΈλ¦­ μ„Ήμ…˜μ—μ„œλŠ” 여기에 ν‘œμ‹œλœ κ²ƒμ²˜λŸΌ μ „μš© 창에 ν‘œμ‹œλ˜λŠ” ν‘œ ν˜•μ‹μœΌλ‘œ λ©”νŠΈλ¦­μ„ κ²€ν† ν•  수 μžˆλŠ” μ˜΅μ…˜λ„ μžˆμŠ΅λ‹ˆλ‹€.

Comet ML κ°œμš”

Interactive Confusion Matrix

The confusion matrix, found in the Confusion Matrix tab, provides an interactive way to assess the model's classification accuracy. It details the correct and incorrect predictions, allowing you to understand the model's strengths and weaknesses.

Comet ML κ°œμš”

μ‹œμŠ€ν…œ λ©”νŠΈλ¦­

Comet ML은 μ‹œμŠ€ν…œ λ©”νŠΈλ¦­μ„ κΈ°λ‘ν•˜μ—¬ νŠΈλ ˆμ΄λ‹ ν”„λ‘œμ„ΈμŠ€μ˜ 병λͺ© ν˜„μƒμ„ νŒŒμ•…ν•˜λŠ” 데 도움을 μ€λ‹ˆλ‹€. μ—¬κΈ°μ—λŠ” GPU μ‚¬μš©λ₯ , GPU λ©”λͺ¨λ¦¬ μ‚¬μš©λŸ‰, CPU μ‚¬μš©λ₯  및 RAM μ‚¬μš©λŸ‰κ³Ό 같은 λ©”νŠΈλ¦­μ΄ ν¬ν•¨λ©λ‹ˆλ‹€. μ΄λŸ¬ν•œ μ§€ν‘œλŠ” λͺ¨λΈ ν•™μŠ΅ 쀑 λ¦¬μ†ŒμŠ€ μ‚¬μš©μ˜ νš¨μœ¨μ„±μ„ λͺ¨λ‹ˆν„°λ§ν•˜λŠ” 데 ν•„μˆ˜μ μž…λ‹ˆλ‹€.

Comet ML κ°œμš”

Comet ML λ‘œκΉ… μ‚¬μš©μž 지정

Comet ML은 ν™˜κ²½ λ³€μˆ˜λ₯Ό μ„€μ •ν•˜μ—¬ λ‘œκΉ… λ™μž‘μ„ μ‚¬μš©μž 지정할 수 μžˆλŠ” μœ μ—°μ„±μ„ μ œκ³΅ν•©λ‹ˆλ‹€. μ΄λŸ¬ν•œ ꡬ성을 톡해 Comet ML을 νŠΉμ • μš”κ΅¬ 사항과 μ„ ν˜Έλ„μ— 맞게 μ‘°μ •ν•  수 μžˆμŠ΅λ‹ˆλ‹€. λ‹€μŒμ€ λͺ‡ 가지 μœ μš©ν•œ μ‚¬μš©μž 지정 μ˜΅μ…˜μž…λ‹ˆλ‹€:

이미지 예츑 λ‘œκΉ…

μ‹€ν—˜ 쀑에 Comet ML이 κΈ°λ‘ν•˜λŠ” 이미지 예츑의 수λ₯Ό μ œμ–΄ν•  수 μžˆμŠ΅λ‹ˆλ‹€. 기본적으둜 Comet ML은 μœ νš¨μ„± 검사 μ„ΈνŠΈμ—μ„œ 100개의 이미지 μ˜ˆμΈ‘μ„ κΈ°λ‘ν•©λ‹ˆλ‹€. κ·ΈλŸ¬λ‚˜ μš”κ΅¬ 사항에 더 μ ν•©ν•˜λ„λ‘ 이 수λ₯Ό λ³€κ²½ν•  수 μžˆμŠ΅λ‹ˆλ‹€. 예λ₯Ό λ“€μ–΄ 200개의 이미지 μ˜ˆμΈ‘μ„ κΈ°λ‘ν•˜λ €λ©΄ λ‹€μŒ μ½”λ“œλ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€:

import os

os.environ["COMET_MAX_IMAGE_PREDICTIONS"] = "200"

일괄 λ‘œκΉ… 간격

Comet ML을 μ‚¬μš©ν•˜λ©΄ 이미지 예츑 배치λ₯Ό κΈ°λ‘ν•˜λŠ” λΉˆλ„λ₯Ό 지정할 수 μžˆμŠ΅λ‹ˆλ‹€. 이미지 예츑의 COMET_EVAL_BATCH_LOGGING_INTERVAL ν™˜κ²½ λ³€μˆ˜κ°€ 이 λΉˆλ„λ₯Ό μ œμ–΄ν•©λ‹ˆλ‹€. κΈ°λ³Έ 섀정은 1둜, λͺ¨λ“  μœ νš¨μ„± 검사 λ°°μΉ˜μ—μ„œ μ˜ˆμΈ‘μ„ κΈ°λ‘ν•©λ‹ˆλ‹€. 이 값을 μ‘°μ •ν•˜μ—¬ λ‹€λ₯Έ κ°„κ²©μœΌλ‘œ μ˜ˆμΈ‘μ„ 기둝할 수 μžˆμŠ΅λ‹ˆλ‹€. 예λ₯Ό λ“€μ–΄ 4둜 μ„€μ •ν•˜λ©΄ λ„€ 번째 λ°°μΉ˜λ§ˆλ‹€ μ˜ˆμΈ‘μ„ κΈ°λ‘ν•©λ‹ˆλ‹€.

import os

os.environ["COMET_EVAL_BATCH_LOGGING_INTERVAL"] = "4"

ν˜Όλ™ 맀트릭슀 λ‘œκΉ… λΉ„ν™œμ„±ν™”

In some cases, you may not want to log the confusion matrix from your validation set after every epoch. You can disable this feature by setting the COMET_EVAL_LOG_CONFUSION_MATRIX ν™˜κ²½ λ³€μˆ˜λ₯Ό "false"둜 μ„€μ •ν•©λ‹ˆλ‹€. ν˜Όλ™ 행렬은 ν›ˆλ ¨μ΄ μ™„λ£Œλœ ν›„ ν•œ 번만 κΈ°λ‘λ©λ‹ˆλ‹€.

import os

os.environ["COMET_EVAL_LOG_CONFUSION_MATRIX"] = "false"

μ˜€ν”„λΌμΈ λ‘œκΉ…

인터넷 접속이 μ œν•œλ˜λŠ” 상황에 μ²˜ν•œ 경우 Comet MLμ—μ„œ μ˜€ν”„λΌμΈ λ‘œκΉ… μ˜΅μ…˜μ„ μ œκ³΅ν•©λ‹ˆλ‹€. μ˜€ν”„λΌμΈ λ‘œκΉ… μ˜΅μ…˜μ„ μ„€μ •ν•˜λ €λ©΄ COMET_MODE ν™˜κ²½ λ³€μˆ˜λ₯Ό "μ˜€ν”„λΌμΈ"으둜 μ„€μ •ν•˜λ©΄ 이 κΈ°λŠ₯을 μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€. μ‹€ν—˜ λ°μ΄ν„°λŠ” 둜컬 디렉터리에 μ €μž₯되며 λ‚˜μ€‘μ— 인터넷에 μ—°κ²°ν•  수 μžˆμ„ λ•Œ Comet ML에 μ—…λ‘œλ“œν•  수 μžˆμŠ΅λ‹ˆλ‹€.

import os

os.environ["COMET_MODE"] = "offline"

μš”μ•½

This guide has walked you through integrating Comet ML with Ultralytics' YOLO11. From installation to customization, you've learned to streamline experiment management, gain real-time insights, and adapt logging to your project's needs.

Explore Comet ML's official documentation for more insights on integrating with YOLO11.

Furthermore, if you're looking to dive deeper into the practical applications of YOLO11, specifically for image segmentation tasks, this detailed guide on fine-tuning YOLO11 with Comet ML offers valuable insights and step-by-step instructions to enhance your model's performance.

λ˜ν•œ, λ‹€μ–‘ν•œ λ¦¬μ†ŒμŠ€μ™€ 정보λ₯Ό μ œκ³΅ν•˜λŠ” 톡합 κ°€μ΄λ“œ νŽ˜μ΄μ§€( Ultralytics)μ—μ„œ λ‹€λ₯Έ ν₯미둜운 톡합 κΈ°λŠ₯을 μ‚΄νŽ΄λ³΄μ„Έμš”.

자주 λ¬»λŠ” 질문

How do I integrate Comet ML with Ultralytics YOLO11 for training?

To integrate Comet ML with Ultralytics YOLO11, follow these steps:

  1. ν•„μš”ν•œ νŒ¨ν‚€μ§€λ₯Ό μ„€μΉ˜ν•©λ‹ˆλ‹€:

    pip install ultralytics comet_ml torch torchvision
    
  2. Comet API ν‚€λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€:

    export COMET_API_KEY=<Your API Key>
    
  3. Python μ½”λ“œμ—μ„œ Comet ν”„λ‘œμ νŠΈλ₯Ό μ΄ˆκΈ°ν™”ν•©λ‹ˆλ‹€:

    import comet_ml
    
    comet_ml.login(project_name="comet-example-yolov8-coco128")
    
  4. Train your YOLO11 model and log metrics:

    from ultralytics import YOLO
    
    model = YOLO("yolo11n.pt")
    results = model.train(
        data="coco8.yaml",
        project="comet-example-yolov8-coco128",
        batch=32,
        save_period=1,
        save_json=True,
        epochs=3,
    )
    

μžμ„Έν•œ 지침은 Comet ML ꡬ성 μ„Ήμ…˜μ„ μ°Έμ‘°ν•˜μ„Έμš”.

What are the benefits of using Comet ML with YOLO11?

By integrating Ultralytics YOLO11 with Comet ML, you can:

  • μ‹€μ‹œκ°„ μΈμ‚¬μ΄νŠΈλ₯Ό λͺ¨λ‹ˆν„°λ§ν•˜μ„Έμš”: ꡐ윑 결과에 λŒ€ν•œ 즉각적인 ν”Όλ“œλ°±μ„ λ°›μ•„ λΉ λ₯΄κ²Œ μ‘°μ •ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
  • κ΄‘λ²”μœ„ν•œ λ©”νŠΈλ¦­μ„ κΈ°λ‘ν•˜μ„Έμš”: 맡, 손싀, ν•˜μ΄νΌνŒŒλΌλ―Έν„°, λͺ¨λΈ μ²΄ν¬ν¬μΈνŠΈμ™€ 같은 ν•„μˆ˜ λ©”νŠΈλ¦­μ„ μžλ™μœΌλ‘œ μΊ‘μ²˜ν•©λ‹ˆλ‹€.
  • μ˜€ν”„λΌμΈμ—μ„œ μ‹€ν—˜μ„ μΆ”μ ν•©λ‹ˆλ‹€: 인터넷에 μ•‘μ„ΈμŠ€ν•  수 μ—†λŠ” 경우 λ‘œμ»¬μ—μ„œ νŠΈλ ˆμ΄λ‹ 싀행을 κΈ°λ‘ν•©λ‹ˆλ‹€.
  • λ‹€μ–‘ν•œ ν›ˆλ ¨ 싀행을 λΉ„κ΅ν•˜μ„Έμš”: λŒ€ν™”ν˜• Comet ML λŒ€μ‹œλ³΄λ“œλ₯Ό μ‚¬μš©ν•˜μ—¬ μ—¬λŸ¬ μ‹€ν—˜μ„ λΆ„μ„ν•˜κ³  비ꡐ할 수 μžˆμŠ΅λ‹ˆλ‹€.

μ΄λŸ¬ν•œ κΈ°λŠ₯을 ν™œμš©ν•˜λ©΄ λ¨Έμ‹  λŸ¬λ‹ μ›Œν¬ν”Œλ‘œλ₯Ό μ΅œμ ν™”ν•˜μ—¬ μ„±λŠ₯κ³Ό μž¬ν˜„μ„±μ„ ν–₯μƒμ‹œν‚¬ 수 μžˆμŠ΅λ‹ˆλ‹€. μžμ„Έν•œ λ‚΄μš©μ€ Comet ML 톡합 κ°€μ΄λ“œλ₯Ό μ°Έμ‘°ν•˜μ„Έμš”.

How do I customize the logging behavior of Comet ML during YOLO11 training?

Comet ML을 μ‚¬μš©ν•˜λ©΄ ν™˜κ²½ λ³€μˆ˜λ₯Ό μ‚¬μš©ν•˜μ—¬ λ‘œκΉ… λ™μž‘μ„ κ΄‘λ²”μœ„ν•˜κ²Œ μ‚¬μš©μž 지정할 수 μžˆμŠ΅λ‹ˆλ‹€:

  • 기둝된 이미지 예츑 수λ₯Ό λ³€κ²½ν•©λ‹ˆλ‹€:

    import os
    
    os.environ["COMET_MAX_IMAGE_PREDICTIONS"] = "200"
    
  • 배치 λ‘œκΉ… 간격을 μ‘°μ •ν•©λ‹ˆλ‹€:

    import os
    
    os.environ["COMET_EVAL_BATCH_LOGGING_INTERVAL"] = "4"
    
  • ν˜Όλ™ 맀트릭슀 λ‘œκΉ…μ„ λΉ„ν™œμ„±ν™”ν•©λ‹ˆλ‹€:

    import os
    
    os.environ["COMET_EVAL_LOG_CONFUSION_MATRIX"] = "false"
    

더 λ§Žμ€ μ‚¬μš©μž 지정 μ˜΅μ…˜μ€ Comet ML λ‘œκΉ… μ‚¬μš©μž 지정 μ„Ήμ…˜μ„ μ°Έμ‘°ν•˜μ„Έμš”.

How do I view detailed metrics and visualizations of my YOLO11 training on Comet ML?

Once your YOLO11 model starts training, you can access a wide range of metrics and visualizations on the Comet ML dashboard. Key features include:

  • Experiment Panels: View different runs and their metrics, including segment mask loss, class loss, and mean average precision.
  • λ©”νŠΈλ¦­: λ©”νŠΈλ¦­: μžμ„Έν•œ 뢄석을 μœ„ν•΄ ν‘œ ν˜•μ‹μœΌλ‘œ λ©”νŠΈλ¦­μ„ κ²€ν† ν•©λ‹ˆλ‹€.
  • λŒ€ν™”ν˜• ν˜Όλ™ 맀트릭슀: λŒ€ν™”ν˜• ν˜Όλ™ 맀트릭슀둜 λΆ„λ₯˜ 정확도λ₯Ό ν‰κ°€ν•˜μ„Έμš”.
  • μ‹œμŠ€ν…œ λ©”νŠΈλ¦­: GPU 및 CPU μ‚¬μš©λ₯ , λ©”λͺ¨λ¦¬ μ‚¬μš©λŸ‰ 및 기타 μ‹œμŠ€ν…œ λ©”νŠΈλ¦­μ„ λͺ¨λ‹ˆν„°λ§ν•©λ‹ˆλ‹€.

μ΄λŸ¬ν•œ κΈ°λŠ₯에 λŒ€ν•œ μžμ„Έν•œ κ°œμš”λŠ” Comet ML μ‹œκ°ν™”λ₯Ό ν†΅ν•œ λͺ¨λΈ μ„±λŠ₯ 이해 μ„Ήμ…˜μ„ μ°Έμ‘°ν•˜μ„Έμš”.

Can I use Comet ML for offline logging when training YOLO11 models?

예, μ˜€ν”„λΌμΈ λ‘œκ·ΈμΈμ„ μ‚¬μš© μ„€μ •ν•˜μ—¬ Comet ML에 λ‘œκ·ΈμΈν•  수 μžˆμŠ΅λ‹ˆλ‹€. COMET_MODE ν™˜κ²½ λ³€μˆ˜λ₯Ό "μ˜€ν”„λΌμΈ"으둜 μ„€μ •ν•©λ‹ˆλ‹€:

import os

os.environ["COMET_MODE"] = "offline"

이 κΈ°λŠ₯을 μ‚¬μš©ν•˜λ©΄ μ‹€ν—˜ 데이터λ₯Ό λ‘œμ»¬μ— 기둝할 수 있으며, λ‚˜μ€‘μ— 인터넷 연결이 κ°€λŠ₯ν•  λ•Œ Comet ML에 μ—…λ‘œλ“œν•  수 μžˆμŠ΅λ‹ˆλ‹€. 이 κΈ°λŠ₯은 인터넷 접속이 μ œν•œλœ ν™˜κ²½μ—μ„œ μž‘μ—…ν•  λ•Œ 특히 μœ μš©ν•©λ‹ˆλ‹€. μžμ„Έν•œ λ‚΄μš©μ€ μ˜€ν”„λΌμΈ λ‘œκΉ… μ„Ήμ…˜μ„ μ°Έμ‘°ν•˜μ„Έμš”.


πŸ“… Created 11 months ago ✏️ Updated 12 days ago

λŒ“κΈ€