This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
products:sbc:vim3:npu:ksnn:ksnn-convert [2023/09/15 11:55] sravan [Get convert tool] |
products:sbc:vim3:npu:ksnn:ksnn-convert [2025/09/14 23:42] (current) nick |
||
|---|---|---|---|
| Line 5: | Line 5: | ||
| ===== Get the conversion tool ===== | ===== Get the conversion tool ===== | ||
| - | The conversion tool is integrated in the NPU SDK. | + | The conversion tool is integrated in the NPU SDK. You can download it from [[dl> |
| ```shell | ```shell | ||
| - | $ git clone --recursive | + | $ wget https://dl.khadas.com/products/ |
| + | $ tar xvzf aml_npu_sdk-ddk-6.4.8.7-250427.tgz | ||
| + | $ ln -fs aml_npu_sdk-ddk-6.4.8.7-250427 aml_npu_sdk | ||
| ``` | ``` | ||
| + | |||
| The KSNN conversion tool is under '' | The KSNN conversion tool is under '' | ||
| Line 17: | Line 20: | ||
| ``` | ``` | ||
| - | ===== Example for Convert | + | ===== Conversion example |
| - | Choose tensorflow | + | Choose tensorflow |
| - | 1. Get forzen | + | 1. Get the frozen |
| ```shell | ```shell | ||
| $ cd aml_npu_sdk/ | $ cd aml_npu_sdk/ | ||
| - | $ wget https:// | + | $ wget https:// |
| ``` | ``` | ||
| Line 31: | Line 34: | ||
| ```shell | ```shell | ||
| - | $ ./convert --model-name | + | # uint8 |
| - | > --platform tensorflow \ | + | $ ./convert --model-name |
| - | > --model /home/yan/yan/Yan/models-zoo/tensorflow/inception/inception_v3_2016_08_28_frozen.pb \ | + | |
| - | > --input-size-list '299,299,3' \ | + | |
| - | > --inputs | + | |
| - | > --outputs | + | |
| - | > --mean-values '128 128 128 0.0078125' \ | + | --outputs "' |
| - | > --quantized-dtype | + | |
| - | > --source-files ./ | + | |
| - | > --kboard VIM3 --print-level 0 | + | |
| + | | ||
| + | |||
| + | # int8 | ||
| + | $ ./convert --model-name mobilenet_ssd \ | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | # int16 | ||
| + | $ ./convert --model-name mobilenet_ssd \ | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| ``` | ``` | ||
| During conversion, if you need to view detailed information, | During conversion, if you need to view detailed information, | ||
| - | 3. File generated after conversion. | + | 3. Model file generated after conversion. |
| ```shell | ```shell | ||
| $ cd aml_npu_sdk/ | $ cd aml_npu_sdk/ | ||
| - | $ ls outputs/inception/ | + | $ ls outputs/mobilenet_ssd/ |
| - | inception.nb | + | mobilenet_ssd.nb |
| ``` | ``` | ||