CenterCrop keeps GT boxes outside the crop as [0, 0, 0, 0], so they count as false negatives
Maintainers usually reply within 6 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- machine-learning, testing
Research direction
Start by locating TorchImageDetectionModel and ImageDetectionTorchDataset, then trace how the crop is added to the dataset transforms and how ground-truth boxes and labels are handled. Check existing transform tests and add a case where a box falls fully outside the center crop. Done means the degenerate box and its label are removed, so the visible object’s metrics are not reduced by an unmatched ground-truth box.
Written by the indexing model from the issue text.
Description
When a detection model config has crop, TorchImageDetectionModel adds CenterCrop to transform_input, and ImageDetectionTorchDataset applies it to the GT boxes too. torchvision v2 clamps GT boxes that are fully outside the crop to [0, 0, 0, 0] but keeps them, with their labels. They can never be matched, so each one counts as a FN.
Small example:a 400x400 image with 2 GT boxes, [150,150,250,250] (inside a 200x200 center crop) and [0,0,50,50] (outside it):
GT boxes after crop: [[50, 50, 150, 150], [0, 0, 0, 0]]
metrics for a perfect prediction: Recall 0.5, AP 0.545, FN 1
The model finds the only visible object but recall is cut in half.
Possible fix:add SanitizeBoundingBoxes() after the crop in the dataset transform, so degenerate GT boxes are removed together with their labels. I can open a PR.
- Dominant language
- Python
- Stars
- 117
- Forks
- 121
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from JdeRobot/PerceptionMetrics
-
COCO loader drops images that have the same file name in different subfoldersPossibly taken @Vivaan-Atharva claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
JdeRobot/PerceptionMetrics#702 ·
Maintainers usually reply within 6 days
-
YOLO loader only handles one image extension: other images are dropped or fail in read_annotationPossibly taken @soujasK claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
JdeRobot/PerceptionMetrics#700 ·
Maintainers usually reply within 6 days
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
JdeRobot/PerceptionMetrics#698 ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
JdeRobot/PerceptionMetrics#693 ·
Maintainers usually reply within 6 days
-
COCO-style mAP@[0.5:0.95] doesn't match pycocotools (uses 11-point interpolation)May be free again @clarkf19 claimed this 16 days ago, and no pull request is open. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
JdeRobot/PerceptionMetrics#685 · 3 comments ·
Maintainers usually reply within 6 days
All issues in JdeRobot/PerceptionMetrics
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
daniel-ospina/tortoise#15014 ·
Maintainers usually reply within 1 day
-
area:api p2 product:business triage:active type:feat
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
cuadrao-ai/argus#2656 ·
Maintainers usually reply within 1 day
-
documentation good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
good first issue tests
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
yeab7505/tenasig#20 · 1 comment ·
Maintainers usually reply within 1 day