Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


Sidebar

products:sbc:vim4:npu:npu-sdk

This is an old revision of the document!


VIM4 NPU SDK Usage

Only New VIM4 supports NPU, you can check the version of your VIM4 here: VIM4 Versions

We provided the Docker container for you to convert the model.

Install Docker

Follow Docker official docs to install Docker: Install Docker Engine on Ubuntu.

Get NPU SDK

$ git clone https://gitlab.com/khadas/vim4_npu_sdk.git
$ cd vim4_npu_sdk & ls
bin  demo  docs  README.md
  • docs: SDK documentations
  • bin: SDK tools required for model conversion
  • demo: Conversion examples

Convert model in Docker

Get Docker:

$ cd vim4_npu_sdk
$ docker pull yanwyb/npu:v1
$ docker run -it --name vim4-npu1 -v $(pwd):/home/khadas/npu \
				-v /etc/localtime:/etc/localtime:ro \
				-v /etc/timezone:/etc/timezone:ro \
				yanwyb/npu:v1

Convert the demo model in docker:

khadas@2655b6cbbc01:~/npu$ cd demo/
khadas@2655b6cbbc01:~/npu/demo$ bash convert_adla.sh

If everything works well you will find the converted files below:

khadas@2655b6cbbc01:~/npu/demo$ ls
caffe_output     darknet_output  dataset.txt   libstdc++_so  mxnet_output  paddle_output   quantized_tflite_output  tflite_output
convert_adla.sh  data            keras_output  model_source  onnx_output   pytorch_output  tensorflow_output

See Also

For more information, please check docs/model_conversion_user_guide_1.2.pdf.

Last modified: 2023/06/06 07:04 by nick