YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
DEIMv2.axera
DEIMv2 Real-Time Object Detection Meets DINOv3, running on Axera NPU (AX650).
This repo contains the deployment-ready ONNX graph, the Pulsar2 build configuration, calibration data, and a minimal inference script.
| Model | Note |
|---|---|
deimv2_pico.onnx |
DEIMv2-HGNetv2-Pico, 640x640, with in-graph post-processing. |
deimv2_s.onnx |
DEIMv2-DINOv3-S, 640x640, with in-graph post-processing. |
deimv2_x.onnx |
DEIMv2-DINOv3-X, 640x640, with in-graph post-processing |
Results
COCO val2017 (all 5,000 images), bbox mAP@0.50:0.95 using COCOeval and a score threshold of 0.001. The axmodels were evaluated on an AX650A board in NPU1 mode.
| Model | Official FP32 ONNX | AX650A axmodel | NPU1 Latency(ms) | NPU3 Latency(ms) |
|---|---|---|---|---|
| Pico | 0.384 | 0.375 | ~10.193 | 5.389 |
| S | 0.506 | 0.506 | ~155 | 42.395 |
| X | 0.567 | 0.577 | ~355 | ~118 |
Build
Requires the Axera Pulsar2 toolchain (pulsar2).
pulsar2 build --config config.json --input onnx/deimv2_s.onnx
Inference on board
Copy compiled.axmodel, infer.py and a test image to the board, then:
python3 infer.py -m compiled.axmodel -i test.jpg
Or
python3 infer.py -m compiled.axmodel -d /path/to/images --thr 0.6 -o vis/
Dependencies on board: axengine, numpy, Pillow.
On PC (FP32 reference):
python3 infer.py -m onnx/deimv2_s.onnx -i test.jpg
Note: freezing orig_target_sizes for production
orig_target_sizes only tells the post-processor how to scale boxes back to the
original image size. If your deployment always feeds images of one fixed
resolution (e.g. a 1920x1080 camera stream), you can hard-code it and drop the
second input: in the ONNX graph, replace the orig_target_sizes graph input
with an initializer holding [w, h], remove the matching input_configs entry
from config.json, and rebuild. Do not do this if input resolutions vary —
boxes would be scaled with the wrong size.
License
BSD 3-Clause License. See LICENSE.
