Skip to content

Conversation

@glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Apr 10, 2022

Eliminates all unsafe function in YOLOv5 out of an abundance of caution.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Improved safety in anchor chunking during target building in YOLOv5 loss calculation.

📊 Key Changes

  • Replaced unsafe_chunk with chunk in the build_targets method within utils/loss.py.

🎯 Purpose & Impact

  • 🛡️ Enhanced Safety: The change from unsafe_chunk to chunk avoids potential out-of-bounds memory access, which can lead to undefined behavior.
  • Reliability: Ensures the target-building process in loss computation is more reliable across various environments and input data scenarios.
  • 🚀 User Trust: Users can trust that their models are trained with robust and error-resistant code, likely reducing bugs and training issues.

Eliminates all unsafe function in YOLOv5 out of an abundance of caution.
@glenn-jocher glenn-jocher self-assigned this Apr 10, 2022
@glenn-jocher
Copy link
Member Author

Also removes named argument for slight speed improvements.

@glenn-jocher glenn-jocher merged commit 1993efd into master Apr 10, 2022
@glenn-jocher glenn-jocher deleted the update/unsafe branch April 10, 2022 11:53
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
Eliminates all unsafe function in YOLOv5 out of an abundance of caution.
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.

1 participant