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 [2024/05/08 02:16] louis |
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 25: | Line 28: | ||
```shell | ```shell | ||
$ cd aml_npu_sdk/ | $ cd aml_npu_sdk/ | ||
- | $ wget https:// | + | $ wget https:// |
``` | ``` | ||
Line 33: | Line 36: | ||
# uint8 | # uint8 | ||
$ ./convert --model-name mobilenet_ssd \ | $ ./convert --model-name mobilenet_ssd \ | ||
- | > --platform tensorflow \ | + | --platform tensorflow \ |
- | > --model | + | |
- | > --input-size-list ' | + | |
- | > --inputs FeatureExtractor/ | + | |
- | > --outputs "' | + | |
- | > --mean-values '127.5 127.5 127.5 0.007843137' | + | |
- | > --quantized-dtype asymmetric_affine \ | + | |
- | > --source-files ./ | + | |
- | > --kboard VIM3 --print-level 0 | + | |
# int8 | # int8 | ||
$ ./convert --model-name mobilenet_ssd \ | $ ./convert --model-name mobilenet_ssd \ | ||
- | > --platform tensorflow \ | + | --platform tensorflow \ |
- | > --model | + | |
- | > --input-size-list ' | + | |
- | > --inputs FeatureExtractor/ | + | |
- | > --outputs "' | + | |
- | > --mean-values '127.5 127.5 127.5 0.007843137' | + | |
- | > --quantized-dtype dynamic_fixed_point \ | + | |
- | > --qtype int8 \ | + | |
- | > --source-files ./ | + | |
- | > --kboard VIM3 --print-level 0 | + | |
# int16 | # int16 | ||
$ ./convert --model-name mobilenet_ssd \ | $ ./convert --model-name mobilenet_ssd \ | ||
- | > --platform tensorflow \ | + | --platform tensorflow \ |
- | > --model | + | |
- | > --input-size-list ' | + | |
- | > --inputs FeatureExtractor/ | + | |
- | > --outputs "' | + | |
- | > --mean-values '127.5 127.5 127.5 0.007843137' | + | |
- | > --quantized-dtype dynamic_fixed_point \ | + | |
- | > --qtype int16 \ | + | |
- | > --source-files ./ | + | |
- | > --kboard VIM3 --print-level 0 | + | |
``` | ``` | ||