Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using --rect to train, mAP a little bit low #13425

Open
1 task done
wzf19947 opened this issue Nov 21, 2024 · 2 comments
Open
1 task done

using --rect to train, mAP a little bit low #13425

wzf19947 opened this issue Nov 21, 2024 · 2 comments
Labels
question Further information is requested

Comments

@wzf19947
Copy link

Search before asking

Question

I trained with two models, the only difference is using --rect param or not , it turns out using --rect to train, the mAP is much lower and grow up lower than don't use it, is is normal?

Additional

No response

@wzf19947 wzf19947 added the question Further information is requested label Nov 21, 2024
@UltralyticsAssistant
Copy link
Member

👋 Hello @wzf19947, thank you for your interest in YOLOv5 🚀! I see you've encountered an issue with using the --rect parameter during training. This is an automated response to acknowledge your issue, and an Ultralytics engineer will assist you soon.

If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us understand and debug it more effectively.

For questions related to custom training or parameter tuning, please provide as much detail as possible, such as dataset examples, training logs, and ensure you're following recommended practices to achieve the best training results.

Requirements

Ensure you have Python>=3.8.0 with all dependencies installed, including PyTorch>=1.8. You can do this by cloning the YOLOv5 repository and installing the necessary requirements using pip install -r requirements.txt.

Environments

YOLOv5 offers various verified environments such as Notebooks with free GPU access, Google Cloud's Deep Learning VM, Amazon's Deep Learning AMI, and Docker images, each with all dependencies, including CUDA, CUDNN, Python, and PyTorch, preinstalled.

Status

Check our Continuous Integration (CI) tests on GitHub Actions, which verify the correct operation of YOLOv5's training, validation, inference, export, and benchmarks on multiple platforms. If these tests are passing, YOLOv5 should operate correctly in its supported environments.

Feel free to provide the additional information to assist us in resolving your query. 😊

@pderrenger
Copy link
Member

@wzf19947 using the --rect parameter can result in lower mAP because it alters the aspect ratio of images during training, which might affect the model's learning efficiency. It's recommended to use rectangular training only when dealing with datasets where maintaining the original aspect ratio is crucial, such as when objects have a consistent orientation or size. Otherwise, consider training without --rect for potentially better mAP results. For more insights, refer to the YOLOv5 documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants