how to set label smoothing in yolov8/yolov11?
Search before asking
- [x] I have searched the YOLOv5 issues and discussions and found no similar questions.
Question
how to set label smoothing in yolov8/yolov11?
Additional
No response
π Hello @xuan-xuan6, thank you for your interest in YOLOv5 π! For guidance on YOLO8 or YOLO11, we recommend referring to the official Ultralytics Documentation, which covers all the latest features and configurations, including label smoothing.
If this is a custom training β Question, please provide as much detail as possible, including your use case, relevant configurations, and any specific challenges you're facing. For the best results, ensure you're following the Training Tips for optimal model performance.
If this is a π Bug Report, please include a minimum reproducible example to help us investigate the issue effectively.
Requirements
Make sure your environment meets the following setup: Python>=3.8.0 with all requirements.txt dependencies installed, including PyTorch>=1.8. To set up YOLOv5:
git clone https://github.com/ultralytics/yolov5 # clone repository
cd yolov5
pip install -r requirements.txt # install dependencies
Environments
You can run YOLOv5 and other Ultralytics models in the following verified environments:
- Notebooks with free GPUs:
- 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 YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. These tests validate the correct operation of YOLOv5 and related tools.
This is an automated response to assist you as quickly as possible. An Ultralytics engineer will review your issue and provide additional support soon. Thank you for your patience! π
@xuan-xuan6 for YOLOv8 label smoothing: Set label_smoothing in your dataset YAML under args or pass it directly in the training command like model.train(data=..., label_smoothing=0.1). See the Ultralytics YOLOv8 Training Documentation for details.
YOLO11 isn't released yet - stay tuned to our GitHub repositories for updates on new releases! π
@xuan-xuan6 for YOLOv8 label smoothing: Set
label_smoothingin your dataset YAML underargsor pass it directly in the training command likemodel.train(data=..., label_smoothing=0.1). See the Ultralytics YOLOv8 Training Documentation for details.YOLO11 isn't released yet - stay tuned to our GitHub repositories for updates on new releases! π
Thank you for your reply. I see that label-smoothing has been removed in the latest version of u. So, does that mean label-smoothing cannot be set in the latest version of u?
@shining-love label smoothing remains available in Ultralytics YOLOv8. You can enable it by setting the label_smoothing parameter in your training configuration or directly in the training command:
model.train(..., label_smoothing=0.1)
For implementation details, refer to the Ultralytics YOLOv8 Training Documentation.
YOLO11 is not yet released, but existing YOLO versions like YOLOv8 fully support label smoothing. Stay updated via our GitHub repositories! π
π 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 β
Is there a way to apply label smoothing for Yolo11 ?
@mikejattu in current Ultralytics YOLO (including YOLO11) the label_smoothing option has been deprecated and stripped from the config, so thereβs no builtβin switch for it anymore; if you need it with YOLO11 youβd have to fork the ultralytics/ultralytics repo and add it back into the loss/training code yourself (see the config reference in the Ultralytics Docs).