Update model card with paper, code and usage info

#1
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +57 -4
README.md CHANGED
@@ -1,10 +1,63 @@
1
  ---
 
 
2
  tags:
3
  - model_hub_mixin
4
  - pytorch_model_hub_mixin
 
5
  ---
6
 
7
- This model has been pushed to the Hub using the [PytorchModelHubMixin](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin) integration:
8
- - Code: [More Information Needed]
9
- - Paper: [More Information Needed]
10
- - Docs: [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: apache-2.0
3
+ pipeline_tag: object-detection
4
  tags:
5
  - model_hub_mixin
6
  - pytorch_model_hub_mixin
7
+ - object-detection
8
  ---
9
 
10
+ # DEIMv2-Pico
11
+
12
+ DEIMv2 is an evolution of the DEIM (Dense One-to-One DETR) framework, leveraging features from DINOv3 for real-time object detection. The **DEIMv2-Pico** variant is an ultra-lightweight model designed for mobile and edge deployment, achieving 38.5 AP on COCO with only 1.5 million parameters.
13
+
14
+ - **Paper:** [Real-Time Object Detection Meets DINOv3](https://huggingface.co/papers/2509.20787)
15
+ - **GitHub Repository:** [https://github.com/Intellindust-AI-Lab/DEIMv2](https://github.com/Intellindust-AI-Lab/DEIMv2)
16
+ - **Project Page:** [https://intellindust-ai-lab.github.io/projects/DEIMv2/](https://intellindust-ai-lab.github.io/projects/DEIMv2/)
17
+
18
+ ## Model Description
19
+ DEIMv2 establishes new state-of-the-art results for real-time DETRs across various model sizes. For the ultra-lightweight variants like Pico, the model utilizes an HGNetv2 backbone with depth and width pruning, a Lite encoder, and a simplified decoder. This design enables a superior performance-cost trade-off, matching the performance of larger models like YOLOv10-Nano with significantly fewer parameters.
20
+
21
+ ## Usage
22
+
23
+ You can load this model using the `PyTorchModelHubMixin` integration. To use it, you need to have the official [DEIMv2](https://github.com/Intellindust-AI-Lab/DEIMv2) source code in your Python path to import the necessary modules.
24
+
25
+ ```python
26
+ import torch.nn as nn
27
+ from huggingface_hub import PyTorchModelHubMixin
28
+
29
+ # The following imports require the source code from the DEIMv2 repository
30
+ from engine.backbone import HGNetv2
31
+ from engine.deim import LiteEncoder, DEIMTransformer
32
+ from engine.deim.postprocessor import PostProcessor
33
+
34
+ class DEIMv2(nn.Module, PyTorchModelHubMixin):
35
+ def __init__(self, config):
36
+ super().__init__()
37
+ self.backbone = HGNetv2(**config["HGNetv2"])
38
+ self.encoder = LiteEncoder(**config["LiteEncoder"])
39
+ self.decoder = DEIMTransformer(**config["DEIMTransformer"])
40
+ self.postprocessor = PostProcessor(**config["PostProcessor"])
41
+
42
+ def forward(self, x, orig_target_sizes):
43
+ x = self.backbone(x)
44
+ x = self.encoder(x)
45
+ x = self.decoder(x)
46
+ x = self.postprocessor(x, orig_target_sizes)
47
+ return x
48
+
49
+ # Load the model from the Hub
50
+ model = DEIMv2.from_pretrained("Intellindust/DEIMv2_HGNetv2_PICO_COCO")
51
+ model.eval()
52
+ ```
53
+
54
+ ## Citation
55
+ If you find DEIMv2 useful in your research, please cite:
56
+ ```bibtex
57
+ @article{huang2025deimv2,
58
+ title={Real-Time Object Detection Meets DINOv3},
59
+ author={Huang, Shihua and Hou, Yongjie and Liu, Longfei and Yu, Xuanlong and Shen, Xi},
60
+ journal={arXiv},
61
+ year={2025}
62
+ }
63
+ ```