pytorch / pytorch/vision

Preprocessing helper for Normalized and Denormalized Boxes

Open
#2,936 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

new feature topic: object detection
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.

  1. Have 2 seperate utilites like denormalize_boxes, normalize_boxes. Just like other box ops such as box_area, box_iou
  2. Make this part of box_convert. We can have an extra argument noramalize. This seems hacky and can cause other torchscript errors. So not pretty sure if it would be nice.
  3. Can this be transform? Like T.NormalizeBox() and T.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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.