Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:vim4:npu:demos:densenet

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
products:sbc:vim4:npu:demos:densenet [2023/09/17 23:00]
sravan created
products:sbc:vim4:npu:demos:densenet [2024/01/04 21:23] (current)
louis old revision restored (2023/09/20 01:13)
Line 1: Line 1:
 ~~tag> NPU Densenet VIM4 ONNX~~ ~~tag> NPU Densenet VIM4 ONNX~~
-====== Densenet CTC Onnx Keras VIM4 Demo - 3======+====== DenseNet CTC ONNX Keras VIM4 Demo - 3======
  
 {{indexmenu_n>3}} {{indexmenu_n>3}}
 ===== Get the source code ===== ===== Get the source code =====
  
-We will use a densenet model based on [[gh>YCG09/chinese_ocr]]+We will use a DenseNet model based on [[gh>YCG09/chinese_ocr]]
  
 ```shell ```shell
Line 17: Line 17:
 Follow Docker official documentation to install Docker: [[https://docs.docker.com/engine/install/ubuntu/|Install Docker Engine on Ubuntu]]. Follow Docker official documentation to install Docker: [[https://docs.docker.com/engine/install/ubuntu/|Install Docker Engine on Ubuntu]].
  
-Then fetch the prebuilt NPU Docker Container and run it.+Then fetch the prebuilt NPU Docker container and run it.
  
 ```shell ```shell
Line 35: Line 35:
 ``` ```
  
-After training model, run the codes as follows to modify net input and output and convert model to onnx.+After training the model, run the scripts as follows to modify net input and output and convert the model to ONNX.
  
 <WRAP tip > <WRAP tip >
-Keras model(.h5) can convert VIM4 model directly. If you want to convert keras model, please use ''model.save'' to save model with weight and network structure.+Keras model(''.h5'') can be converted into a VIM4 model directly. If you want to convert a Keras model, please use ''model.save'' to save the model with weight and network structure.
 </WRAP> </WRAP>
  
Line 62: Line 62:
 ``` ```
  
-Enter ''vim4_npu_sdk/demo'' and modify ''convert_adla.sh'' as follows. We should quantize the model to **int16**because it is very inaccurate with **int8**.+Enter ''vim4_npu_sdk/demo'' and modify ''convert_adla.sh'' as follows. We should quantize the model to **int16** because it is very inaccurate with **int8**.
  
 ```bash convert_adla.sh ```bash convert_adla.sh
Line 91: Line 91:
 ``` ```
  
-Run ''convert_adla.sh'' to generate VIM4 model. The converted model is ''xxx.adla'' in ''onnx_output''.+Run ''convert_adla.sh'' to generate the VIM4 model. The converted model is ''xxx.adla'' in ''onnx_output''.
  
 ```shell ```shell
Line 133: Line 133:
  
 <WRAP tip > <WRAP tip >
-If your **densenet_ctc** model classes is not the same, please change ''data/class_str.txt'' and the ''OBJ_CLASS_NUM'' in ''include/postprocess.h''.+If your ''densenet_ctc''**DenseNet-CTC** model classes are not the same, please change ''data/class_str.txt'' and the ''OBJ_CLASS_NUM'' in ''include/postprocess.h''.
 </WRAP> </WRAP>
  
Last modified: 2023/09/17 23:00 by sravan