yolov5 icon indicating copy to clipboard operation
yolov5 copied to clipboard

close mosaic in yolov5

Open ChenJian7578 opened this issue 1 year ago β€’ 1 comments

Search before asking

  • [X] I have searched the YOLOv5 issues and discussions and found no similar questions.

Question

in v8, ultralytics/cfg/default.yaml. there have the parameter close_mosaic to close the mosaic in the last few epochs of training, so how can i Implement this functionality in v5?

Additional

No response

ChenJian7578 avatar Sep 19 '24 14:09 ChenJian7578

πŸ‘‹ Hello @ChenJian7578, thank you for your interest in YOLOv5 πŸš€! This is an automated response, and an Ultralytics engineer will assist you soon.

To address your question about the mosaic augmentation parameter available in YOLOv8, and how to implement similar functionality in YOLOv5, please refer to our ⭐️ YOLOv5 Tutorials. These guides cover various topics such as Custom Data Training which might help you adapt augmentations to your needs.

If this is a πŸ› Bug Report, please provide a minimum reproducible example to assist us in troubleshooting.

For custom training or ❓ questions, include as much info as possible, like dataset examples and training logs, and verify you’re following our Training Tips.

Requirements

Ensure that Python>=3.8.0 is installed with all dependencies from requirements.txt, including PyTorch>=1.8. To set up, you can run:

git clone https://github.com/ultralytics/yolov5  # clone
cd yolov5
pip install -r requirements.txt  # install

Environments

YOLOv5 can run in diverse environments, such as:

  • Notebooks: Run on Gradient Open In Colab Open In Kaggle
  • Cloud: Google Cloud Deep Learning VM, Amazon Deep Learning AMI, refer to our Environment Guides

Status

Check the CI status here: YOLOv5 CI If it's green, all tests are passing.

Introducing YOLOv8 πŸš€

Explore our latest model, YOLOv8, designed for enhanced accuracy and efficiency. Check our YOLOv8 Docs to start:

pip install ultralytics

Happy exploring! 😊

UltralyticsAssistant avatar Sep 19 '24 14:09 UltralyticsAssistant

@ChenJian7578 to disable mosaic augmentation in YOLOv5 during the last few epochs, you can modify the training script to adjust the mosaic parameter in the data augmentation settings. You can manually set it to False in the hyp.scratch-low.yaml file or adjust it dynamically in the training loop. For more detailed guidance, you might want to explore the training scripts and augmentation settings in the repository.

pderrenger avatar Nov 09 '24 16:11 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]