Giter VIP home page Giter VIP logo

Comments (2)

github-actions avatar github-actions commented on July 23, 2024

πŸ‘‹ Hello @SaiTharun01, thank you for your interest in Ultralytics YOLOv8 πŸš€! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered.

If this is a πŸ› Bug Report, please provide a minimum reproducible example to help us debug it.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.

Join the vibrant Ultralytics Discord 🎧 community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users.

Install

Pip install the ultralytics package including all requirements in a Python>=3.8 environment with PyTorch>=1.8.

pip install ultralytics

Environments

YOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

Ultralytics CI

If this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.

from ultralytics.

glenn-jocher avatar glenn-jocher commented on July 23, 2024

Hello,

Thank you for reaching out and providing detailed information about your issue. It seems like you're experiencing a drop in mAP50 scores after fine-tuning your YOLOv8 model with additional data. Let's work through this step-by-step to identify potential causes and solutions.

Steps to Diagnose and Resolve the Issue

  1. Verify Package Versions:
    Ensure you are using the latest versions of torch and ultralytics. You can update them using the following commands:

    pip install --upgrade torch ultralytics
  2. Reproducible Code Example:
    To better assist you, could you please provide a minimum reproducible code example? This will help us replicate the issue on our end. You can refer to our guide on creating a minimum reproducible example here. This step is crucial for us to investigate and provide a solution.

  3. Training and Fine-Tuning Process:
    Let's ensure that the fine-tuning process is correctly set up. When fine-tuning, it's important to use the same data configuration and ensure that the new data is properly integrated. Here’s an example of how you might structure your training and fine-tuning commands:

    # Initial Training
    !yolo task=detect mode=train model="yolov8n.pt" data="data1.yaml" epochs=100 imgsz=640 batch=16 optimizer=AdamW
    
    # Fine-Tuning
    !yolo task=detect mode=train model="best.pt" data="data2.yaml" epochs=100 imgsz=640 batch=16 optimizer=AdamW
  4. Data Consistency:
    Ensure that the new dataset (data2.yaml) is consistent with the original dataset (data1.yaml). The class names and structure should match exactly. Any discrepancies can lead to performance drops.

  5. Learning Rate and Optimizer:
    Fine-tuning often requires a lower learning rate to avoid catastrophic forgetting. Consider reducing the learning rate during fine-tuning. You can adjust this in your command:

    !yolo task=detect mode=train model="best.pt" data="data2.yaml" epochs=100 imgsz=640 batch=16 optimizer=AdamW lr0=0.001
  6. Validation:
    Validate your model after fine-tuning to ensure that it is performing as expected on both the old and new datasets. This can help identify if the issue is specific to the new data or a general problem.

Example Validation Command

# Validate the fine-tuned model
!yolo task=detect mode=val model="best.pt" data="data2.yaml" imgsz=640

Additional Resources

For more detailed guidance on fine-tuning and best practices, you might find our training documentation helpful.

Please provide the reproducible code example and any additional details you can share. This will help us assist you more effectively.

from ultralytics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.