pytorch / pytorch/vision

box_area and box_iou functions for cxcywh format

Open
#8,961 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
17.9k
Forks
7.3k
Avg merge
1d 15h
Merged PRs (30d)
13

Description

🚀 The feature

Native box_area and box_iou functions for cxcywh format.

Motivation, pitch

Since the cxcywh format is common, we can use faster and simpler functions to calculate box area and box IoU directly in this format.

Currently, we first need to convert to the xyxy format before using box_area and box_iou in torchvision.

Alternatives

No response

Additional context

I can open a pull request from alperenunlu/vision@cf93d9e

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the existing box_area and box_iou implementations in torchvision and inspect how box formats are handled. Compare the requested cxcywh behavior with the current xyxy conversion path; done means native cxcywh area and IoU functions are available and their results are validated.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.