File size: 2,220 Bytes
a2ba588
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
license: apache-2.0
tags:
  - object-detection
  - tensorrt
  - onnx
  - pytorch
  - real-time
datasets:
  - coco
library_name: transformers
pipeline_tag: object-detection
---

# DEIMv2 - Real-Time Object Detection Meets DINOv3

Pre-trained DEIMv2 models with PyTorch checkpoints, ONNX exports, and TensorRT FP16 engines.

## Model Zoo

| Model | AP | Params | GFLOPs | Checkpoint | ONNX | TensorRT |
|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| **Atto** | 23.8 | 0.5M | 0.8 | βœ… | βœ… | βœ… |
| **Femto** | 31.0 | 1.0M | 1.7 | βœ… | βœ… | βœ… |
| **Pico** | 38.5 | 1.5M | 5.2 | βœ… | βœ… | βœ… |
| **N** | 43.0 | 3.6M | 6.8 | βœ… | βœ… | βœ… |
| **S** | 50.9 | 9.7M | 25.6 | βœ… | βœ… | βœ… |
| **M** | 53.0 | 18.1M | 52.2 | βœ… | βœ… | βœ… |
| **L** | 56.0 | 32.2M | 96.7 | βœ… | βœ… | βœ… |
| **X** | 57.8 | 50.3M | 151.6 | βœ… | βœ… | βœ… |

## Files

- `*.pth` - PyTorch checkpoints (EMA weights)
- `*.onnx` - ONNX models (opset 17, dynamic batch)
- `*.engine` - TensorRT FP16 engines (built on RTX 4090, TensorRT 10.14)

## Input Shapes

| Model | Input Size |
|:---:|:---:|
| Atto | 320x320 |
| Femto | 416x416 |
| Pico, N, S, M, L, X | 640x640 |

## Usage

### PyTorch
```python
from huggingface_hub import hf_hub_download
import torch

# Download checkpoint
ckpt_path = hf_hub_download("carpedm20/DEIMv2", "deimv2_dinov3_s_coco.pth")
checkpoint = torch.load(ckpt_path, map_location='cpu')
state_dict = checkpoint['ema']['module']
```

### ONNX Runtime
```python
import onnxruntime as ort
from huggingface_hub import hf_hub_download

onnx_path = hf_hub_download("carpedm20/DEIMv2", "deimv2_dinov3_s_coco.onnx")
session = ort.InferenceSession(onnx_path)
```

### TensorRT
```python
import tensorrt as trt
from huggingface_hub import hf_hub_download

engine_path = hf_hub_download("carpedm20/DEIMv2", "deimv2_dinov3_s_coco.engine")
# Load engine with TensorRT runtime
```

## Citation

```bibtex
@article{huang2025deimv2,
  title={Real-Time Object Detection Meets DINOv3},
  author={Huang, Shihua and Hou, Yongjie and Liu, Longfei and Yu, Xuanlong and Shen, Xi},
  journal={arXiv},
  year={2025}
}
```

## License

Apache 2.0 - See [DEIMv2 GitHub](https://github.com/Intellindust-AI-Lab/DEIMv2) for details.