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

Interpret DETR object queries, the no-object class and normalized boxes before turning fixed-size model outputs into an application detection list.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-detr-query-slots-no-object-output/
Language: en

## Read the slot dimension correctly

DETR formulates detection as set prediction rather than treating every output row as a confirmed object. The [original paper](https://arxiv.org/abs/2005.12872) 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](https://huggingface.co/docs/transformers/model_doc/detr) 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](https://github.com/facebookresearch/detr) 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](/journal/data-guide-coco-instance-caption-identities/) and [image coordinate transforms](/journal/data-guide-image-exif-box-coordinate/) 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.
