pytorch / pytorch/vision

[feature request] [discussion] mask utils in core

Open
#4,415 12 comments 1 reaction 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
  1. Extracting bounding boxes from label map: https://github.com/pytorch/pytorch/issues/22378#issuecomment-881954924, https://github.com/pytorch/vision/issues/3960 - scatter_reduce now supports amin/amax, so can be done in batched regime
  2. Extracting label maps from RGB label maps (https://github.com/pytorch/pytorch/issues/5436)
  3. Conversion of RGB uint8 tensors to RGBA (or ARGB) uint32 tensor (https://github.com/pytorch/pytorch/issues/5436#issuecomment-920034956) for extracting "unique" labels faster
  4. Compression of masks (relevant for images with many objects / segments), e.g. RLE encoding / decoding as found in pycocotools.mask
Motivation, pitch

In detection/segmentation these utils are very frequent

Alternatives

No response

Additional context

No response

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 linked PyTorch and PyTorch Vision discussions and the pycocotools.mask API. The requested scope covers bounding-box and label-map extraction, RGB-to-packed-label conversion, and mask compression, so completion first requires settling which utilities belong in torchvision and defining their expected behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.