File size: 3,269 Bytes
6cdca59 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | ---
license: bsd-3-clause
language:
- en
base_model:
- YOLO26
pipeline_tag: depth-estimation
tags:
- WaveMatrix
- NPU
- yolo26-depth
---
# YOLO26-Depth
This repository provides an WaveMatrix NPU inference deployment example for the Ultralytics YOLO26-Depth depth-estimation model, including model conversion and WM9955 Python inference examples.
This version of YOLO26-Depth has been converted to run on the WaveMatrix NPU using mixed U8/U16 quantization for improved performance.
## Convert tools links:
For those who are interested in model conversion, you can try to export axmodel through
- [Pulsar2 Link, How to Convert ONNX to axmodel](https://pulsar2-docs.readthedocs.io/en/latest/pulsar2/introduction.html)
## Support Platform
- WM9955
- M.2 Accelerator card
- WM8845
- Demo board
### Performance Statistics
WM9955 (NPU3 mode)
| 樑ε | εθΎ¨η | θζΆ(ms) | FPS | CMM(MiB) |
|---|---:|---:|---:|---:|
| yolo26n-depth | 768x768 | 5.83 | 171.53 | 7.97 |
| yolo26s-depth | 768x768 | 8.33 | 120.05 | 14.90 |
| yolo26m-depth | 768x768 | 16.37 | 61.09 | 36.36 |
| yolo26l-depth | 768x768 | 20.74 | 48.22 | 41.12 |
| yolo26x-depth | 768x768 | 39.19 | 25.52 | 93.37 |
WM8845 (NPU2 mode)
| 樑ε | εθΎ¨η | θζΆ(ms) | FPS | CMM(MiB) |
|---|---:|---:|---:|---:|
| yolo26n-depth | 768x768 | 27.67 | 36.14 | 15.65 |
| yolo26s-depth | 768x768 | 41.68 | 23.99 | 22.75 |
| yolo26m-depth | 768x768 | 74.02 | 13.51 | 47.10 |
| yolo26l-depth | 768x768 | 94.04 | 10.63 | 44.77 |
| yolo26x-depth | 768x768 | 169.09 | 5.91 | 84.50 |
## How to use
Download all files from this repository to the device
```shell
root@wm9955~/root/yolo26-depth# tree -L 2
.
βββ asserts
βΒ Β βββ bus.jpg
βΒ Β βββ ssd_car_depth_heatmap_ax.png
βΒ Β βββ ssd_car_depth_heatmap_onnx.png
βΒ Β βββ ssd_car.jpg
βββ wm8845
βΒ Β βββ config.json
βΒ Β βββ yolo26l-depth_w8a8_mix.axmodel
βΒ Β βββ yolo26m-depth_w8a8_mix.axmodel
βΒ Β βββ yolo26n-depth_w8a8_mix.axmodel
βΒ Β βββ yolo26s-depth_w8a8_mix.axmodel
βΒ Β βββ yolo26x-depth_w8a8_mix.axmodel
βββ wm9955
βΒ Β βββ config.json
βΒ Β βββ yolo26l-depth_w8a8_mix.axmodel
βΒ Β βββ yolo26m-depth_w8a8_mix.axmodel
βΒ Β βββ yolo26n-depth_w8a8_mix.axmodel
βΒ Β βββ yolo26s-depth_w8a8_mix.axmodel
βΒ Β βββ yolo26x-depth_w8a8_mix.axmodel
βββ axengine-0.1.3-py3-none-any.whl
βββ calib_data.zip
βββ fold_depth_log.py
βββ infer_depth.py
βββ onnx
βΒ Β βββ yolo26l-depth.onnx
βΒ Β βββ yolo26m-depth.onnx
βΒ Β βββ yolo26n-depth.onnx
βΒ Β βββ yolo26s-depth.onnx
βΒ Β βββ yolo26x-depth.onnx
βββ README.md
βββ requirements.txt
```
Inference with WM9955 Host, such as demo board
```shell
cd /root/yolo26-depth
pip3 install -r requirements.txt
pip3 install axengine-0.1.3-py3-none-any.whl
# wavematrix npu infer
python3 infer_depth.py --model ./wm9955/yolo26n-depth_w8a8_mix.axmodel --source ./asserts/ssd_car.jpg
# onnxtuntime cpu infer
python3 infer_depth.py --model ./onnx/yolo26n-depth.onnx --source ./asserts/ssd_car.jpg
```
wavematrix npu output:
 |