Commit
·
b5aeeeb
0
Parent(s):
first commit
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +2 -0
- README.md +100 -0
- images/qrcode_01.jpg +0 -0
- images/qrcode_02.jpg +0 -0
- images/qrcode_03.jpg +0 -0
- images/qrcode_05.jpg +0 -0
- images/qrcode_06.jpg +0 -0
- images/qrcode_08.jpg +0 -0
- images/qrcode_09.jpg +0 -0
- images/qrcode_11.jpg +0 -0
- images/qrcode_12.jpg +0 -0
- images/qrcode_13.jpg +0 -0
- images/qrcode_14.jpg +0 -0
- images/qrcode_15.jpg +0 -0
- images/qrcode_16.jpg +0 -0
- images/qrcode_17.jpg +0 -0
- images/qrcode_18.jpg +0 -0
- images/qrcode_19.jpg +0 -0
- images/qrcode_20.jpg +0 -0
- images/qrcode_21.jpg +0 -0
- images/qrcode_22.jpg +0 -0
- images/qrcode_23.jpg +0 -0
- images/qrcode_24.jpg +0 -0
- images/qrcode_25.jpg +0 -0
- images/qrcode_26.jpg +0 -0
- images/qrcode_27.jpg +0 -0
- images/qrcode_28.jpg +0 -0
- images/qrcode_29.jpg +0 -0
- images/qrcode_30.jpg +0 -0
- images/qrcode_31.jpg +0 -0
- images/qrcode_33.jpg +0 -0
- images/qrcode_34.jpg +0 -0
- images/qrcode_35.jpg +0 -0
- images/qrcode_36.jpg +0 -0
- images/qrcode_37.jpg +0 -0
- images/qrcode_38.jpg +0 -0
- images/qrcode_39.jpg +0 -0
- images/qrcode_41.jpg +0 -0
- images/qrcode_42.jpg +0 -0
- images/qrcode_43.jpg +0 -0
- images/qrcode_44.jpg +0 -0
- images/qrcode_45.jpg +0 -0
- images/qrcode_46.jpg +0 -0
- images/qrcode_47.jpg +0 -0
- images/qrcode_48.jpg +0 -0
- images/qrcode_49.jpg +0 -0
- images/qrcode_50.jpg +0 -0
- images/qrcode_51.jpg +0 -0
- images/qrcode_52.jpg +0 -0
- images/qrcode_53.jpg +0 -0
.gitattributes
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.axmodel filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
pipeline_tag: image-detection
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
# CodeFormer
|
| 7 |
+
|
| 8 |
+
This version of CoderFormer has been converted to run on the Axera NPU using **w8a16** quantization.
|
| 9 |
+
|
| 10 |
+
This model has been optimized with the following LoRA:
|
| 11 |
+
|
| 12 |
+
Compatible with Pulsar2 version: 4.2
|
| 13 |
+
|
| 14 |
+
## Convert tools links:
|
| 15 |
+
|
| 16 |
+
For those who are interested in model conversion, you can try to export axmodel through
|
| 17 |
+
|
| 18 |
+
- [The repo of AXera Platform](https://github.com/wzf19947/QRCode_det), which you can get the detail of guide
|
| 19 |
+
|
| 20 |
+
- [Pulsar2 Link, How to Convert ONNX to axmodel](https://pulsar2-docs.readthedocs.io/en/latest/pulsar2/introduction.html)
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
## Support Platform
|
| 24 |
+
|
| 25 |
+
- AX650
|
| 26 |
+
- [M4N-Dock(爱芯派Pro)](https://wiki.sipeed.com/hardware/zh/maixIV/m4ndock/m4ndock.html)
|
| 27 |
+
- [M.2 Accelerator card](https://axcl-docs.readthedocs.io/zh-cn/latest/doc_guide_hardware.html)
|
| 28 |
+
|
| 29 |
+
|Chips|model|cost|
|
| 30 |
+
|--|--|--|
|
| 31 |
+
|AX650|yolov5n|0.73 ms|
|
| 32 |
+
|AX650|yolov8n|1.31 ms|
|
| 33 |
+
|AX650|yolov9t|1.89 ms|
|
| 34 |
+
|AX650|yolov10n|1.44 ms|
|
| 35 |
+
|AX650|yolo11n|1.39 ms|
|
| 36 |
+
|AX650|yolo11n|2.49 ms|
|
| 37 |
+
|AX650|DEIMv2_femto(u16)|1.79 ms|
|
| 38 |
+
|
| 39 |
+
## How to use
|
| 40 |
+
|
| 41 |
+
Download all files from this repository to the device
|
| 42 |
+
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
root@ax650:~/QRCode_det# tree
|
| 46 |
+
.
|
| 47 |
+
|-- model
|
| 48 |
+
| `-- deimv2_hgnetv2_femto_coco_npu3.axmodel
|
| 49 |
+
| `-- yolov5n_npu3.axmodel
|
| 50 |
+
| `-- yolov8n_npu3.axmodel
|
| 51 |
+
|-- python
|
| 52 |
+
|`-- QRCode_axmodel_infer_DEIMv2.py
|
| 53 |
+
|`-- QRCode_axmodel_infer_v5.py
|
| 54 |
+
|`-- QRCode_axmodel_infer_v8.py
|
| 55 |
+
|`-- QRCode_onnx_infer_DEIMv2.py
|
| 56 |
+
|`-- QRCode_onnx_infer_v5.py
|
| 57 |
+
|`-- QRCode_onnx_infer_v8.py
|
| 58 |
+
|`-- requirements.txt
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
### Inference
|
| 65 |
+
|
| 66 |
+
Input Data:
|
| 67 |
+
|
| 68 |
+
```
|
| 69 |
+
|-- images
|
| 70 |
+
| `-- qrcode_01.jpg
|
| 71 |
+
| `-- qrcode_02.jpg
|
| 72 |
+
| `-- qrcode_03.jpg
|
| 73 |
+
| `-- qrcode_04.jpg...
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
#### Inference with AX650 Host, such as M4N-Dock(爱芯派Pro)
|
| 78 |
+
|
| 79 |
+
```
|
| 80 |
+
root@ax650:~/QRCode# python3 QRCode_axmodel_infer_DEIMv2.py
|
| 81 |
+
[INFO] Available providers: ['AxEngineExecutionProvider']
|
| 82 |
+
[INFO] Using provider: AxEngineExecutionProvider
|
| 83 |
+
[INFO] Chip type: ChipType.MC50
|
| 84 |
+
[INFO] VNPU type: VNPUType.DISABLED
|
| 85 |
+
[INFO] Engine version: 2.12.0s
|
| 86 |
+
[INFO] Model type: 2 (triple core)
|
| 87 |
+
[INFO] Compiler version: 4.2 b98901c3
|
| 88 |
+
识别成功!
|
| 89 |
+
图片 ./qrcode_test/qrcode_01.jpg 处理耗时: 0.2165 秒
|
| 90 |
+
识别成功!
|
| 91 |
+
图片 ./qrcode_test/qrcode_02.jpg 处理耗时: 0.1540 秒
|
| 92 |
+
识别成功!
|
| 93 |
+
图片 ./qrcode_test/qrcode_03.jpg 处理耗时: 0.1456 秒
|
| 94 |
+
识别成功!
|
| 95 |
+
图片 ./qrcode_test/qrcode_05.jpg 处理耗时: 0.1449 秒
|
| 96 |
+
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
Output:
|
| 100 |
+

|
images/qrcode_01.jpg
ADDED
|
images/qrcode_02.jpg
ADDED
|
images/qrcode_03.jpg
ADDED
|
images/qrcode_05.jpg
ADDED
|
images/qrcode_06.jpg
ADDED
|
images/qrcode_08.jpg
ADDED
|
images/qrcode_09.jpg
ADDED
|
images/qrcode_11.jpg
ADDED
|
images/qrcode_12.jpg
ADDED
|
images/qrcode_13.jpg
ADDED
|
images/qrcode_14.jpg
ADDED
|
images/qrcode_15.jpg
ADDED
|
images/qrcode_16.jpg
ADDED
|
images/qrcode_17.jpg
ADDED
|
images/qrcode_18.jpg
ADDED
|
images/qrcode_19.jpg
ADDED
|
images/qrcode_20.jpg
ADDED
|
images/qrcode_21.jpg
ADDED
|
images/qrcode_22.jpg
ADDED
|
images/qrcode_23.jpg
ADDED
|
images/qrcode_24.jpg
ADDED
|
images/qrcode_25.jpg
ADDED
|
images/qrcode_26.jpg
ADDED
|
images/qrcode_27.jpg
ADDED
|
images/qrcode_28.jpg
ADDED
|
images/qrcode_29.jpg
ADDED
|
images/qrcode_30.jpg
ADDED
|
images/qrcode_31.jpg
ADDED
|
images/qrcode_33.jpg
ADDED
|
images/qrcode_34.jpg
ADDED
|
images/qrcode_35.jpg
ADDED
|
images/qrcode_36.jpg
ADDED
|
images/qrcode_37.jpg
ADDED
|
images/qrcode_38.jpg
ADDED
|
images/qrcode_39.jpg
ADDED
|
images/qrcode_41.jpg
ADDED
|
images/qrcode_42.jpg
ADDED
|
images/qrcode_43.jpg
ADDED
|
images/qrcode_44.jpg
ADDED
|
images/qrcode_45.jpg
ADDED
|
images/qrcode_46.jpg
ADDED
|
images/qrcode_47.jpg
ADDED
|
images/qrcode_48.jpg
ADDED
|
images/qrcode_49.jpg
ADDED
|
images/qrcode_50.jpg
ADDED
|
images/qrcode_51.jpg
ADDED
|
images/qrcode_52.jpg
ADDED
|
images/qrcode_53.jpg
ADDED
|