-
Notifications
You must be signed in to change notification settings - Fork 3
Getting Started
Download the Qualcomm SNPE SDK
To download the software develop kit, you have to sign up an account in Qualcomm as user and get the access. And once you get the sdk, you could simply extract the SDK to a directory. The directory the SDK is extracted to is referred to as $SNPE_ROOT
.
In our project, we put the extracted directory in /data
and rename it into snpe-sdk
.
$ apt-get update
$ update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
$ update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2
# check the python list
$ update-alternatives --list python
$ update-alternatives --config python
-
/usr/bin/python
andpython
should point to python 3 - python 3.6 is using in this project
$ apt install python3-pip
$ pip3 install --upgrade pip
$ apt-get install python3-dev python3-matplotlib python3-numpy python3-protobuf
$ apt-get install python3-scipy python3-skimage python3-sphinx python3-mako
$ apt-get install wget zip libc++-9-dev
$ apt-get install cmake
$ apt-get install libprotobuf-dev protobuf-compiler
Run the dependencies script to check the system for Ubuntu package dependencies. It will ask to install ones that are missing. Install the missing packages
$ source /data/snpe-sdk/bin/dependencies.sh
$ source data/snpe-sdk/bin/check_python_depends.sh
Building the Native C++ inference on Android requires the Android NDK install.
$ export ANDROID_NDK_ROOT=<path_to_ndk>
If the ANDROID_NDK_ROOT
is not set the environment setup script will attempt to find the NDK path by searching for ndk-build.
In order for the SNPE SDK to be used with ONNX, an ONNX installation must be present on the system.
- onnx installaion
$ source /data/snpe-sdk/bin/envsetup.sh -o /usr/local/lib/python3.6/dist-packages/onnx
You could setup the snpe environment with docker in the x86 PC for processing the model conversion first, and then move the *.dlc
file to the device of implement. Thus, the conversion process could be more clean and convenient.
Make sure the zip file of qualcomm snpe sdk
and android ndk
are in the correct path with Dockerfile.
$ docker build -t .
$ docker run -it --name=<container name> <image> /bin/bash
See the Dockerfile for more information.