This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
products:sbc:vim4:npu:demos:yolov8n [2024/01/04 04:51] louis |
products:sbc:vim4:npu:demos:yolov8n [2024/02/17 22:43] (current) louis |
||
---|---|---|---|
Line 42: | Line 42: | ||
After training model, modify '' | After training model, modify '' | ||
- | ```diff | + | ```diff head.py |
diff --git a/ | diff --git a/ | ||
index 0b02eb3..0a6e43a 100644 | index 0b02eb3..0a6e43a 100644 | ||
Line 71: | Line 71: | ||
+ | + | ||
``` | ``` | ||
+ | |||
+ | <WRAP important> | ||
+ | If you pip-installed ultralytics package, you should modify in package. | ||
+ | </ | ||
Create a python file written as follows to export ONNX model. | Create a python file written as follows to export ONNX model. | ||
Line 83: | Line 87: | ||
$ python export.py | $ python export.py | ||
``` | ``` | ||
+ | |||
+ | <WRAP important> | ||
+ | Use [[https:// | ||
+ | |||
+ | {{: | ||
+ | </ | ||
Enter '' | Enter '' | ||
Line 103: | Line 113: | ||
--input-shapes | --input-shapes | ||
--dtypes " | --dtypes " | ||
- | | + | --quantize-dtype |
- | --inference-output-type float32 \ | + | |
- | | + | |
--channel-mean-value " | --channel-mean-value " | ||
--source-file dataset.txt | --source-file dataset.txt | ||
- | --disable-per-channel False \ | ||
- | --iterations 500 \ | ||
--batch-size 1 --target-platform PRODUCT_PID0XA003 | --batch-size 1 --target-platform PRODUCT_PID0XA003 | ||
``` | ``` | ||
- | |||
- | <WRAP important > | ||
- | Please prepare about 500 pictures for quantification. If the pictures size is smaller than model input size, please resize pictures to input size before quantification. | ||
- | </ | ||
Run '' | Run '' | ||
Line 132: | Line 134: | ||
$ git clone https:// | $ git clone https:// | ||
``` | ``` | ||
- | |||
- | <WRAP important > | ||
- | If your kernel version is 5.4 or earlier, please use tag '' | ||
- | </ | ||
==== Install dependencies ==== | ==== Install dependencies ==== |