Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,126 @@
|
|
1 |
-
---
|
2 |
-
license:
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
base_model:
|
6 |
+
- Ultralytics/YOLOv8
|
7 |
+
pipeline_tag: object-detection
|
8 |
+
tags:
|
9 |
+
- Ultralytics
|
10 |
+
- YOLOv8
|
11 |
+
- YOLOv8-Seg
|
12 |
+
---
|
13 |
+
|
14 |
+
# YOLOv8-Seg
|
15 |
+
|
16 |
+
This version of YOLOv8-Seg has been converted to run on the Axera NPU using **w8a16** quantization.
|
17 |
+
|
18 |
+
This model has been optimized with the following LoRA:
|
19 |
+
|
20 |
+
Compatible with Pulsar2 version: 3.4
|
21 |
+
|
22 |
+
## Convert tools links:
|
23 |
+
|
24 |
+
For those who are interested in model conversion, you can try to export axmodel through
|
25 |
+
|
26 |
+
- [The repo of AXera Platform](https://github.com/AXERA-TECH/ax-samples), which you can get the detial of guide
|
27 |
+
|
28 |
+
- [Pulsar2 Link, How to Convert ONNX to axmodel](https://pulsar2-docs.readthedocs.io/en/latest/pulsar2/introduction.html)
|
29 |
+
|
30 |
+
|
31 |
+
## Support Platform
|
32 |
+
|
33 |
+
- AX650
|
34 |
+
- [M4N-Dock(爱芯派Pro)](https://wiki.sipeed.com/hardware/zh/maixIV/m4ndock/m4ndock.html)
|
35 |
+
- [M.2 Accelerator card](https://axcl-docs.readthedocs.io/zh-cn/latest/doc_guide_hardware.html)
|
36 |
+
- AX630C
|
37 |
+
- [爱芯派2](https://axera-pi-2-docs-cn.readthedocs.io/zh-cn/latest/index.html)
|
38 |
+
- [Module-LLM](https://docs.m5stack.com/zh_CN/module/Module-LLM)
|
39 |
+
- [LLM630 Compute Kit](https://docs.m5stack.com/zh_CN/core/LLM630%20Compute%20Kit)
|
40 |
+
|
41 |
+
|Chips|yolov8s-seg|
|
42 |
+
|--|--|
|
43 |
+
|AX650| 4.6 ms |
|
44 |
+
|AX630C| TBD ms |
|
45 |
+
|
46 |
+
## How to use
|
47 |
+
|
48 |
+
Download all files from this repository to the device
|
49 |
+
|
50 |
+
```
|
51 |
+
|
52 |
+
root@ax650:~/YOLOv8-Seg# tree
|
53 |
+
.
|
54 |
+
|-- ax650
|
55 |
+
| `-- yolov8s-seg.axmodel
|
56 |
+
|-- ax_yolov8_seg
|
57 |
+
|-- football.jpg
|
58 |
+
`-- yolov8_seg_out.jpg
|
59 |
+
```
|
60 |
+
|
61 |
+
### Inference
|
62 |
+
|
63 |
+
Input image:
|
64 |
+

|
65 |
+
|
66 |
+
#### Inference with AX650 Host, such as M4N-Dock(爱芯派Pro)
|
67 |
+
|
68 |
+
```
|
69 |
+
root@ax650:~/samples/AXERA-TECH/YOLOv8-Seg# ./ax_yolov8_seg -m ax650/yolov8s_seg.axmodel -i football.jpg
|
70 |
+
--------------------------------------
|
71 |
+
model file : ax650/yolov8s_seg.axmodel
|
72 |
+
image file : football.jpg
|
73 |
+
img_h, img_w : 640 640
|
74 |
+
--------------------------------------
|
75 |
+
Engine creating handle is done.
|
76 |
+
Engine creating context is done.
|
77 |
+
Engine get io info is done.
|
78 |
+
Engine alloc io is done.
|
79 |
+
Engine push input is done.
|
80 |
+
--------------------------------------
|
81 |
+
|
82 |
+
input size: 1
|
83 |
+
name: images [UINT8] [BGR]
|
84 |
+
1 x 640 x 640 x 3
|
85 |
+
|
86 |
+
|
87 |
+
output size: 7
|
88 |
+
name: /model.22/Concat_1_output_0 [FLOAT32]
|
89 |
+
1 x 80 x 80 x 144
|
90 |
+
|
91 |
+
name: /model.22/Concat_2_output_0 [FLOAT32]
|
92 |
+
1 x 40 x 40 x 144
|
93 |
+
|
94 |
+
name: /model.22/Concat_3_output_0 [FLOAT32]
|
95 |
+
1 x 20 x 20 x 144
|
96 |
+
|
97 |
+
name: /model.22/cv4.0/cv4.0.2/Conv_output_0 [FLOAT32]
|
98 |
+
1 x 80 x 80 x 32
|
99 |
+
|
100 |
+
name: /model.22/cv4.1/cv4.1.2/Conv_output_0 [FLOAT32]
|
101 |
+
1 x 40 x 40 x 32
|
102 |
+
|
103 |
+
name: /model.22/cv4.2/cv4.2.2/Conv_output_0 [FLOAT32]
|
104 |
+
1 x 20 x 20 x 32
|
105 |
+
|
106 |
+
name: output1 [FLOAT32]
|
107 |
+
1 x 32 x 160 x 160
|
108 |
+
|
109 |
+
post process cost time:16.21 ms
|
110 |
+
--------------------------------------
|
111 |
+
Repeat 1 times, avg time 4.69 ms, max_time 4.69 ms, min_time 4.69 ms
|
112 |
+
--------------------------------------
|
113 |
+
detection num: 8
|
114 |
+
0: 92%, [1354, 340, 1629, 1035], person
|
115 |
+
0: 91%, [ 5, 359, 314, 1108], person
|
116 |
+
0: 91%, [ 759, 220, 1121, 1153], person
|
117 |
+
0: 88%, [ 490, 476, 661, 999], person
|
118 |
+
32: 73%, [1233, 877, 1286, 923], sports ball
|
119 |
+
32: 63%, [ 772, 888, 828, 937], sports ball
|
120 |
+
32: 63%, [ 450, 882, 475, 902], sports ball
|
121 |
+
0: 55%, [1838, 690, 1907, 811], person
|
122 |
+
--------------------------------------
|
123 |
+
```
|
124 |
+
|
125 |
+
Output image:
|
126 |
+

|