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

yolo.py --profile updates #7170

Merged
merged 1 commit into from
Mar 27, 2022
Merged

yolo.py --profile updates #7170

merged 1 commit into from
Mar 27, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Mar 27, 2022

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improved model profiling in YOLOv5.

πŸ“Š Key Changes

  • Removed the model.train() line that initially sets the model to training mode.
  • During profiling, the model is now set to evaluation mode and fused with model.eval().fuse() call.
  • Changed the profiling image batch size from 16 to 8 when CUDA is available.

🎯 Purpose & Impact

  • Ensures the model is in the correct state (evaluation mode) for profiling, potentially leading to more accurate performance measurements.
  • Model fusion during evaluation optimizes the model for inference, which should result in a faster and more efficient profiling process.
  • Reduced batch size may lower memory requirements during profiling, making it more accessible on devices with limited GPU memory and potentially speeding up the profiling process.

πŸš€ These changes could offer developers a better understanding of the model's performance characteristics and enable smoother experiences when optimizing and deploying YOLOv5 models.

@glenn-jocher glenn-jocher self-assigned this Mar 27, 2022
@glenn-jocher glenn-jocher merged commit b2194b9 into master Mar 27, 2022
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-1-1 branch March 27, 2022 18:24
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant