Preprocessing helper for Normalized and Denormalized Boxes
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 7.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 13
Description
🚀 Feature
We recently had box_convert function which helps interconversions of boxes.
I missed the cases where bounding boxes are normalized.
People would like to Denormalize them as well as Normalize them back.
Motivation
Motivation was same as box_convert. We need these quick helper functions which are often used through Albumentations, etc. This is boiler plate of most object detectino repos / models. Datasets come in all sort of formats.
Pitch
This can be done in 3 ways. I am not sure which one is good.
- Have 2 seperate utilites like
denormalize_boxes,normalize_boxes. Just like other box ops such asbox_area,box_iou - Make this part of
box_convert. We can have an extra argumentnoramalize. This seems hacky and can cause other torchscript errors. So not pretty sure if it would be nice. - Can this be transform? Like
T.NormalizeBox()andT.DenormalizeBox(). I haven't worked with transforms closely so not sure. But can be an idea.
Alternatives
Again this is utlity. No forcing. But something useful that bounding boxes often need.
Additional context
Maybe there is a function in torchvision / workaround which I'm not aware of.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing box_convert helper and related box operations in torchvision. Compare the proposed separate utilities, box_convert extension, and transforms approach, then define the API and normalization convention and add coverage for normalized and denormalized bounding boxes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- computer-vision
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100