TECHNOLOGY

DETR detection slots: a predicted box is not automatically an object

In this article
THE QUICK TAKE

DETR returns predictions for query slots; classification and postprocessing determine which slots become retained detections.

Read the slot dimension correctly

DETR formulates detection as set prediction rather than treating every output row as a confirmed object. The original paper introduces learned object queries and matching during training. The output therefore includes a fixed set of prediction slots even for an image with very little content. Counting tensor rows as detected objects produces a misleading application result before the model’s classification evidence has been considered.

Account for the no-object outcome

The Transformers reference describes classification logits that include a no-object outcome. That outcome allows unused slots to remain unused. Inspect the selected model head and processor before interpreting its class axis, especially when replacing a detection checkpoint with a segmentation variant. The presence of box coordinates for a slot does not override the classification meaning or establish that the coordinates enclose a useful target.

Distinguish training assignment from inference filtering

The official DETR implementation includes the matching criterion used in training and the postprocessing path used for predictions. A training matcher associates predictions with available annotations; it is not a production tool for discovering the unknown ground truth of a new image. Keep the loss computation, score filtering and application acceptance policy distinct when explaining how a final detection list was produced.

Restore the box convention explicitly

Raw predicted boxes use a normalized center-and-size representation in the documented model interface. Postprocessing can convert them to image-space corners using the target dimensions. Verify this conversion before comparing predictions with a detector dataset or drawing overlays. Padding and batching do not authorize an application to apply the dimensions of a different image. A numerically valid rectangle can still describe the wrong canvas or coordinate convention.

Evaluate retained detections rather than raw capacity

Use a sample containing an empty scene, a crowded scene and partially visible objects. Record which postprocessing settings determine the final list, and distinguish missed detections from incorrect class labels. COCO annotation identities and image coordinate transforms provide supporting concepts. DETR’s slot-based output remains its own interface contract: neither the number of available queries nor the number of produced box tensors is an observed object count.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles