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 [2024/10/28 21:11] louis |
products:sbc:vim4:npu:demos:densenet [2026/04/02 02:46] (current) nick |
||
|---|---|---|---|
| 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> | ||
| + | |||
| + | ===== Introduction ===== | ||
| + | |||
| + | Densenet_CTC is a text recognition model. It only can recognize single line text. Therefore usually, it needs to be used in conjunction with a text detection model. | ||
| + | |||
| + | Recognition image and inference results on VIM4. | ||
| + | |||
| + | {{: | ||
| + | |||
| ===== Get the source code ===== | ===== Get the source code ===== | ||
| Line 23: | Line 35: | ||
| ``` | ``` | ||
| - | ===== Get Convert Tool ===== | + | ==== Get the conversion tool ==== |
| + | |||
| + | You can find the SDK here: [[dl> | ||
| ```shell | ```shell | ||
| - | $ git lfs install | + | $ wget https://dl.khadas.com/products/ |
| - | $ git lfs clone https://gitlab.com/khadas/ | + | $ tar xvzf vim4_npu_sdk-ddk-3.4.7.7-250508.tgz |
| - | $ cd vim4_npu_sdk | + | $ cd vim4_npu_sdk-ddk-3.4.7.7-250508 |
| $ ls | $ ls | ||
| - | adla-toolkit-binary | + | adla-toolkit-binary |
| ``` | ``` | ||
| - | * '' | + | * '' |
| * '' | * '' | ||
| * '' | * '' | ||
| + | * '' | ||
| - | ==== Get the conversion tool ==== | + | <WRAP important> |
| - | + | If your kernel is older than 241129, please use branch npu-ddk-1.7.5.5. | |
| - | Download The conversion tool from [[gl> | + | </ |
| - | + | ==== Convert | |
| - | ```shell | + | |
| - | $ git clone https:// | + | |
| - | ``` | + | |
| 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 72: | Line 84: | ||
| ``` | ``` | ||
| - | Enter '' | + | Enter '' |
| ```bash convert_adla.sh | ```bash convert_adla.sh | ||
| Line 92: | Line 104: | ||
| --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 116: | Line 128: | ||
| $ 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 128: | Line 144: | ||
| === Picture input demo === | === Picture input demo === | ||
| - | Put '' | + | Put '' |
| ```shell | ```shell | ||
| Line 139: | Line 155: | ||
| # Run | # Run | ||
| - | $ sudo ./ | + | $ ./ |
| ``` | ``` | ||
| - | <WRAP tip > | + | {{: |
| + | |||
| + | {{: | ||
| + | |||
| + | <WRAP tip> | ||
| If your '' | If your '' | ||
| </ | </ | ||