Add README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
tags:
|
| 4 |
+
- heal
|
| 5 |
+
- horizon
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
# Deformable DETR (ResNet-50)
|
| 9 |
+
|
| 10 |
+
Deformable DETR replaces DETR's global self-attention with multi-scale deformable attention: each query only samples a small number of points near reference points, enabling faster convergence and lower compute. Four feature levels plus 900 queries provide multi-scale candidates, then the decoder progressively refines boxes layer by layer.
|
| 11 |
+
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
## Deployment Metrics
|
| 15 |
+
|
| 16 |
+
### Model Parameters
|
| 17 |
+
|
| 18 |
+
| Model | Model Input | Backbone | Neck | Model Output |
|
| 19 |
+
|---|---|---|---|---|
|
| 20 |
+
| DeformableDETR | Single image `1x3x800x1332` | ResNet-50 | `ChannelMapperNeck` | Detection boxes `(B,N,cls+reg)` |
|
| 21 |
+
|
| 22 |
+
### Accuracy Metrics
|
| 23 |
+
|
| 24 |
+
| March | Metric | float | calibration | qat | hbm |
|
| 25 |
+
| --- | --- | --- | --- | --- | --- |
|
| 26 |
+
| J6M | mAP | 0.4384 | 0.412 | 0.4526 | 0.4529 |
|
| 27 |
+
|
| 28 |
+
> Results are based on `march = March.NASH_M` (J6M) configuration.
|
| 29 |
+
>
|
| 30 |
+
> HEAL version: heal 0.0.2 / hbdk4-compiler 4.11.11 / horizon_plugin_pytorch 3.3.10.
|
| 31 |
+
|
| 32 |
+
### Performance Metrics
|
| 33 |
+
|
| 34 |
+
> **Performance measurement**: FPS is measured with single-core eight-thread; Latency is measured with single-core single-thread; Memory is peak DDR usage.
|
| 35 |
+
|
| 36 |
+
| March | latency (ms) | fps | Memory Usage |
|
| 37 |
+
|---|---|---|---|
|
| 38 |
+
| J6M | 144.84 | 6.92 | 656.00 |
|
| 39 |
+
| J6P | 78.02 | 28.89 | 672.80 |
|
| 40 |
+
| J6B | - | - | - |
|
| 41 |
+
|
| 42 |
+
J6B performance is not available for this model.
|
| 43 |
+
|
| 44 |
+
---
|
| 45 |
+
|
| 46 |
+
## Model Overview
|
| 47 |
+
|
| 48 |
+
### Core Design
|
| 49 |
+
|
| 50 |
+
Deformable DETR replaces DETR's global self-attention with multi-scale deformable attention: each query only samples a small number of points near reference points, enabling faster convergence and lower compute. Four feature levels plus 900 queries provide multi-scale candidates, then the decoder progressively refines boxes layer by layer.
|
| 51 |
+
|
| 52 |
+
- **Task type**: 2D object detection (2D Object Detection).
|
| 53 |
+
- **backbone**: ResNet-50 (`ResNet50`, `include_top=False` removes classification head).
|
| 54 |
+
- **neck**: `ChannelMapperNeck` (`in_channels=[512,1024,2048]`, `out_channel=256`, 1×1 conv, `extra_convs=1`).
|
| 55 |
+
- **Position encoding**: `PositionEmbeddingSine` (`num_pos_feats=128`, normalized).
|
| 56 |
+
- **Transformer**: `DeformableDetrTransformer` (encoder 6 layers + decoder 6 layers, `embed_dim=256`, `num_heads=8`, `feedforward_dim=1024`, `num_feature_levels=4`, `num_queries=900`).
|
| 57 |
+
- **Post-processing**: `DeformDetrPostProcess` (evaluation selects `select_box_nums_for_evaluation=300` boxes).
|
| 58 |
+
- **Loss**: `DeformableCriterion`: classification focal loss + L1 bbox + GIoU, `HungarianMatcher` bipartite matching, `aux_loss=True`.
|
| 59 |
+
- **Key flags**: `with_box_refine=False`, `as_two_stage=False`.
|
| 60 |
+
- **Model input**: Single image, size `800 × 1332`.
|
| 61 |
+
- **Model output**: 80-class detection boxes + confidence scores.
|
| 62 |
+
|
| 63 |
+
### Official Repo and Paper
|
| 64 |
+
|
| 65 |
+
Official repo: https://github.com/fundamentalvision/Deformable-DETR
|
| 66 |
+
Paper: https://arxiv.org/abs/2010.04159
|