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:densenet [2023/09/18 02:09] sravan |
products:sbc:vim4:npu:demos:densenet [2025/01/08 22:22] (current) louis |
||
---|---|---|---|
Line 1: | Line 1: | ||
~~tag> NPU Densenet VIM4 ONNX~~ | ~~tag> NPU Densenet VIM4 ONNX~~ | ||
- | ====== DenseNet CTC ONNX Keras VIM4 Demo - 3====== | + | |
+ | **Doc for version ddk-3.4.7.7** | ||
+ | |||
+ | ====== DenseNet CTC ONNX Keras VIM4 Demo - 3 ====== | ||
{{indexmenu_n> | {{indexmenu_n> | ||
Line 17: | Line 20: | ||
Follow Docker official documentation to install Docker: [[https:// | Follow Docker official documentation to install Docker: [[https:// | ||
- | Then fetch the prebuilt NPU Docker | + | Follow |
```shell | ```shell | ||
- | $ docker pull yanwyb/npu:v1 | + | docker pull numbqq/npu-vim4 |
- | $ docker run -it --name | + | |
- | -v / | + | |
- | -v / | + | |
- | yanwyb/ | + | |
``` | ``` | ||
==== Get the conversion tool ==== | ==== Get the conversion tool ==== | ||
- | Download The conversion tool from [[gl> | + | Download The conversion tool from [[gh> |
```shell | ```shell | ||
- | $ git clone https://gitlab.com/ | + | $ git clone https://github.com/ |
+ | $ cd vim4_npu_sdk | ||
+ | $ git lfs pull | ||
+ | $ ls | ||
+ | adla-toolkit-binary | ||
``` | ``` | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | <WRAP important> | ||
+ | If your kernel is older than 241129, please use branch npu-ddk-1.7.5.5 | ||
+ | </ | ||
+ | |||
+ | ==== Convert ==== | ||
After training the model, run the scripts as follows to modify net input and output and convert the model to ONNX. | After training the model, run the scripts as follows to modify net input and output and convert the model to ONNX. | ||
Line 62: | Line 75: | ||
``` | ``` | ||
- | Enter '' | + | Enter '' |
```bash convert_adla.sh | ```bash convert_adla.sh | ||
Line 82: | Line 95: | ||
--dtypes " | --dtypes " | ||
--inference-input-type float32 \ | --inference-input-type float32 \ | ||
- | --inference-output-type float32 \ | + | --inference-output-type float32 \ |
- | --quantize-dtype | + | --quantize-dtype |
--channel-mean-value " | --channel-mean-value " | ||
--source-file ./ | --source-file ./ | ||
Line 106: | Line 119: | ||
$ git clone https:// | $ git clone https:// | ||
``` | ``` | ||
+ | |||
+ | <WRAP important> | ||
+ | If your kernel is older than 241129, please use version before tag ddk-3.4.7.7. | ||
+ | </ | ||
==== Install dependencies ==== | ==== Install dependencies ==== | ||
Line 118: | Line 135: | ||
=== Picture input demo === | === Picture input demo === | ||
- | Put '' | + | Put '' |
```shell | ```shell | ||
Line 129: | Line 146: | ||
# Run | # Run | ||
- | $ sudo ./ | + | $ ./ |
``` | ``` | ||
- | <WRAP tip > | + | {{: |
+ | |||
+ | {{: | ||
+ | |||
+ | <WRAP tip> | ||
If your '' | If your '' | ||
</ | </ | ||