Unofficial docker wrapper for Qualcomm SNPE(Snapdragon Neural Processing Engine) SDK
549
Unofficial Dockerized Qualcomm Neural Processing SDK (SNPE - Snapdragon Neural Processing Engine)
3.5. Open Source Prohibition.
LICENSEE shall not ... incorporate, link, distribute or use any third party software or code in conjunction with any part of a PKLA Product Kit ...
SNPE 1.48.0 would not work. Qualcomm changed host platform from Ubuntu 16.04 to 18.04, and a lot of libraries are changed. Try at your own adventure.jfrog didn't let me automatically download their sourcecode using wget!)Download snpe-1.53.2.zip or newer.
Create new empty directory and unzip file snpe-1.53.2.zip into that directory.
Run following command (${SNPE_ROOT} refers to current directory, you could replace it with $(pwd) on linux, or full path on windows WSL2 environment)
docker run \
-it --rm \
-v ${SNPE_ROOT}:/snpe \
jungin500/snpe:1.5x
(Optional) Run examples inside SNPE SDK's /snpe/models directory:
cd /snpe
# It will take some time (5~10mins) to download AlexNet from Caffe repository
python models/alexnet/scripts/setup_alexnet.py -a models/alexnet/assets -d
Output should show up like following:
... (Download sequence)
Copying Caffe model
Modiying prototxt to use a batch size of 1
Creating DLC
2021-09-09 08:45:54,886 - 188 - INFO - across channels=True
2021-09-09 08:45:54,887 - 188 - INFO - across channels=True
2021-09-09 08:45:55,901 - 188 - INFO - INFO_DLC_SAVE_LOCATION: Saving model at /snpe/models/alexnet/dlc/bvlc_alexnet.dlc
2021-09-09 08:46:18,776 - 188 - INFO - INFO_CONVERSION_SUCCESS: Conversion completed successfully
Getting imagenet aux data
Creating ilsvrc_2012_mean.npy
Creating %s ilsvrc_2012_mean_cropped.bin
Creating ilsvrc_2012_labels.txt
Create SNPE alexnet input
processing /snpe/models/alexnet/data/chairs.jpg
processing /snpe/models/alexnet/data/notice_sign.jpg
processing /snpe/models/alexnet/data/plastic_cup.jpg
processing /snpe/models/alexnet/data/trash_bin.jpg
Create file lists
/snpe/models/alexnet/data/cropped/raw_list.txt created listing 4 files.
/snpe/models/alexnet/data/target_raw_list.txt created listing 4 files.
Setup alexnet completed.
and result model .dlc file would be created on models/alexnet/dlc/bvlc_alexnet.dlc:
(snpe) root@fc6441ac1308:/snpe# ls -alh models/alexnet/dlc/
total 233M
drwxrwxrwx 1 1000 1000 4.0K Sep 9 07:18 .
drwxrwxrwx 1 1000 1000 4.0K Sep 8 08:40 ..
-rwxrwxrwx 1 1000 1000 233M Sep 9 08:46 bvlc_alexnet.dlc
You can use SNPE's python tools listed below:
snpe-caffe-to-dlc
snpe-caffe2-to-dlc
snpe-diagview
snpe-dlc-diff
snpe-dlc-info
snpe-dlc-quantize
snpe-dlc-reorder
snpe-dlc-viewer
snpe-net-run
snpe-onnx-to-dlc
snpe-parallel-run
snpe-platform-validator-py
snpe-tensorflow-to-dlc
snpe-tflite-to-dlc
snpe-throughput-net-run
snpe-udo-package-generator
Content type
Image
Digest
Size
1.5 GB
Last updated
almost 5 years ago
docker pull jungin500/snpe