ultralytics / yolov5

YOLOv5 πŸš€ in PyTorch > ONNX > CoreML > TFLite

Home Page:https://docs.ultralytics.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yolov5 classifier ,some training images are being centre cropped

humairaneha opened this issue Β· comments

Search before asking

Question

I don't want this behaviour. I have resized my image to 224*224,but during training the images are being cropped ,so most information of the images are being lost. what to do?

Additional

No response

@humairaneha hello! Thanks for reaching out. If you're observing that your images are being center-cropped during training, it's likely due to the data augmentation settings in the YOLOv5 data pipeline.

To prevent center-cropping, you can adjust the augmentation settings in your dataset's YAML file. Specifically, you'll want to look at the augment section and modify the parameters related to cropping, such as mosaic, mixup, and random crop settings. Set these to false or adjust their probabilities to 0 to disable them.

For more detailed guidance on how to configure your data augmentations, please refer to the documentation at https://docs.ultralytics.com/yolov5/.

Remember, any changes to the augmentation settings can affect the model's ability to generalize, so it's a good idea to monitor your model's performance on a validation set after making adjustments.

Happy training! 😊

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