Update README.md
Browse files
README.md
CHANGED
@@ -1,14 +1,33 @@
|
|
1 |
---
|
2 |
library_name: transformers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
This is the HF transformers implementation for D-FINE
|
6 |
|
7 |
-
|
8 |
|
9 |
D-FINE, a powerful real-time object detector that achieves outstanding localization precision by redefining the bounding box regression task in DETR models. D-FINE comprises two key components: Fine-grained Distribution Refinement (FDR) and Global Optimal Localization Self-Distillation (GO-LSD).
|
10 |
|
11 |
-
|
|
|
|
|
12 |
|
13 |
```python
|
14 |
import torch
|
@@ -34,4 +53,12 @@ for result in results:
|
|
34 |
for score, label_id, box in zip(result["scores"], result["labels"], result["boxes"]):
|
35 |
score, label = score.item(), label_id.item()
|
36 |
box = [round(i, 2) for i in box.tolist()]
|
37 |
-
print(f"{model.config.id2label[label]}: {score:.2f} {box}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
+
license: apache-2.0
|
4 |
+
language:
|
5 |
+
- en
|
6 |
+
pipeline_tag: object-detection
|
7 |
+
tags:
|
8 |
+
- object-detection
|
9 |
+
- vision
|
10 |
+
datasets:
|
11 |
+
- coco
|
12 |
---
|
13 |
+
## D-FINE
|
14 |
+
|
15 |
+
### **Overview**
|
16 |
+
|
17 |
+
The D-FINE model was proposed in [D-FINE: Redefine Regression Task in DETRs as Fine-grained Distribution Refinement](https://arxiv.org/abs/2410.13842) by
|
18 |
+
Yansong Peng, Hebei Li, Peixi Wu, Yueyi Zhang, Xiaoyan Sun, Feng Wu
|
19 |
+
|
20 |
+
This model was contributed by [VladOS95-cyber](https://github.com/VladOS95-cyber) with the help of [@qubvel-hf](https://huggingface.co/qubvel-hf)
|
21 |
|
22 |
This is the HF transformers implementation for D-FINE
|
23 |
|
24 |
+
### **Performance**
|
25 |
|
26 |
D-FINE, a powerful real-time object detector that achieves outstanding localization precision by redefining the bounding box regression task in DETR models. D-FINE comprises two key components: Fine-grained Distribution Refinement (FDR) and Global Optimal Localization Self-Distillation (GO-LSD).
|
27 |
|
28 |
+

|
29 |
+
|
30 |
+
### **How to use**
|
31 |
|
32 |
```python
|
33 |
import torch
|
|
|
53 |
for score, label_id, box in zip(result["scores"], result["labels"], result["boxes"]):
|
54 |
score, label = score.item(), label_id.item()
|
55 |
box = [round(i, 2) for i in box.tolist()]
|
56 |
+
print(f"{model.config.id2label[label]}: {score:.2f} {box}")
|
57 |
+
```
|
58 |
+
|
59 |
+
### **Training**
|
60 |
+
|
61 |
+
D-FINE is trained on COCO (Lin et al. [2014]) train2017 and validated on COCO val2017 dataset. We report the standard AP metrics (averaged over uniformly sampled IoU thresholds ranging from 0.50 − 0.95 with a step size of 0.05), and APval5000 commonly used in real scenarios.
|
62 |
+
|
63 |
+
### **Applications**
|
64 |
+
D-FINE is ideal for real-time object detection in diverse applications such as **autonomous driving**, **surveillance systems**, **robotics**, and **retail analytics**. Its enhanced flexibility and deployment-friendly design make it suitable for both edge devices and large-scale systems + ensures high accuracy and speed in dynamic, real-world environments.
|