QRCode-axera / README.md
wzf19947's picture
上传yolo26η€ΊδΎ‹
4d52916
|
Raw
History Blame Contribute Delete
5.26 kB
---
license: mit
pipeline_tag: object-detection
---
# QRCode_det
This version of QRCode detetion model has been converted to run on the Axera NPU using **w8a16** quantization.
This model has been optimized with the following LoRA:
Compatible with Pulsar2 version: 5.1
## Convert tools links:
For those who are interested in model conversion, you can try to export axmodel through
- [The original repo](https://github.com/wzf19947/QRCode_det), which you can get the detail of guide
- [Pulsar2 Link, How to Convert ONNX to axmodel](https://pulsar2-docs.readthedocs.io/en/latest/pulsar2/introduction.html)
- [The repo of AXera Platform](https://github.com/AXERA-TECH/ax-samples),which you can learn how to compile the C++ demo
## Support Platform
- AX650
- [M4N-Dock(爱芯派Pro)](https://wiki.sipeed.com/hardware/zh/maixIV/m4ndock/m4ndock.html)
- [M.2 Accelerator card](https://axcl-docs.readthedocs.io/zh-cn/latest/doc_guide_hardware.html)
- AX630C
- [爱芯派2](https://axera-pi-2-docs-cn.readthedocs.io/zh-cn/latest/index.html)
- [Module-LLM](https://docs.m5stack.com/zh_CN/module/Module-LLM)
- [LLM630 Compute Kit](https://docs.m5stack.com/zh_CN/core/LLM630%20Compute%20Kit)
- AX637
|Chips|model|cost|
|--|--|--|
||yolov5n|1.73 ms|
||yolov8n|3.64 ms|
||yolov9t|4.75 ms|
|AX650|yolov10n|3.67 ms|
||yolo11n|3.42 ms|
||yolo12n|6.87 ms|
||yolo26n|3.24 ms|
||NanodetPlus|2.16 ms|
||DEIMv2_femto(u16)|3.76 ms|
|||
||yolov5n|5.79 ms|
||yolov8n|9.26 ms|
||yolov9t|11.6 ms|
|AX630C|yolov10n|9.71 ms|
||yolo11n|9.65 ms|
||yolo12n|20.24 ms|
||yolo26n|10.04 ms|
||NanodetPlus|5.93 ms|
|||
||yolov5n|2.11 ms|
||yolov8n|4.04 ms|
||yolov9t|4.91 ms|
|AX637|yolov10n|4.05 ms|
||yolo11n|3.84 ms|
||yolo12n|6.40 ms|
||yolo26n|3.50 ms|
||NanodetPlus|2.38 ms|
## How to use
Download all files from this repository to the device
```
.
β”œβ”€β”€ config.json
β”œβ”€β”€ CPP
β”‚Β Β  β”œβ”€β”€ ax_deimv2_qrcode_batch
β”‚Β Β  β”œβ”€β”€ ax_nanodetplus_qrcode_batch
β”‚Β Β  β”œβ”€β”€ ax_yolov5_qrcode_batch
β”‚Β Β  β”œβ”€β”€ ax_yolov8_qrcode_batch
β”‚Β Β  └── ax_yolo26_qrcode_batch
β”œβ”€β”€ cpp_result.png
β”œβ”€β”€ images
β”‚Β Β  β”œβ”€β”€ qrcode_01.jpg
β”‚Β Β  β”œβ”€β”€ qrcode_02.jpg
β”‚Β Β  β”œβ”€β”€ qrcode_03.jpg
| β”œβ”€β”€ ...
β”‚Β Β  └── qrcode_55.jpg
β”œβ”€β”€ model
β”‚Β Β  β”œβ”€β”€ AX620E
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ nanodet-plus-m_630_npu1.axmodel
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ yolo11n_630_npu1.axmodel
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ yolo12n_630_npu1.axmodel
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ yolo26n_630_npu1.axmodel
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ yolov10n_630_npu1.axmodel
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ yolov5n_630_npu1.axmodel
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ yolov8n_630_npu1.axmodel
β”‚Β Β  β”‚Β Β  └── yolov9t_630_npu1.axmodel
β”‚Β Β  β”œβ”€β”€ AX637
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ nanodet-plus-m_637_npu1.axmodel
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ yolo11n_637_npu1.axmodel
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ yolo12n_637_npu1.axmodel
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ yolo26n_637_npu1.axmodel
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ yolov10n_637_npu1.axmodel
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ yolov5n_637_npu1.axmodel
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ yolov8n_637_npu1.axmodel
β”‚Β Β  β”‚Β Β  └── yolov9t_637_npu1.axmodel
β”‚Β Β  └── AX650
β”‚Β Β  β”œβ”€β”€ deimv2_femto_650_npu1_u16.axmodel
β”‚Β Β  β”œβ”€β”€ nanodet-plus-m_650_npu1.axmodel
β”‚Β Β  β”œβ”€β”€ yolo11n_650_npu1.axmodel
β”‚Β Β  β”œβ”€β”€ yolo12n_650_npu1.axmodel
β”‚Β Β  β”œβ”€β”€ yolo26n_650_npu1.axmodel
β”‚Β Β  β”œβ”€β”€ yolov10n_650_npu1.axmodel
β”‚Β Β  β”œβ”€β”€ yolov5n_650_npu1.axmodel
β”‚Β Β  β”œβ”€β”€ yolov8n_650_npu1.axmodel
β”‚Β Β  └── yolov9t_650_npu1.axmodel
β”œβ”€β”€ py_result.png
β”œβ”€β”€ python
β”‚Β Β  β”œβ”€β”€ QRCode_axmodel_infer_DEIMv2.py
β”‚Β Β  β”œβ”€β”€ QRCode_axmodel_infer_Nanodet.py
β”‚Β Β  β”œβ”€β”€ QRCode_axmodel_infer_v5.py
β”‚Β Β  β”œβ”€β”€ QRCode_axmodel_infer_v8.py
β”‚Β Β  β”œβ”€β”€ QRCode_axmodel_infer_26.py
β”‚Β Β  β”œβ”€β”€ QRCode_onnx_infer_DEIMv2.py
β”‚Β Β  β”œβ”€β”€ QRCode_onnx_infer_Nanodet.py
β”‚Β Β  β”œβ”€β”€ QRCode_onnx_infer_v5.py
β”‚Β Β  β”œβ”€β”€ QRCode_onnx_infer_v8.py
β”‚Β Β  β”œβ”€β”€ QRCode_onnx_infer_26.py
β”‚Β Β  └── requirements.txt
└── README.md
```
### Inference
Input Data:
```
|-- images
| `-- qrcode_01.jpg
| `-- qrcode_02.jpg
| `-- qrcode_03.jpg
| `-- qrcode_04.jpg...
```
#### Inference with AX650 Host, such as M4N-Dock(爱芯派Pro)
##### Python
run with python3 QRCode_axmodel_infer_xxx.py
```
root@ax650:~/QRCode# python3 QRCode_axmodel_infer_DEIMv2.py
[INFO] Available providers: ['AxEngineExecutionProvider']
[INFO] Using provider: AxEngineExecutionProvider
[INFO] Chip type: ChipType.MC50
[INFO] VNPU type: VNPUType.DISABLED
[INFO] Engine version: 2.12.0s
[INFO] Model type: 2 (triple core)
[INFO] Compiler version: 4.2 b98901c3
θ―†εˆ«ζˆεŠŸοΌ
图片 ./qrcode_test/qrcode_01.jpg 倄理耗既: 0.2165 η§’
θ―†εˆ«ζˆεŠŸοΌ
图片 ./qrcode_test/qrcode_02.jpg 倄理耗既: 0.1540 η§’
θ―†εˆ«ζˆεŠŸοΌ
图片 ./qrcode_test/qrcode_03.jpg 倄理耗既: 0.1456 η§’
θ―†εˆ«ζˆεŠŸοΌ
图片 ./qrcode_test/qrcode_05.jpg 倄理耗既: 0.1449 η§’
```
Output:
![alt text](py_result.png)
##### C++
```
./ax_xxx_qrcode_batch -m xxx_npu1.axmodel -i images/
```
Output:
![alt text](cpp_result.png)