pytorch / pytorch/vision

draw_segmentation_instances

Open
#6,125 7 comments 0 reactions 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

Development a function torchvision.utils.draw_segmentation_instances to draw just the external contour of a mask.

Motivation, pitch

For torchvision.utils we have draw_bounding_boxes, draw, draw_segmentation_masks, draw_keypoints but still need to do some extra preprocess for getting the instance segmentation. Would be great to have a function draw_segmentation_instances to get just the external area of the ROI.

Alternatives

Similar to draw_bounding boxes, a optional argument fill could be added into draw_segmentation_instances to achieve this behavior.

Additional context

As far as I know. We need to use other libraries to achieve this.

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 reading the existing torchvision.utils drawing helpers, especially draw_bounding_boxes and draw_segmentation_masks, to understand their interfaces and behavior. Define the requested draw_segmentation_instances behavior around drawing only the external area of an instance mask, including whether the optional fill alternative is in scope. Done means the utility provides that instance-segmentation output without requiring another library.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.