Git Product home page Git Product logo

mobilenet-ssd-snpe's Introduction

example of snpe with mobilenet-ssd trained by Caffe
caffe model MobileNet-Caffe

build

./build.sh

test on device

./run_example.sh

mobilenet-ssd model caffe to snpe
prepare snpe environment

nohup snpe-caffe-to-dlc --input_network ./model/deploy.prototxt \
--caffe_bin ./model/mobilenet_iter_73000.caffemodel \
--debug --o ./model/mobilenet_iter_73000.dlc \
> ./model/mobilenet_iter_73000.log 2>&1 &

prepare VOC raw data for snpe quantize
read from : data/VOC2007
generate resize image : data/VOC_resize
generate resize raw data : data/VOC_raw
generate raw list : data/VOC_raw_list.txt

python image_to_raw.py

quantize model to int8

nohup snpe-dlc-quantize --debug3 \
--input_dlc ./model/mobilenet_iter_73000.dlc \
--input_list ./data/VOC_raw_list.txt \
--output_dlc ./model/mobilenet_iter_73000_int8.dlc \
> ./model/mobilenet_iter_73000_int8.log 2>&1 &

** How to estimate runtime performance on dsp**


=> adb push snpe-net-run to path /data/local/tmp/test_demo/

=> cd /data/local/tmp/test_demo

=> chmod 777 snpe-net-run

=> settimg library path: export LD_LIBRARY_PATH=./${LD_LIBRARY_PATH} export ADSP_LIBRARY_PTAH=./:${ADSP_LIBRATY_PATH}

=> Then, need to do next step, Let's to show follow cmd: snpe-net-run --container *.dlc --input_list list.txt --use_dsp

=> if running is successful, we can have one output folder.

=> adb pull output folder to your local snpe develop path. follow cmd: snpe-diagview --input_log SNPEDiag.log --output LOGCSVFile > Log 2>&1
(Note: find file SNPEDiag.log from output folder)


*********** NOTE 1: runing run_example.sh************


On soc SA8155P, with problem about segmentation fault. Solution: copy library “libc++_shared” to "/system/lib"


********* NOTE 2: cross complie *********************


android-ndk-r21d with problem about lirary "libc++.so" and some undefined reference. Solution: delete library "libc++.so" from "./lib/snpe/armv7a-android"

mobilenet-ssd-snpe's People

Contributors

b1xian avatar travis-lee avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.