Comments (2)
π 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):
- Notebooks with free GPU:
- Google Cloud Deep Learning VM. See GCP Quickstart Guide
- Amazon Deep Learning AMI. See AWS Quickstart Guide
- Docker Image. See Docker Quickstart Guide
Status
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.
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
-
Verify Package Versions:
Ensure you are using the latest versions oftorch
andultralytics
. You can update them using the following commands:pip install --upgrade torch ultralytics
-
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. -
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
-
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. -
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
-
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)
- yolov8 for web-camera use to classification HOT 2
- Weights combining HOT 5
- I am getting error! Help Me to Fix it i am confused HOT 2
- export yolov8 format HOT 9
- RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one. This error indicates that your module has parameters that were not used in producing loss. You can enable unused parameter detection by passing the keyword argument `find_unused_parameters=True` to `torch.nn.parallel.DistributedDataParallel`, and by [rank0]: making sure all `forward` function outputs participate in calculating loss. HOT 2
- can not find the data correctly when use DDP train HOT 2
- Hybrid agnostic NMS HOT 6
- How do I correctly interpret and use the output from the OBB version of Yolov8 for 360ΒΊ prediction? HOT 8
- False Positive of YOLOv8 for Object Detection HOT 1
- TypeError: object of type 'int' has no len() HOT 1
- model not get optimized HOT 4
- gradio supports real-time detection of images captured in the camera. HOT 4
- Yolov8 trains 100 epochs on the coco8 dataset with a map of 0 HOT 8
- Problem with ONNX model HOT 12
- cls_loss and dfl_loss suddenly spike in the last 10 epochs HOT 3
- Training yolov9-seg Times Error HOT 2
- Precision Recall Curve HOT 4
- Split model size HOT 9
- When training in google colab environment, it won't show the precision as well as recall, mAP during training process. HOT 1
- Does not see several A2 video cards HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ultralytics.