# DETR (2020)

> Framed object detection as direct set prediction with a Transformer, dropping anchors and non-maximum suppression.

Page: https://mralbu.github.io/ai-datasets/p/detr

## Key facts

- Title: End-to-End Object Detection with Transformers
- Authors: Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, Sergey Zagoruyko
- Venue: ECCV 2020
- Category: Vision
- Paper: https://www.alphaxiv.org/abs/2005.12872

## Why it matters

For seven years every major detector relied on hand-designed anchor boxes, label-assignment rules and non-maximum suppression. DETR replaced the entire pipeline with a standard Transformer and a set loss whose inference fits in fifty lines of PyTorch, kicking off the line of Transformer detectors from Deformable DETR to RT-DETR.

## The idea

Pass CNN feature maps into a Transformer encoder–decoder together with a fixed set of learned object queries that attend to the image and to one another, outputting all boxes and classes in parallel. During training, Hungarian bipartite matching assigns each ground-truth object to a unique prediction, so the model learns not to emit duplicates and needs no NMS post-processing.

## The result

42.0 AP on COCO val2017 at 28 frames per second with ResNet-50 (44.9 AP with ResNet-101-DC5), matching a heavily tuned Faster R-CNN-FPN baseline while clearly ahead on large objects.

## The data

- [MS COCO (2014)](https://mralbu.github.io/ai-datasets/d/coco.md): 330k everyday scenes with 1.5M labeled objects in 80 categories.

## Builds on

- [Faster R-CNN (2015)](https://mralbu.github.io/ai-datasets/p/faster-rcnn.md)
- [Transformer (2017)](https://mralbu.github.io/ai-datasets/p/transformer.md)
- [ResNet (2015)](https://mralbu.github.io/ai-datasets/p/resnet.md)

## Led to

- [Mask2Former (2021)](https://mralbu.github.io/ai-datasets/p/mask2former.md)
- [SAM (2023)](https://mralbu.github.io/ai-datasets/p/sam.md)

## Part of

- [Object detection](https://mralbu.github.io/ai-datasets/t/object-detection.md) (step 6 of 6)
