sunyijie commited on
Commit ·
e4eda85
1
Parent(s): e3b9fb2
Add executable files
Browse files- .gitattributes +2 -1
- README.md +59 -1
- install/axcl_aarch64/axcl_yolo_master_esmoe +3 -0
- install/host_650/ax_yolo_master_esmoe +3 -0
.gitattributes
CHANGED
|
@@ -34,4 +34,5 @@ saved_model/**/* 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 |
*.axmodel filter=lfs diff=lfs merge=lfs -text
|
| 37 |
-
*.jpg 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 |
*.axmodel filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
install/** filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -44,6 +44,8 @@ root@ax650 ~/root/yolo-master-esmoe # tree -L 3
|
|
| 44 |
.
|
| 45 |
|-- README.md
|
| 46 |
|-- requirement.txt
|
|
|
|
|
|
|
| 47 |
|-- models
|
| 48 |
| `-- ax650
|
| 49 |
| |-- config.json
|
|
@@ -76,7 +78,7 @@ root@ax650 ~/root/yolo-master-esmoe # tree -L 3
|
|
| 76 |
pip install -r requirement.txt
|
| 77 |
```
|
| 78 |
|
| 79 |
-
#### Inference with
|
| 80 |
|
| 81 |
```
|
| 82 |
root@ax650 ~/root/yolo-master-esmoe # python web/app.py
|
|
@@ -98,6 +100,59 @@ Result:
|
|
| 98 |
|
| 99 |
The demo for YOLO-Master-EsMoE-S and YOLO-Master-EsMoE-N is the same as YOLO-Master-EsMoE-M, just select the corresponding model in the WebApp.
|
| 100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
|
| 102 |
## Inference scripts
|
| 103 |
|
|
@@ -114,3 +169,6 @@ Run the axmodel inference on the target board:
|
|
| 114 |
```
|
| 115 |
python infer/infer_axmodel.py --axmodel models/ax650/YOLO-Master-EsMoE-M/YOLO-Master-EsMoE-M.axmodel --post-onnx models/ax650/YOLO-Master-EsMoE-M/1_host_post_YOLO-Master-EsMoE-M.onnx --image football.jpg
|
| 116 |
```
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
.
|
| 45 |
|-- README.md
|
| 46 |
|-- requirement.txt
|
| 47 |
+
|-- install
|
| 48 |
+
| `-- ax_yolo_master_esmoe
|
| 49 |
|-- models
|
| 50 |
| `-- ax650
|
| 51 |
| |-- config.json
|
|
|
|
| 78 |
pip install -r requirement.txt
|
| 79 |
```
|
| 80 |
|
| 81 |
+
#### Inference with the web ui
|
| 82 |
|
| 83 |
```
|
| 84 |
root@ax650 ~/root/yolo-master-esmoe # python web/app.py
|
|
|
|
| 100 |
|
| 101 |
The demo for YOLO-Master-EsMoE-S and YOLO-Master-EsMoE-N is the same as YOLO-Master-EsMoE-M, just select the corresponding model in the WebApp.
|
| 102 |
|
| 103 |
+
## Inference with the executable
|
| 104 |
+
|
| 105 |
+
An executable is provided under `install/` for inference directly on the target board without Python. Run it on AX650:
|
| 106 |
+
|
| 107 |
+
```
|
| 108 |
+
ax_yolo_master_esmoe -m <model.axmodel> -i <image.jpg>
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
Example:
|
| 112 |
+
|
| 113 |
+
```
|
| 114 |
+
ax_yolo_master_esmoe -m models/ax650/YOLO-Master-EsMoE-M/YOLO-Master-EsMoE-M.axmodel -i host.jpg --repeat 10
|
| 115 |
+
--------------------------------------
|
| 116 |
+
model file : models/ax650/YOLO-Master-EsMoE-M/YOLO-Master-EsMoE-M.axmodel
|
| 117 |
+
image file : host.jpg
|
| 118 |
+
img_h, img_w : 640 640
|
| 119 |
+
--------------------------------------
|
| 120 |
+
Engine creating handle is done.
|
| 121 |
+
Engine creating context is done.
|
| 122 |
+
Engine get io info is done.
|
| 123 |
+
|
| 124 |
+
input size: 1
|
| 125 |
+
name: images [UINT8] [RGB]
|
| 126 |
+
1 x 640 x 640 x 3
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
output size: 4
|
| 130 |
+
name: /model.25/Concat_output_0 [FLOAT32]
|
| 131 |
+
1 x 64 x 8400
|
| 132 |
+
|
| 133 |
+
name: /model.25/Reshape_3_output_0 [FLOAT32]
|
| 134 |
+
1 x 80 x 6400
|
| 135 |
+
|
| 136 |
+
name: /model.25/Reshape_4_output_0 [FLOAT32]
|
| 137 |
+
1 x 80 x 1600
|
| 138 |
+
|
| 139 |
+
name: /model.25/Reshape_5_output_0 [FLOAT32]
|
| 140 |
+
1 x 80 x 400
|
| 141 |
+
|
| 142 |
+
Engine alloc io is done.
|
| 143 |
+
Engine push input is done.
|
| 144 |
+
--------------------------------------
|
| 145 |
+
post process cost time:12.02 ms
|
| 146 |
+
--------------------------------------
|
| 147 |
+
Repeat 10 times, avg time 23.42 ms, max_time 23.47 ms, min_time 23.38 ms
|
| 148 |
+
--------------------------------------
|
| 149 |
+
detection num: 4
|
| 150 |
+
2: 92%, [ 0, 151, 188, 410], car
|
| 151 |
+
2: 89%, [ 17, 162, 487, 475], car
|
| 152 |
+
16: 62%, [ 197, 118, 364, 339], dog
|
| 153 |
+
2: 62%, [ 592, 174, 639, 302], car
|
| 154 |
+
--------------------------------------
|
| 155 |
+
```
|
| 156 |
|
| 157 |
## Inference scripts
|
| 158 |
|
|
|
|
| 169 |
```
|
| 170 |
python infer/infer_axmodel.py --axmodel models/ax650/YOLO-Master-EsMoE-M/YOLO-Master-EsMoE-M.axmodel --post-onnx models/ax650/YOLO-Master-EsMoE-M/1_host_post_YOLO-Master-EsMoE-M.onnx --image football.jpg
|
| 171 |
```
|
| 172 |
+
|
| 173 |
+
|
| 174 |
+
|
install/axcl_aarch64/axcl_yolo_master_esmoe
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c16527fc3a2057619bb78d119f110e349d741685c05637a607390599ba33fa42
|
| 3 |
+
size 135168
|
install/host_650/ax_yolo_master_esmoe
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2f93d15d128db951d5042174aa007723669ab357dcc9981aa777fccd425b3e4e
|
| 3 |
+
size 117480
|