pytorch / pytorch/vision

Generalize masks_to_boxes op to support N-dimensional masks to bounding boxes conversion

Open
#4,339 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

🚀 The feature

Ops to convert N-dimensional segmentation masks to N-dimensional bounding boxes.

Motivation, pitch

Build upon #3960 to support the conversion of N-dimensional asks to bounding boxes.

Use cases:

  1. I have 3D images (from medical imaging) and would like to convert segmentation masks (of tumors, aneurysms, etc.) to bounding boxes.

  2. Sometimes different sources of data are stacked together, giving me 4D images (3D images, stacked along a new dimension to make the image source clear). I would also like to convert these segmentation masks to bounding boxes, although I will admit, I would compute bounding boxes in 3D and then stack those as well.

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 reviewing the existing masks_to_boxes operation referenced through #3960. Define how N-dimensional segmentation masks should map to bounding boxes, including the 3D and 4D medical-imaging cases; done means the requested dimensional conversions are supported and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.