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 [2024/10/28 21:11]
louis
products:sbc:vim4:npu:demos:vgg16 [2026/04/02 02:46] (current)
nick
Line 1: Line 1:
 ~~tag>NPU VGG16 VIM4 Tensorflow Keras ~~ ~~tag>NPU VGG16 VIM4 Tensorflow Keras ~~
 +
 +**Doc for version ddk-3.4.7.7**
  
 ====== VGG16 TensorFlow Keras VIM4 Demo 4 ====== ====== VGG16 TensorFlow Keras VIM4 Demo 4 ======
  
 {{indexmenu_n>4}} {{indexmenu_n>4}}
 +
 +===== Introduction =====
 +
 +VGG16 is a classification model. It can assign a single label to an entire image.
 +
 +Image and inference results on VIM4.
 +
 +{{:products:sbc:vim4:npu:demos:airplane.webp?400|}}
 +
 +{{:products:sbc:vim4:npu:demos:vgg16-demo-output.webp?400|}}
  
 [[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. [[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.
Line 28: Line 40:
 ``` ```
  
-===== Get Convert Tool =====+==== Get convert tool ==== 
 + 
 +You can find the SDK here: [[dl>products/vim4/tools/npu-sdk/]]
  
 ```shell ```shell
-git lfs install +wget https://dl.khadas.com/products/vim4/tools/npu-sdk/vim4_npu_sdk-ddk-3.4.7.7-250508.tgz 
-$ git lfs clone https://gitlab.com/khadas/vim4_npu_sdk.git +$ 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-1.2.0. convert-in-docker.sh  Dockerfile  docs  README.md+adla-toolkit-binary  adla-toolkit-binary-3.1.7. convert-in-docker.sh  Dockerfile  docs  README.md
 ``` ```
  
-  * ''adla-toolkit-binary/docs'' - SDK documentations+  * ''docs'' - SDK documentations
   * ''adla-toolkit-binary/bin'' - SDK tools required for model conversion   * ''adla-toolkit-binary/bin'' - SDK tools required for model conversion
   * ''adla-toolkit-binary/demo'' - Conversion examples   * ''adla-toolkit-binary/demo'' - Conversion examples
 +  * ''adla-toolkit-binary/python'' - KSNN conversion examples
  
-==== Get convert tool ==== +<WRAP important> 
- +If your kernel is older than 241129, please use branch npu-ddk-1.7.5.5
-Download Tool from [[gl>khadas/vim4_npu_sdk]]+</WRAP>
- +
-```shell +
-$ git clone https://gitlab.com/khadas/vim4_npu_sdk +
-```+
  
 ==== Convert ==== ==== Convert ====
Line 82: Line 93:
         --quantize-dtype int8 --outdir tensorflow_output \         --quantize-dtype int8 --outdir tensorflow_output \
         --channel-mean-value "0,0,0,255" \         --channel-mean-value "0,0,0,255" \
 +        --inference-input-type "float32" \
 +        --inference-output-type "float32" \
         --source-file vgg16_dataset.txt \         --source-file vgg16_dataset.txt \
         --iterations 500 \         --iterations 500 \
Line 103: Line 116:
 $ git clone https://github.com/khadas/vim4_npu_applications $ git clone https://github.com/khadas/vim4_npu_applications
 ``` ```
 +
 +<WRAP important>
 +If your kernel is older than 241129, please use version before tag ddk-3.4.7.7.
 +</WRAP>
  
 ==== Install dependencies ==== ==== Install dependencies ====
Line 126: Line 143:
  
 # Run # Run
-sudo ./vgg16 -m ../data/vgg16_int8.adla -p ../data/airplane.jpeg+$ ./vgg16 -m ../data/vgg16_int8.adla -p ../data/airplane.jpeg
 ``` ```
  
Last modified: 2024/10/28 21:11 by louis