Add README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
tags:
|
| 4 |
+
- heal
|
| 5 |
+
- horizon
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
# PETR (EfficientNet-b3)
|
| 9 |
+
|
| 10 |
+
PETR introduces 3D position into Transformer decoding: EfficientNet-b3 extracts multi-view image features, which are associated with 3D spatial positions via 3D positional encoding (SinePositionalEncoding3D); PETRTransformer queries interact directly with 3D position-encoded features to predict 3D detection boxes, without explicit BEV feature construction.
|
| 11 |
+
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
## Deployment Metrics
|
| 15 |
+
|
| 16 |
+
### Model Parameters
|
| 17 |
+
|
| 18 |
+
| Model | Model Input | Backbone | Neck | Model Output |
|
| 19 |
+
|---|---|---|---|---|
|
| 20 |
+
| PETR | 6-camera multi-view images `(B,6,3,512,1408)` | EfficientNet-b3 | — | Detection boxes `(B,900,21)` |
|
| 21 |
+
|
| 22 |
+
### Accuracy Metrics
|
| 23 |
+
|
| 24 |
+
| March | Metric | float | calibration | qat | hbm |
|
| 25 |
+
| --- | --- | --- | --- | --- | --- |
|
| 26 |
+
| J6M | NDS | 0.3881 | 0.3679 | 0.38 | 0.38 |
|
| 27 |
+
| | mAP | 0.3031 | 0.2807 | 0.2942 | 0.2942 |
|
| 28 |
+
|
| 29 |
+
> Data measured with `march = March.NASH_M` (J6M) configuration.
|
| 30 |
+
>
|
| 31 |
+
> HEAL version: heal 0.0.2 / hbdk4-compiler 4.11.11 / horizon_plugin_pytorch 3.3.10.
|
| 32 |
+
|
| 33 |
+
### Performance Metrics
|
| 34 |
+
|
| 35 |
+
> **Performance test methodology**: FPS is measured with single-core eight-thread; Latency is measured with single-core single-thread; Memory is peak DDR usage.
|
| 36 |
+
|
| 37 |
+
| March | latency (ms) | fps | Memory Usage |
|
| 38 |
+
|---|---|---|---|
|
| 39 |
+
| J6M | 33.13 | 30.51 | 101.00 |
|
| 40 |
+
| J6P | 21.56 | 186.12 | 105.30 |
|
| 41 |
+
| J6B | - | - | - |
|
| 42 |
+
|
| 43 |
+
J6B performance is not available for this model.
|
| 44 |
+
|
| 45 |
+
---
|
| 46 |
+
|
| 47 |
+
## Model Overview
|
| 48 |
+
|
| 49 |
+
### Core Design
|
| 50 |
+
|
| 51 |
+
PETR introduces 3D position into Transformer decoding: EfficientNet-b3 extracts multi-view image features, which are associated with 3D spatial positions via 3D positional encoding (SinePositionalEncoding3D); PETRTransformer queries interact directly with 3D position-encoded features to predict 3D detection boxes, without explicit BEV feature construction.
|
| 52 |
+
|
| 53 |
+
- **Task type**: BEV 3D object detection (BEV 3D Object Detection).
|
| 54 |
+
- **backbone**: EfficientNet-b3 (`efficientnet`, `model_type=b3`, `include_top=False` removes the classification head).
|
| 55 |
+
- **neck**: — (no standalone neck; backbone features feed directly into `PETRHead`).
|
| 56 |
+
- **Detection head**: `PETRHead` + `PETRTransformer` + `PETRDecoder` (3D position-aware Transformer decoder, `num_query=900`, `num_views=6`, `embed_dims=256`).
|
| 57 |
+
- **Loss function**: FocalLoss (cls) + L1Loss (reg), with Detr3dTarget Hungarian matching.
|
| 58 |
+
- **Model input**: 6-camera multi-view images, `data_shape=(3,512,1408)` (original `(3,900,1600)` resized to `(3,792,1408)` then cropped to `data_shape`), 6 views stacked as `(B,6,3,512,1408)`.
|
| 59 |
+
- **Model output**: Detection boxes `(B,900,21)` — 900 queries × (10 class scores + 11 regression: center xyz + size wlh + orientation sin/cos + velocity vxvy), `num_classes=10`, `reg_out_channels=10`.
|
| 60 |
+
|
| 61 |
+
### Official Repo and Paper
|
| 62 |
+
|
| 63 |
+
Official repo: https://github.com/megvii-research/PETR
|
| 64 |
+
Paper: https://arxiv.org/abs/2203.05625
|
| 65 |
+
|
| 66 |
+
Note: The backbone is EfficientNet-b3; the official repo uses a different backbone.
|
| 67 |
+
|
| 68 |
+
### Reference
|
| 69 |
+
|
| 70 |
+
For more J6 chip deployment details, see https://developer.horizon.auto/blog/10373
|