Upload 6 files
Browse files- .gitattributes +2 -0
- ax620e/yolov8s_seg.axmodel +3 -0
- ax650/yolov8s_seg.axmodel +3 -0
- cut-onnx.py +14 -0
- yolov8-seg-test.py +16 -0
- yolov8_seg_config.json +52 -0
- yolov8s-seg-cut.onnx +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
ax620e/yolov8s_seg.axmodel filter=lfs diff=lfs merge=lfs -text
|
37 |
+
ax650/yolov8s_seg.axmodel filter=lfs diff=lfs merge=lfs -text
|
ax620e/yolov8s_seg.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:32f18c18bf9333997c2090cc9ecb274935decb789ec49002fba9b2c36a197f74
|
3 |
+
size 32162875
|
ax650/yolov8s_seg.axmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1ef65880161e55675f43ab8d2f7de98169169c95052a96c58fb464957181b222
|
3 |
+
size 12587629
|
cut-onnx.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import onnx
|
2 |
+
|
3 |
+
input_path = "yolov8s-seg.onnx"
|
4 |
+
output_path = "yolov8s-seg-cut.onnx"
|
5 |
+
input_names = ["images"]
|
6 |
+
output_names = ["/model.22/Concat_1_output_0",
|
7 |
+
"/model.22/Concat_2_output_0",
|
8 |
+
"/model.22/Concat_3_output_0",
|
9 |
+
"/model.22/cv4.0/cv4.0.2/Conv_output_0",
|
10 |
+
"/model.22/cv4.1/cv4.1.2/Conv_output_0",
|
11 |
+
"/model.22/cv4.2/cv4.2.2/Conv_output_0",
|
12 |
+
"output1"]
|
13 |
+
|
14 |
+
onnx.utils.extract_model(input_path, output_path, input_names, output_names)
|
yolov8-seg-test.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from ultralytics import YOLO
|
2 |
+
|
3 |
+
# Load a model
|
4 |
+
model = YOLO("yolov8s-seg.pt")
|
5 |
+
model.info()
|
6 |
+
|
7 |
+
# Use the model
|
8 |
+
results = model("./images/ssd_car.jpg")
|
9 |
+
|
10 |
+
# Save the results
|
11 |
+
results[0].save("yolov8s-seg-result.jpg")
|
12 |
+
|
13 |
+
# Export to onnx with simplify
|
14 |
+
model.export(format='onnx', simplify=True)
|
15 |
+
|
16 |
+
|
yolov8_seg_config.json
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"model_type": "ONNX",
|
3 |
+
"npu_mode": "NPU1",
|
4 |
+
"quant": {
|
5 |
+
"input_configs": [
|
6 |
+
{
|
7 |
+
"tensor_name": "images",
|
8 |
+
"calibration_dataset": "./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 |
+
"input_processors": [
|
19 |
+
{
|
20 |
+
"tensor_name": "images",
|
21 |
+
"tensor_format": "BGR",
|
22 |
+
"src_format": "BGR",
|
23 |
+
"src_dtype": "U8",
|
24 |
+
"src_layout": "NHWC"
|
25 |
+
}
|
26 |
+
],
|
27 |
+
"output_processors": [
|
28 |
+
{
|
29 |
+
"tensor_name": "/model.22/Concat_1_output_0",
|
30 |
+
"dst_perm": [0, 2, 3, 1]
|
31 |
+
}, {
|
32 |
+
"tensor_name": "/model.22/Concat_2_output_0",
|
33 |
+
"dst_perm": [0, 2, 3, 1]
|
34 |
+
}, {
|
35 |
+
"tensor_name": "/model.22/Concat_3_output_0",
|
36 |
+
"dst_perm": [0, 2, 3, 1]
|
37 |
+
},
|
38 |
+
{
|
39 |
+
"tensor_name": "/model.22/cv4.0/cv4.0.2/Conv_output_0",
|
40 |
+
"dst_perm": [0, 2, 3, 1]
|
41 |
+
}, {
|
42 |
+
"tensor_name": "/model.22/cv4.1/cv4.1.2/Conv_output_0",
|
43 |
+
"dst_perm": [0, 2, 3, 1]
|
44 |
+
}, {
|
45 |
+
"tensor_name": "/model.22/cv4.2/cv4.2.2/Conv_output_0",
|
46 |
+
"dst_perm": [0, 2, 3, 1]
|
47 |
+
}
|
48 |
+
],
|
49 |
+
"compiler": {
|
50 |
+
"check": 0
|
51 |
+
}
|
52 |
+
}
|
yolov8s-seg-cut.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:43b1762c0f99d154007ef013e145be3181502f31e9ef46ec2446927a9c7e3c60
|
3 |
+
size 47306938
|