Giter VIP home page Giter VIP logo

Comments (9)

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

👋 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):

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 24, 2024

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.

slwgsc avatar slwgsc commented on July 24, 2024

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.

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

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.

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

👋 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:

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.

lizheyong avatar lizheyong commented on July 24, 2024

我用同样的数据集,配置文件训练了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.

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

@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:

  1. Data Format: Ensure that your dataset is formatted correctly and matches the expected input format for RT-DETR.
  2. Hyperparameters: Verify that the hyperparameters in your rtdetr-x.yaml file are set appropriately for your dataset.
  3. 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.

lizheyong avatar lizheyong commented on July 24, 2024

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.
image

from ultralytics.

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

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:

  1. 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 or 1e-6 and observe if the training stabilizes.

  2. 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
  3. 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.

  4. 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.

  5. 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
  6. 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)

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.