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

Update IoU functions #10123

Merged
merged 1 commit into from
Nov 10, 2022
Merged

Update IoU functions #10123

merged 1 commit into from
Nov 10, 2022

Conversation

glenn-jocher
Copy link
Member

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

Remove box area function and support expandable bbox_iou() calls.

Signed-off-by: Glenn Jocher glenn.jocher@ultralytics.com

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Optimization of bounding box intersection calculations in YOLOv5.

πŸ“Š Key Changes

  • Changed .chunk(4, 1) to .chunk(4, -1) to adjust tensor slicing.
  • Removed the box_area function and incorporated its calculations directly into the box_iou function.
  • Simplified the box intersection calculation by using .unsqueeze and .chunk in a more effective way.

🎯 Purpose & Impact

  • πŸƒ Accelerates intersection-over-union (IoU) computations - a critical piece for evaluating object detection accuracy.
  • 🧼 Cleans up the codebase by eliminating unnecessary functions, making the code cleaner and potentially reducing memory overhead.
  • πŸ›  Might impact the users by providing a slight performance boost in computing metrics during model training and evaluation.

Remove box area function and support expandable bbox_iou() calls.

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher glenn-jocher self-assigned this Nov 10, 2022
@glenn-jocher glenn-jocher merged commit 078059c into master Nov 10, 2022
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-3 branch November 10, 2022 17:32
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