Skip to content

Skip unused COCO masks in detection references - #9642

Open
Marchematics wants to merge 1 commit into
pytorch:mainfrom
Marchematics:fix/detection-skip-unused-masks
Open

Skip unused COCO masks in detection references#9642
Marchematics wants to merge 1 commit into
pytorch:mainfrom
Marchematics:fix/detection-skip-unused-masks

Conversation

@Marchematics

Copy link
Copy Markdown

Motivation

Fixes #7489. Detection-only reference runs decode and transform COCO segmentation masks even though they are not used.

Modification

Pass with_masks through the v1 COCO conversion path and skip mask decoding when masks are not requested. Instance-segmentation models keep the existing mask path.

Checklist

  • Ruff checks pass
  • Added a regression test
  • Focused test passes: python -m pytest test/test_references_detection.py -q

Copilot AI lite review requested due to automatic review settings August 31, 2026 14:06
@pytorch-bot

pytorch-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/9642

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the cla signed label Aug 31, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detection references are needlessly transforming masks

2 participants