PyTorch training code and pretrained models for DETR (DEtection TRansformer). We replace the full complex hand-crafted object detection pipeline with a Transformer, and match Faster R-CNN with a ResNet-50, obtaining 42 AP on COCO using half the computation power (FLOPs) and the same number of parameters. Inference in 50 lines of PyTorch. What it is. Unlike traditional computer vision techniques, DETR approaches object detection as a direct set prediction problem. It consists of a set-based global loss, which forces unique predictions via bipartite matching, and a Transformer encoder-decoder architecture. Given a fixed small set of learned object queries, DETR reasons about the relations of the objects and the global image context to directly output the final set of predictions in parallel. Due to this parallel nature, DETR is very fast and efficient.

Features

  • DETR is very simple to implement and experiment with
  • We provide baseline DETR and DETR-DC5 models
  • The models are also available via torch hub
  • There are no extra compiled components in DETR and package dependencies are minimal
  • We train DETR with AdamW setting learning rate in the transformer to 1e-4 and 1e-5 in the backbone
  • We show that it is relatively straightforward to extend DETR to predict segmentation masks

Project Samples

Project Activity

See All Activity >

License

Apache License V2.0

Follow DETR

DETR Web Site

Other Useful Business Software
Gemini 3 and 200+ AI Models on One Platform Icon
Gemini 3 and 200+ AI Models on One Platform

Access Google's best plus Claude, Llama, and Gemma. Fine-tune and deploy from one console.

Build generative AI apps with Vertex AI Studio. Switch between models without switching platforms.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of DETR!

Additional Project Details

Programming Language

Python

Related Categories

Python Object Oriented Software, Python Image Recognition Software, Python Computer Vision Libraries, Python Object Detection Models

Registered

2021-08-04