pytorch / pytorch/vision

Detection references are needlessly transforming masks

Open
#7,489 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug module: reference scripts Perf
Dominant language
Python
Stars
17.9k
Forks
7.3k
Avg merge
1d 15h
Merged PRs (30d)
13

Description

Something we realized today with @pmeier: even for pure detection tasks where masks aren't needed, the detection training references are still using the masks from COCO, which means that:

  • those masks are being decoded into images
  • those masks get transformed all the time e.g. here

Both these things are completely wasteful since masks aren't needed for detection tasks. According to some simple benchmark this significantly hurts performance.

(Not sure if that applies to Keypoints too, would need to check)

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 with references/detection/transforms.py and trace how COCO masks enter the detection training references. Verify that detection-only training no longer decodes or repeatedly transforms masks, using the reported performance benchmark if available; also check whether the same issue affects keypoints before defining the final scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision, performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.