Skip to content

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 [email protected]

🛠️ 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 <[email protected]>
@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.

1 participant