Commit ·
6ae214d
1
Parent(s): 3e810f3
add yolov8-pose and ax650 example
Browse files- README.md +103 -0
- ax650/yolov8s-pose.axmodel +3 -0
- ax_aarch64/ax_yolov8_pose +3 -0
- config.json +0 -0
- football.jpg +3 -0
- yolov8_pose_config.json +54 -0
- yolov8_pose_out.jpg +3 -0
- yolov8s-pose-cut.onnx +3 -0
- yolov8s-pose.onnx +3 -0
README.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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-POSE
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# YOLOv8-POSE
|
| 15 |
+
|
| 16 |
+
This version of YOLOv8-POSE 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 ax-samples](https://github.com/AXERA-TECH/ax-samples), which you can get the how to build the `ax_yolov8_pose`
|
| 27 |
+
|
| 28 |
+
- [The repo of axcl-samples](https://github.com/AXERA-TECH/axcl-samples), which you can get the how to build the `axcl_yolov8_pose`
|
| 29 |
+
|
| 30 |
+
- [Pulsar2 Link, How to Convert ONNX to axmodel](https://pulsar2-docs.readthedocs.io/en/latest/pulsar2/introduction.html)
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
## Support Platform
|
| 34 |
+
|
| 35 |
+
- AX650
|
| 36 |
+
- [M4N-Dock(爱芯派Pro)](https://wiki.sipeed.com/hardware/zh/maixIV/m4ndock/m4ndock.html)
|
| 37 |
+
- [M.2 Accelerator card](https://axcl-docs.readthedocs.io/zh-cn/latest/doc_guide_hardware.html)
|
| 38 |
+
- AX630C
|
| 39 |
+
- [爱芯派2](https://axera-pi-2-docs-cn.readthedocs.io/zh-cn/latest/index.html)
|
| 40 |
+
- [Module-LLM](https://docs.m5stack.com/zh_CN/module/Module-LLM)
|
| 41 |
+
- [LLM630 Compute Kit](https://docs.m5stack.com/zh_CN/core/LLM630%20Compute%20Kit)
|
| 42 |
+
|
| 43 |
+
|Chips|cost|
|
| 44 |
+
|--|--|
|
| 45 |
+
|AX650| 10.97 ms |
|
| 46 |
+
|AX630C| TBD ms |
|
| 47 |
+
|
| 48 |
+
## How to use
|
| 49 |
+
|
| 50 |
+
Download all files from this repository to the device
|
| 51 |
+
|
| 52 |
+
```
|
| 53 |
+
root@ax650 ~/yolov8-pose # tree -L 2
|
| 54 |
+
.
|
| 55 |
+
├── ax650
|
| 56 |
+
│ └── yolov8s-pose.axmodel
|
| 57 |
+
├── ax_aarch64
|
| 58 |
+
│ └── ax_yolov8_pose
|
| 59 |
+
├── config.json
|
| 60 |
+
├── football.jpg
|
| 61 |
+
├── README.md
|
| 62 |
+
├── yolov8_pose_config.json
|
| 63 |
+
├── yolov8_pose_out.jpg
|
| 64 |
+
├── yolov8s-pose-cut.onnx
|
| 65 |
+
└── yolov8s-pose.onnx
|
| 66 |
+
|
| 67 |
+
3 directories, 9 files
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
### Inference
|
| 71 |
+
|
| 72 |
+
Input image:
|
| 73 |
+

|
| 74 |
+
|
| 75 |
+
#### Inference with AX650 Host, such as M4N-Dock(爱芯派Pro)
|
| 76 |
+
|
| 77 |
+
```
|
| 78 |
+
root@ax650 ~/yolov8-pose # ./ax_yolov8_pose -m yolov8s-pose.axmodel -i football.jpg
|
| 79 |
+
--------------------------------------
|
| 80 |
+
model file : yolov8s-pose.axmodel
|
| 81 |
+
image file : football.jpg
|
| 82 |
+
img_h, img_w : 640 640
|
| 83 |
+
--------------------------------------
|
| 84 |
+
Engine creating handle is done.
|
| 85 |
+
Engine creating context is done.
|
| 86 |
+
Engine get io info is done.
|
| 87 |
+
Engine alloc io is done.
|
| 88 |
+
Engine push input is done.
|
| 89 |
+
--------------------------------------
|
| 90 |
+
post process cost time:1.24 ms
|
| 91 |
+
--------------------------------------
|
| 92 |
+
Repeat 1 times, avg time 10.97 ms, max_time 10.97 ms, min_time 10.97 ms
|
| 93 |
+
--------------------------------------
|
| 94 |
+
detection num: 4
|
| 95 |
+
0: 93%, [ 760, 211, 1125, 1157], person
|
| 96 |
+
0: 93%, [1349, 337, 1633, 1039], person
|
| 97 |
+
0: 92%, [ 0, 354, 324, 1104], person
|
| 98 |
+
0: 88%, [ 489, 474, 656, 996], person
|
| 99 |
+
--------------------------------------
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
Output image:
|
| 103 |
+

|
ax650/yolov8s-pose.axmodel
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bae976342722cc9b86cbad3ffddfaed8a758fec59c692736fb121098ed22c1b5
|
| 3 |
+
size 12266017
|
ax_aarch64/ax_yolov8_pose
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6aefe8ba7ee22879e7f187bc36f9a8bd2f7dc22c5f14b0fd677ca2cac1e23d56
|
| 3 |
+
size 5474200
|
config.json
ADDED
|
File without changes
|
football.jpg
ADDED
|
Git LFS Details
|
yolov8_pose_config.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "ONNX",
|
| 3 |
+
"npu_mode": "NPU1",
|
| 4 |
+
"quant": {
|
| 5 |
+
"input_configs": [
|
| 6 |
+
{
|
| 7 |
+
"tensor_name": "images",
|
| 8 |
+
"calibration_dataset": "coco_1000.tar",
|
| 9 |
+
"calibration_size": 32,
|
| 10 |
+
"calibration_mean": [0, 0, 0],
|
| 11 |
+
"calibration_std": [255.0, 255.0, 255.0]
|
| 12 |
+
}
|
| 13 |
+
],
|
| 14 |
+
"calibration_method": "MinMax",
|
| 15 |
+
"precision_analysis": true,
|
| 16 |
+
"precision_analysis_method":"EndToEnd"
|
| 17 |
+
},
|
| 18 |
+
|
| 19 |
+
"input_processors": [
|
| 20 |
+
{
|
| 21 |
+
"tensor_name": "images",
|
| 22 |
+
"tensor_format": "RGB",
|
| 23 |
+
"src_format": "BGR",
|
| 24 |
+
"src_dtype": "U8",
|
| 25 |
+
"src_layout": "NHWC"
|
| 26 |
+
}
|
| 27 |
+
],
|
| 28 |
+
|
| 29 |
+
"output_processors": [
|
| 30 |
+
{
|
| 31 |
+
"tensor_name": "/model.22/Concat_1_output_0",
|
| 32 |
+
"dst_perm": [0, 2, 3, 1]
|
| 33 |
+
}, {
|
| 34 |
+
"tensor_name": "/model.22/Concat_2_output_0",
|
| 35 |
+
"dst_perm": [0, 2, 3, 1]
|
| 36 |
+
}, {
|
| 37 |
+
"tensor_name": "/model.22/Concat_3_output_0",
|
| 38 |
+
"dst_perm": [0, 2, 3, 1]
|
| 39 |
+
}, {
|
| 40 |
+
"tensor_name": "/model.22/cv4.0/cv4.0.2/Conv_output_0",
|
| 41 |
+
"dst_perm": [0, 2, 3, 1]
|
| 42 |
+
}, {
|
| 43 |
+
"tensor_name": "/model.22/cv4.1/cv4.1.2/Conv_output_0",
|
| 44 |
+
"dst_perm": [0, 2, 3, 1]
|
| 45 |
+
}, {
|
| 46 |
+
"tensor_name": "/model.22/cv4.2/cv4.2.2/Conv_output_0",
|
| 47 |
+
"dst_perm": [0, 2, 3, 1]
|
| 48 |
+
}
|
| 49 |
+
],
|
| 50 |
+
|
| 51 |
+
"compiler": {
|
| 52 |
+
"check": 0
|
| 53 |
+
}
|
| 54 |
+
}
|
yolov8_pose_out.jpg
ADDED
|
Git LFS Details
|
yolov8s-pose-cut.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ce399becb192911d9ce09499ed5c404bb25a835f17b1ab7e092dcdd3b418d189
|
| 3 |
+
size 46524597
|
yolov8s-pose.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:31fdc9f23b4ad089e74210c7c1924c499dad43d9c39495d65d746e065b961bf6
|
| 3 |
+
size 46817828
|