yolov5 icon indicating copy to clipboard operation
yolov5 copied to clipboard

how to set label smoothing in yolov8/yolov11?

Open xuan-xuan6 opened this issue 9 months ago β€’ 4 comments

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

xuan-xuan6 avatar Mar 20 '25 07:03 xuan-xuan6

πŸ‘‹ 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:

Status

YOLOv5 CI

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! 😊

UltralyticsAssistant avatar Mar 20 '25 07:03 UltralyticsAssistant

@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! πŸš€

pderrenger avatar Mar 20 '25 23:03 pderrenger

@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! πŸš€

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 avatar Mar 21 '25 00:03 shining-love

@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! πŸ”

pderrenger avatar Mar 21 '25 10:03 pderrenger

πŸ‘‹ 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 ⭐

github-actions[bot] avatar Oct 10 '25 00:10 github-actions[bot]

Is there a way to apply label smoothing for Yolo11 ?

mikejattu avatar Nov 14 '25 23:11 mikejattu

@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).

pderrenger avatar Nov 15 '25 06:11 pderrenger