Skip to content

[feature request] [discussion] mask utils in core #4415

Open
@vadimkantorov

Description

@vadimkantorov

🚀 The feature

  1. Extracting bounding boxes from label map: scatter_ supporting different reduction modes pytorch#22378 (comment), Ops to convert masks to boxes #3960 - scatter_reduce now supports amin/amax, so can be done in batched regime
  2. Extracting label maps from RGB label maps (Slower performance of eq and fill_ compared to numpy pytorch#5436)
  3. Conversion of RGB uint8 tensors to RGBA (or ARGB) uint32 tensor (Slower performance of eq and fill_ compared to numpy pytorch#5436 (comment)) 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions