Menu

How to Fix Misplaced DETR Bounding Boxes in Mixed-Size Batches
📰

How to Fix Misplaced DETR Bounding Boxes in Mixed-Size Batches

DEV Community: computervision·Jack M·4 days ago
#R2bq9OcP
Long article (2374 words) — no AI summary yet.
Reading 0:00
15s threshold

A detector finds a label on a parcel. Its confidence score looks good, and all four corners of the box fall inside the photo. Yet the crop sent to the barcode reader shows plain cardboard. The same code worked on a square test image. Which part would you debug first?

Try giving the box decoder a prediction where you already know the answer. On an 800-by-400 photo, the box in this guide should start at pixel (200, 50) . Pass the image dimensions in the wrong order and it starts at (100, 100) . Both are valid places to draw. A bounds check, a label check, and a confidence threshold will all let the error through.

Here’s how to test DETR bounding boxes in mixed-size batches using two rows of synthetic model output. You can run the check on a CPU, without a checkpoint or a labeled dataset, then use it to trace the same bug in a serving pipeline.

What size does DETR need to draw a box?

Imagine following one photo from upload to display. The image decoder gives you pixels.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.