Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:edge2:npu: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
products:sbc:edge2:npu:demos:yolov8n [2023/09/19 22:42]
louis
products:sbc:edge2:npu:demos:yolov8n [2024/02/17 22:04] (current)
louis
Line 61: Line 61:
 After training model, modify ''ultralytics/ultralytics/nn/modules/head.py'' as follows. After training 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 90: Line 90:
 + +
 ``` ```
 +
 +<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 98: Line 102:
 results = model.export(format="onnx") results = model.export(format="onnx")
 ``` ```
 +
 +<WRAP important>
 +Use [[https://netron.app/ | Netron]] to check your model output like this. If not, please check your ''head.py''.
 +
 +{{:products:sbc:edge2:npu:demos:yolov8n-edge2-output.png?600|}}
 +</WRAP>
  
 Enter ''rknn-toolkit2/examples/onnx/yolov5'' and modify ''test.py'' as follows. Enter ''rknn-toolkit2/examples/onnx/yolov5'' and modify ''test.py'' as follows.
Line 145: Line 155:
 ==== Get source code ==== ==== Get source code ====
  
-Clone the source code form our [[gh>khadas/edge2-npu]].+Clone the source code from our [[gh>khadas/edge2-npu]].
  
 ```shell ```shell
Last modified: 2023/09/19 22:42 by louis