Comments (9)
👋 Hello @slwgsc, 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 detailing your experience with the RT-DETR model. It's great to hear that you're exploring custom training!
For the official hyperparameters, you can find the default configuration in the default.yaml
file directly within our repository. This file will provide you with a baseline for the hyperparameters used in our pre-trained models.
Regarding modifications and customizations, while we don't have a specific tutorial for modifying the RT-DETR model, I recommend looking at the Model Customization section of our documentation. This section provides guidance on how to tailor models to better fit specific needs, which might help you understand and replicate the successful modifications you mentioned.
If you have further questions or need more detailed assistance, feel free to ask!
from ultralytics.
Thanks for the reply!
Regarding the hyperparameters, what I want to express is whether ultralytics can offer the concrete value of parameters in order to obtain approximate training results for the original paper code(https://github.com/lyuwenyu/RT-DETR)
In addition, I sincerely hope that ultralytics can provide the resnet18 and rest34 yaml file in RT-DETR as soon as possible, which will facilitate our research and improvement.
from ultralytics.
Hello,
Thank you for your follow-up and for clarifying your needs!
For hyperparameters that closely match those used in the original RT-DETR paper, I recommend reviewing the configuration files and training scripts provided in the official RT-DETR repository. Typically, these files contain specific hyperparameter settings optimized for their models.
As for the request for ResNet18 and ResNet34 YAML files for RT-DETR, we appreciate your suggestion and understand how valuable these configurations could be for the community. I'll forward your request to our development team for consideration in future updates.
Your interest and suggestions are incredibly valuable to us, and they play a crucial role in shaping our roadmap. Thank you for contributing to the improvement of our resources!
from ultralytics.
👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.
For additional resources and information, please see the links below:
- Docs: https://docs.ultralytics.com
- HUB: https://hub.ultralytics.com
- Community: https://community.ultralytics.com
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!
Thank you for your contributions to YOLO 🚀 and Vision AI ⭐
from ultralytics.
我用同样的数据集,配置文件训练了v5,v6,v8都不错,但 model = RTDETR('rtdetr-x.yaml')
model.train(data='mydata.yaml')
训练RT DETR 时候,map非常小0.0001.
I used the same dataset and configuration files to train YOLOv5, YOLOv6, and YOLOv8, and they all performed well. However, when training RT-DETR with model = RTDETR('rtdetr-x.yaml') and model.train(data='mydata.yaml'), the mAP is very low, around 0.0001.
from ultralytics.
@lizheyong hello,
Thank you for sharing your experience with training the RT-DETR model. It's great to hear that you've had success with YOLOv5, YOLOv6, and YOLOv8!
To better assist you with the RT-DETR issue, could you please provide a minimum reproducible example? This will help us diagnose the problem more effectively. You can find guidelines on how to create one here: Minimum Reproducible Example.
Additionally, please ensure that you are using the latest version of the Ultralytics package. Sometimes, updates include important fixes and improvements that could resolve your issue.
Here are a few things to check:
- Data Format: Ensure that your dataset is formatted correctly and matches the expected input format for RT-DETR.
- Hyperparameters: Verify that the hyperparameters in your
rtdetr-x.yaml
file are set appropriately for your dataset. - Training Logs: Review the training logs for any warnings or errors that might provide clues.
If you can share more details about your configuration and any specific error messages, it would be very helpful.
Looking forward to your response!
from ultralytics.
Regarding 1. Data Format, I am using the same format as previous YOLO versions, as shown below:
/path/to/my/datasets/
img1.jpg
img1.txt (1 0.48625180897 0.52722722722773 0.84213132131 0.82332114141)
img2.jpg
img2.txt
...
I then divided them into train.txt
, val.txt
, and test.txt
, like this:
img1.jpg
img5.jpg
img123.jpg
...
My data.yaml
is configured as follows:
train: /path/to/train.txt
...
Initially, I thought the dataset might require the COCO format for training an RT-DETR, but it appears that the dataloader is capable of processing the YOLO format datasets since the training program ran successfully without any dataset-related errors.
Regarding 2. Hyperparameters, I used the settings from default.yaml
with learning rates set to 0.001 and 0.0001. In both cases, 'NaN' errors occurred, but occasionally the values returned to normal. Despite these fluctuations, the final results were satisfactory. It seems that the training process is somewhat unstable.
from ultralytics.
Hello @lizheyong,
Thank you for providing additional details about your dataset and configuration. It’s helpful to know that you’re using the same format as previous YOLO versions and that the dataset is being processed without errors.
Given the instability and 'NaN' errors you’re encountering during training, here are a few suggestions to help diagnose and potentially resolve the issue:
-
Learning Rate Adjustments: The learning rate can significantly impact training stability. If you’re experiencing 'NaN' errors, it might be worth experimenting with even lower learning rates. For instance, try reducing the learning rate to
1e-5
or1e-6
and observe if the training stabilizes. -
Gradient Clipping: Implementing gradient clipping can help prevent the gradients from exploding, which might be causing the 'NaN' errors. You can add gradient clipping to your training configuration:
optimizer: clip: 0.1 # Adjust the clipping value as needed
-
Batch Size: Sometimes, reducing the batch size can help stabilize training, especially if you’re running into memory issues. Try lowering the batch size and see if it improves stability.
-
Check for Data Anomalies: Ensure there are no anomalies in your dataset, such as extremely small or large bounding boxes, which might be causing instability. You can add data augmentation or normalization steps to mitigate this.
-
Update to Latest Version: Make sure you’re using the latest version of the Ultralytics package, as updates often include important fixes and improvements. You can update the package using:
pip install --upgrade ultralytics
-
Monitor Training Logs: Keep an eye on the training logs for any warnings or errors that might provide additional insights into what’s causing the instability.
Here’s a minimal example of how you might adjust your training script to include some of these suggestions:
from ultralytics import RTDETR
# Load the model
model = RTDETR('rtdetr-x.yaml')
# Train the model with adjusted hyperparameters
results = model.train(data='mydata.yaml', epochs=100, imgsz=640, lr0=1e-5, batch=8, optimizer={'clip': 0.1})
If the issue persists, providing a minimum reproducible example would be very helpful for further diagnosis. You can follow the guidelines here: Minimum Reproducible Example.
Thank you for your patience and collaboration. Let’s work together to get this resolved! 😊
from ultralytics.
Related Issues (20)
- YOLOv8 is jointly trained with other models HOT 3
- Optimizer='auto' problem HOT 2
- Docker run yolov8 report error:Killed, OOM HOT 6
- Is there any other way to get faster YOLOv8n results without using GPU HOT 2
- Default training parameters for yolov8n? HOT 6
- Exporting a YOLO model fails when current directory is in a different filesystem HOT 6
- YOLOv8 resizes input images differently when training for classification? HOT 3
- FedAvg with YOLO HOT 6
- YOLOv8, v10, RT-DETR albumentation do not apply HOT 5
- How can i train better my project ? YOLOV8 HOT 14
- Codebase for running YoloV10 with ONNX HOT 8
- xywh returns wrong result while xyxy returns right result HOT 1
- Support distributed evaluation during training process HOT 1
- Is there an example of yolov8n-segn Android split HOT 2
- @glenn-jocher tracker is not working for custom trained models,
- multi input video to YOLOv8 and using bytetrack.yaml return same ID to different object and keep increasing HOT 2
- The engine model RTX3060 exported by RTX4070 cannot be inferred HOT 3
- YOLO(model_yaml).load(model.pt) not work. HOT 5
- Exporting after training on YoloV10 raise a ValueError with MultiGPU HOT 7
- Yolov8 classifier training: impossible to disable some augmentation options HOT 5
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.