Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:vim4:npu:demos:vgg16

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
products:sbc:vim4:npu:demos:vgg16 [2023/09/08 06:28]
hyphop [Get Source Code]
products:sbc:vim4:npu:demos:vgg16 [2024/01/04 21:24] (current)
louis old revision restored (2023/09/20 01:13)
Line 1: Line 1:
-====== Demo4 VGG16 ======+~~tag>NPU VGG16 VIM4 Tensorflow Keras ~~ 
 + 
 +====== VGG16 TensorFlow Keras VIM4 Demo 4 ====== 
 + 
 +{{indexmenu_n>4}} 
 + 
 +[[https://www.google.com/search?q=VGG16|VGG16]] is a convolution neural net architecture that’s used for image recognition. It utilizes 16 layers with weights and is considered one of the best vision model architectures to date.
  
 ===== Get Source Code ===== ===== Get Source Code =====
Line 7: Line 13:
  
 ```shell ```shell
-git clone https://github.com/Daipuwei/Mini-VGG-CIFAR10+git clone https://github.com/Daipuwei/Mini-VGG-CIFAR10
 ``` ```
  
Line 14: Line 20:
 ==== Build virtual environment ==== ==== Build virtual environment ====
  
-Follow Docker official docs 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]].
  
-Get Docker.+Then fetch the prebuilt NPU Docker container and run it.
  
 ```shell ```shell
Line 28: Line 34:
 ==== Get convert tool ==== ==== Get convert tool ====
  
-Download Tool from [[gl>khadas/vim4_npu_sdk.git]].+Download Tool from [[gl>khadas/vim4_npu_sdk]].
  
 ```shell ```shell
-$ git clone https://gitlab.com/khadas/vim4_npu_sdk.git+$ git clone https://gitlab.com/khadas/vim4_npu_sdk
 ``` ```
  
 ==== Convert ==== ==== Convert ====
  
-Keras model can convert rknn model directlyBut this demo is to convert tensorflow model(.pb) first, and convert tnesorflow model to rknn model. We use this tool to convert.+We first need to convert the Keras model(''.h5'') into a TensorFlow model (''.pb''). We use this tool to convert [[gh>amir-abdi/keras_to_tensorflow]]
  
 ```shell ```shell
-git clone https://github.com/amir-abdi/keras_to_tensorflow.git+git clone https://github.com/amir-abdi/keras_to_tensorflow
 ``` ```
  
-Enter ''vim4_npu_sdk/demo'' and modify ''convert_adla.sh'' as follows.+Then we need to convert the TensorFlow model to an ADLA model (''.adla''
 + 
 +Enter ''vim4_npu_sdk/demo'' and overwrite ''convert_adla.sh'' as follows.
  
-```shell convert_adla.sh+```sh convert_adla.sh
 #!/bin/bash #!/bin/bash
      
Line 70: Line 78:
 ``` ```
  
-Run ''convert_adla.sh'' to generate VIM4 model. The converted model is ''xxx.adla'' in ''tensorflow_output''.+Run ''convert_adla.sh'' to generate the VIM4 model. The converted model is ''xxx.adla'' in ''tensorflow_output''.
  
 ```shell ```shell
Line 83: Line 91:
  
 ```shell ```shell
-$ git clone https://github.com/khadas/vim4_npu_applications.git+$ git clone https://github.com/khadas/vim4_npu_applications
 ``` ```
  
Line 112: Line 120:
  
 <WRAP tip > <WRAP tip >
-If your **vgg16** model classes is not the same as **cifar10**, please change ''data/vgg16_class.txt'' and the ''OBJ_CLASS_NUM'' in ''include/postprocess.h''.+If your **VGG16** model classes are not the same as **CIFAR10**, please change ''data/vgg16_class.txt'' and the ''OBJ_CLASS_NUM'' in ''include/postprocess.h''.
 </WRAP> </WRAP>
  
Last modified: 2023/09/08 06:28 by hyphop