Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:vim3:npu:ksnn:demos:yolov8n

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
products:sbc:vim3:npu:ksnn:demos:yolov8n [2023/12/22 03:45]
louis ↷ Page moved from products:sbc:vim3:npu:ksnn:demo:yolov8n to products:sbc:vim3:npu:ksnn:demos:yolov8n
products:sbc:vim3:npu:ksnn:demos:yolov8n [2024/02/17 22:37]
louis
Line 1: Line 1:
 ~~tag> NPU YOLO KSNN VIM3 ~~ ~~tag> NPU YOLO KSNN VIM3 ~~
  
-====== YOLOv8n KSNN Demo - ======+====== YOLOv8n KSNN Demo - ======
  
 {{indexmenu_n>2}} {{indexmenu_n>2}}
Line 34: Line 34:
 After training the model, modify ''ultralytics/ultralytics/nn/modules/head.py'' as follows. After training the model, modify ''ultralytics/ultralytics/nn/modules/head.py'' as follows.
  
-```diff+```diff head.py
 diff --git a/ultralytics/nn/modules/head.py b/ultralytics/nn/modules/head.py diff --git a/ultralytics/nn/modules/head.py b/ultralytics/nn/modules/head.py
 index 0b02eb3..0a6e43a 100644 index 0b02eb3..0a6e43a 100644
Line 62: Line 62:
 + +
 ``` ```
 +
 +<WRAP important>
 +If you pip-installed ultralytics package, you should modify in package.
 +</WRAP>
  
 Create a python file written as follows to export ONNX model. Create a python file written as follows to export ONNX model.
Line 74: Line 78:
 $ python export.py $ python export.py
 ``` ```
 +
 +<WRAP important>
 +Use [[https://netron.app/ | Netron]] to check your model output like this. If not, please check your ''head.py''.
 +
 +{{:products:sbc:vim3:npu:ksnn:yolov8n-vim3-ksnn-output.png?600|}}
 +</WRAP>
  
 Enter ''aml_npu_sdk/acuity-toolkit/python'' and run command as follows. Enter ''aml_npu_sdk/acuity-toolkit/python'' and run command as follows.
Line 112: Line 122:
  
 Put ''yolov8n.nb'' and ''libnn_yolov8n.so'' into ''ksnn/examples/yolov8n/models/VIM3'' and ''ksnn/examples/yolov8n/libs'' Put ''yolov8n.nb'' and ''libnn_yolov8n.so'' into ''ksnn/examples/yolov8n/models/VIM3'' and ''ksnn/examples/yolov8n/libs''
 +
 +If your model's classes is not 80, please remember to modify the parameter, ''LISTSIZE''
 +
 +```shell
 +LISTSIZE = classes number + 64
 +```
  
 ==== Picture input demo ==== ==== Picture input demo ====
Last modified: 2024/05/27 22:16 by louis