ultralytics / ultralytics

NEW - YOLOv8 🚀 in PyTorch > ONNX > OpenVINO > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
23.76k stars 4.74k forks source link

RT-DETR #11650

Open FanglinLiu1 opened 1 week ago

FanglinLiu1 commented 1 week ago

Search before asking

Question

What are the typical hyperparameters set in the COCO dataset, such as batch and workers, and this parameter is your final decision in your experiment.

Additional

No response

github-actions[bot] commented 1 week ago

👋 Hello @FanglinLiu1, 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.

glenn-jocher commented 1 week ago

Hello! For training on the COCO dataset using YOLOv8, typical hyperparameter settings like batch and workers can vary based on your hardware setup. However, common settings are:

Here's a quick example using the CLI:

yolo train data=coco.yaml model=yolov8n.pt batch=16 workers=8

Adjust these based on your specific system's capabilities for optimal performance. Happy training! 🚀

FanglinLiu1 commented 1 week ago

你好!对于使用 YOLOv8 在 COCO 数据集上进行训练,典型的超参数设置(如 和)可能会因硬件设置而异。但是,常见的设置包括:batch``workers

  • batch:通常设置为 16 或更高,具体取决于 GPU 内存。
  • workers:通常设置为 8 左右,以便高效加载数据。

下面是使用 CLI 的快速示例:

yolo train data=coco.yaml model=yolov8n.pt batch=16 workers=8

根据特定系统的功能进行调整,以获得最佳性能。祝您训练愉快!🚀

1.Thanks for the author's reply, I really want to know why the setting of hyperparameters does not follow the original author, for example, batch is set to 4, workers is set to 4.

I would also like to know why the following two Settings do not align the pytorch version of RT-DETR, The parameter max norm in torch.nn.utils.clip grad norm is not 0.1, Ultralytics/engine/trainer.

The self.args.nbs of the _setup_train function in ultralytics/engine/trainer.py is not equal to self.batch_size.

2.Whether VOC and COCO data set authors provide standard txt annotation files.

3.Whether the author provides data enhancement programs.

4.Whether your hyperparameter Settings are optimal.

glenn-jocher commented 1 week ago

Hello! Thanks for your questions. Let's address them efficiently:

  1. Hyperparameters Settings: Our default configurations for batch and workers are set to common values that work well for a variety of systems, but they are based on common practices rather than the original author's settings. These are intended as a starting point and are highly dependent on the hardware used. Modifications might be necessary for specific systems or for aligning with training setups such as RT-DETR. For the other specific settings deviations, these could be due to updates or optimizations in our framework to enhance performance or stability specific to the Ultralytics implementation.

  2. Annotation Files for VOC and COCO: The COCO dataset typically comes with JSON annotations, not txt files, and VOC annotations are in XML format. Our environment automatically handles these formats.

  3. Data Augmentation Proposals: Yes, YOLOv8 supports various data augmentation techniques during training which are managed through the configuration files.

  4. Optimality of Hyperparameters: The provided hyperparameters are chosen as a balanced starting point for good performance across different setups. Still, for the best results especially in competitive or production environments, tuning based on your specific dataset and constraints is recommended.

Feel free to adjust these settings as needed and reach out if you have more questions! Happy training! 🚀