Add model card and metadata for DEIMv2-Femto

#1
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +56 -4
README.md CHANGED
@@ -1,10 +1,62 @@
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
  ---
8
 
9
+ # DEIMv2-Femto
10
+
11
+ DEIMv2 is a real-time object detection framework introduced in the paper [Real-Time Object Detection Meets DINOv3](https://huggingface.co/papers/2509.20787). This specific checkpoint is the **Femto** variant, which is an ultra-lightweight model designed for mobile and edge deployment.
12
+
13
+ - **Paper:** [Real-Time Object Detection Meets DINOv3](https://huggingface.co/papers/2509.20787)
14
+ - **Repository:** [Intellindust-AI-Lab/DEIMv2](https://github.com/Intellindust-AI-Lab/DEIMv2)
15
+ - **Project Page:** [DEIMv2 Project Webpage](https://intellindust-ai-lab.github.io/projects/DEIMv2/)
16
+
17
+ ## Model Description
18
+ DEIMv2 represents an evolution of the DEIM framework, leveraging features from DINOv3. For ultra-lightweight models (Nano, Pico, Femto, and Atto), the architecture employs HGNetv2 with depth and width pruning. Combined with a simplified decoder and an upgraded Dense O2O training objective, DEIMv2 achieves superior performance-cost trade-offs compared to prior real-time detectors like the YOLO series.
19
+
20
+ ## Sample Usage
21
+
22
+ This model can be loaded using the `PyTorchModelHubMixin` integration. To use it, ensure you have the [official repository](https://github.com/Intellindust-AI-Lab/DEIMv2) code available to provide the necessary component definitions.
23
+
24
+ ```python
25
+ import torch.nn as nn
26
+ from huggingface_hub import PyTorchModelHubMixin
27
+
28
+ # Ensure the engine modules from the official repo are in your path
29
+ from engine.backbone import HGNetv2
30
+ from engine.deim import LiteEncoder, DEIMTransformer
31
+ from engine.deim.postprocessor import PostProcessor
32
+
33
+ class DEIMv2(nn.Module, PyTorchModelHubMixin):
34
+ def __init__(self, config):
35
+ super().__init__()
36
+ self.backbone = HGNetv2(**config["HGNetv2"])
37
+ self.encoder = LiteEncoder(**config["LiteEncoder"])
38
+ self.decoder = DEIMTransformer(**config["DEIMTransformer"])
39
+ self.postprocessor = PostProcessor(**config["PostProcessor"])
40
+
41
+ def forward(self, x, orig_target_sizes):
42
+ x = self.backbone(x)
43
+ x = self.encoder(x)
44
+ x = self.decoder(x)
45
+ x = self.postprocessor(x, orig_target_sizes)
46
+
47
+ return x
48
+
49
+ # Load the pretrained model
50
+ model = DEIMv2.from_pretrained("Intellindust/DEIMv2_HGNetv2_FEMTO_COCO")
51
+ model.eval()
52
+ ```
53
+
54
+ ## Citation
55
+ ```bibtex
56
+ @article{huang2025deimv2,
57
+ title={Real-Time Object Detection Meets DINOv3},
58
+ author={Huang, Shihua and Hou, Yongjie and Liu, Longfei and Yu, Xuanlong and Shen, Xi},
59
+ journal={arXiv},
60
+ year={2025}
61
+ }
62
+ ```