# DEIM: the DETR training trick that cut real-time detection convergence times

> A CVPR 2025 research framework from Intellindust AI Lab that changes how DETR matches queries during training, and the model zoo it ships across five sizes.

**Intellindust-AI-Lab/DEIM** — [CVPR 2025] DEIM: DETR with Improved Matching for Fast Convergence

- Repository: https://github.com/Intellindust-AI-Lab/DEIM
- Website: https://www.shihuahuang.cn/DEIM/
- Stars: 1,624 · Forks: 202
- Language: Python
- License: NOASSERTION
- Published: 2026-10-06 · Updated: 2026-10-06 · Language: en
- Canonical page: https://hysenlabs.com/projects/intellindust-ai-lab-deim

## A training framework, not a new detector

The most common misreading of DEIM is that it is a detector. It is not. The repository describes itself as an advanced training framework designed to enhance the matching mechanism in DETRs, enabling faster convergence and improved accuracy, and the paper behind it, arXiv 2412.04234, was accepted to CVPR 2025. The contribution sits in the training loop rather than in the network you deploy.

That distinction matters for anyone deciding whether to adopt it. If you have a trained DETR checkpoint and want a faster inference path, DEIM does nothing for you. If you are training a DETR variant from scratch and the convergence schedule is your bottleneck, DEIM is the thing to look at.

The mechanism is dense one-to-one matching, which the repository topics name directly as `dense-o2o`. The Updates section dates this work: the series was released on 2024-12-03, the paper was accepted on 2025-02-27, and a more efficient implementation of Dense O2O landed on 2024-12-26 with a nearly 30% improvement in loading speed. The credits on that one go to Longfei Liu, who was also an author on the later DEIMv2 paper, which suggests the loading path was a known bottleneck early and got attention early.

## Who built it and where it lives now

The authorship spans four institutions, which is unusual for a detection training trick and tells you something about where the idea came from. Shihua Huang, Yongjun Yu and Xi Shen are at Intellindust AI Lab. Zhichao Lu is at City University of Hong Kong. Xiaodong Cun is at Great Bay University. Xiao Zhou is at Hefei Normal University. Xi Shen is the corresponding author, and the contact address in the README is shenxiluc@gmail.com.

Here is a wrinkle worth knowing before you file an issue. The repository lives under the `Intellindust-AI-Lab` organisation, but the README links point somewhere else. The license link, the pull request link, the issue link and the star link in the badge row all target `ShihuaHuang95/DEIM`, and so do the table of contents anchors and the model zoo config paths. The project page is a personal site at `www.shihuahuang.cn/DEIM/`. Whether those links still redirect depends on GitHub's handling of renamed accounts, and the materials available for this article do not confirm that they do.

The repository has 1,624 stars, 202 forks and 92 open issues. There are no published releases, so nothing is versioned for you to pin against; you clone the default branch and work with a `train.py` entry point and the configs in `configs/`.

## The DEIM-D-FINE numbers, model by model

The model zoo table is the part most people arrive for. It is laid out as a paired comparison: for each model size, the AP the D-FINE baseline achieves on COCO, the AP DEIM reaches with the same backbone, then parameter count, latency, GFLOPs and links to a YAML config and a checkpoint.

The smallest entry is N, at 42.8 AP for D-FINE and 43.0 for DEIM, with 4M parameters, 7 GFLOPs and 2.12ms latency. S goes from 48.7 to 49.0 at 10M parameters and 3.49ms. M is 52.3 against 52.7 at 19M parameters, 57 GFLOPs and 5.62ms. L moves 54.0 to 54.7 at 31M parameters, 91 GFLOPs and 8.07ms. The largest, X, goes from 55.8 to 56.5 with 62M parameters, 202 GFLOPs and 12.89ms.

Two things are worth reading off that table. The margin grows with model size, from 0.2 AP at N to 0.7 AP at L and X, which is the opposite of what you would expect if the contribution were mostly an optimization artifact. And parameter counts, GFLOPs and latency are identical between the two columns, because DEIM changes training rather than the architecture, so the inference cost of a DEIM-trained model is the inference cost of the baseline it was trained on.

The configs live under `configs/deim_dfine/`, with filenames following the pattern `deim_hgnetv2_n_coco.yml` through `deim_hgnetv2_x_coco.yml`, so the backbone across this table is HGNetv2.

## The RT-DETRv2 table and the pretraining footnote

A second table applies the same treatment to RT-DETRv2 instead of D-FINE, and the contrast is more informative than the D-FINE table. The S variant is listed at 47.9 AP for RT-DETRv2 and 49.0 for DEIM, a 1.1 point gain, with 20M parameters, 60 GFLOPs and 4.59ms latency. That is a larger jump than DEIM's best case on the D-FINE table.

The likely reading is that the benefit depends on how much the baseline's own training was struggling. RT-DETRv2 is a real-time oriented model built on a different lineage than D-FINE, and if DEIM's contribution is reducing redundant matching work, it has more to recover on a baseline that was doing that work wastefully. That is an inference from the numbers rather than a claim the repository makes, and the README does not explain the mechanism in prose beyond naming the matching change.

One more number needs a caveat. The Updates log records a separately pretrained DEIM-D-FINE-X model on Object365 that reaches 59.5% AP after fine-tuning for 24 COCO epochs. That is not a training-free result and it is not comparable to the 56.5 AP in the from-scratch X row. It appears in the changelog rather than the model zoo table, which is the right place for it, and the release notes say plainly that it requires fine-tuning.

## What the repository actually contains

The tree is small enough to read in full, which is unusual for a research repository of this profile. It holds `configs/`, `engine/`, `figures/`, `tools/`, a `train.py` entry point, a `requirements.txt` and a `LICENSE`. There is no inference script at the root and no packaging file, which tells you this is built to be run from a clone in a Python environment rather than installed.

The dependency list is short, and the version floors are the interesting part:

```
torch>=2.0.1
torchvision>=0.15.2
faster-coco-eval>=1.6.5
PyYAML
tensorboard
scipy
calflops
transformers
```

PyTorch and torchvision carry lower bounds only, so nothing prevents a much newer release from being installed. `faster-coco-eval` is what makes the AP numbers in the model zoo comparable across runs, `calflops` accounts for the GFLOPs column, and `transformers` is there for the pretrained backbones rather than for any text task.

Neither `tools/` nor `engine/` is described in the README, so the module boundaries inside those directories are not something you can learn from the documentation. You would be reading the source to find them. That is a fair trade for a research codebase, but worth knowing before you budget time for it.

On licensing, there is a mismatch worth flagging. No recognised license identifier is attached to the repository, while the README badge claims Apache 2.0 and the tree contains a `LICENSE` file. The badge and the file agree with each other, so the missing identifier is the odd one out. Read the `LICENSE` file directly if the distinction matters to you.

## The handoff to DEIMv2, and where DEIM sits now

DEIM has been superseded in practice by its own successor, and the README is upfront about it. Two banner lines at the top announce EdgeCrafter and DEIMv2, and the Updates log marks DEIMv2 as available since 2025-09-26, with a project page and a release repository under the same organisation. That successor went in a different direction: it leans on DINOv3 features and adds sizes small enough for mobile, with Atto, Femto and Pico named in the changelog and Atto reported at 23.8 AP on COCO at 320x320 resolution.

So the practical question is whether to start with DEIM or DEIMv2. If you want to reproduce the CVPR 2025 result, understand the matching change or build on the D-FINE and RT-DETRv2 baselines listed in this repository, DEIM is the relevant code. If you want a detector you might actually deploy, the successor's size range is closer to what you need and it shares lineage with the LightlyTrain library, which suggests outside adoption.

On maintenance, the last push to the default branch was 2026-03-24. That is a real date rather than a signal about intent, and it sits well after the DEIMv2 release, which suggests attention moved to the successor. With no tagged releases and 92 open issues against 1,624 stars, the realistic path is to fork, pin the commit you train against, and not expect upstream patches to a script you are running. The open issue count is the number to watch if you hit a problem, because that is where the answers are, and it is large enough that you should search before filing.

## Conclusion

DEIM is worth adopting if you are training a DETR-family detector from scratch on COCO or a comparable dataset and care about convergence speed more than about inference tricks. It is not the right tool if you need an inference-only change, since the gains live in the training loop. What to verify first is whether your budget survives the full schedule: the repository is a research codebase with 92 open issues, no published releases, and a last push on 2026-03-24, so the practical path is to clone a config, train it, and compare against the D-FINE and RT-DETRv2 baselines in the same table. If your group is already tracking this lab's work, DEIMv2 is the more forward-looking place to start, and DEIM is best read as the paper and baseline that DEIMv2 grew out of.

## FAQ

### What does DEIM stand for and what does it change?

DETR with Improved Matching. It is a training framework from Intellindust AI Lab, published at arXiv 2412.04234 and accepted to CVPR 2025, that modifies the query matching mechanism inside DETR so training converges faster. The repository topics name the change as dense-o2o, or dense one-to-one matching.

### Is DEIM a detector model or a training technique?

A training technique. DEIM does not change the network architecture, so a DEIM-trained model has the same parameter count, GFLOPs and inference latency as the baseline it was trained on. In the model zoo the DEIM and D-FINE columns share identical cost figures and differ only in AP. If you need an inference-side speedup, this repository is not where you will find it.

### What accuracy does DEIM reach on COCO?

On the DEIM-D-FINE table, DEIM beats D-FINE at every listed size: 43.0 vs 42.8 AP at N, 49.0 vs 48.7 at S, 52.7 vs 52.3 at M, 54.7 vs 54.0 at L, and 56.5 vs 55.8 at X. On the RT-DETRv2 table the S variant reaches 49.0 AP against a 47.9 baseline. The margin widens with model size on the D-FINE table.

### How do I install and run DEIM?

Clone the repository and train from `train.py`, using a config from `configs/deim_dfine/` such as `deim_hgnetv2_n_coco.yml`. Dependencies are `torch>=2.0.1`, `torchvision>=0.15.2`, `faster-coco-eval>=1.6.5`, PyYAML, tensorboard, scipy, calflops and transformers. The README also ships an Object365-pretrained DEIM-D-FINE-X checkpoint that reports 59.5% AP after 24 COCO fine-tuning epochs.

### Should I use DEIM or DEIMv2?

DEIMv2 if you want a deployable detector, since it adds mobile-oriented sizes down to Atto and leverages DINOv3 features. DEIM if you want to reproduce the CVPR 2025 result, study the matching change, or build on the D-FINE and RT-DETRv2 baselines. DEIMv2 has been available since 2025-09-26 as a separate repository under the same organisation.

## Sources

- [Intellindust-AI-Lab/DEIM on GitHub](https://github.com/Intellindust-AI-Lab/DEIM)
- [Issues](https://github.com/Intellindust-AI-Lab/DEIM/issues)
- [Project website](https://www.shihuahuang.cn/DEIM/)
- [README](https://github.com/Intellindust-AI-Lab/DEIM/blob/main/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/intellindust-ai-lab-deim
