2 ifneq ($(findstring movidius, $(PYTHONPATH)), movidius)
3 export PYTHONPATH:=/opt/movidius/caffe/python:$(PYTHONPATH)
6 NCCOMPILE = mvNCCompile
7 NCPROFILE = mvNCProfile
10 .IGNORE: profile check compile
12 WEIGHTS_FILENAME = inception_v3_2016_08_28.tar.gz
13 GET_WEIGHTS = (wget http://download.tensorflow.org/models/${WEIGHTS_FILENAME} && tar zxf ${WEIGHTS_FILENAME} && rm ${WEIGHTS_FILENAME})
15 MODEL_FILENAME = output/inception-v3.meta
16 CONV_SCRIPT = ./inception-v3.py
18 INPUT_NODE_FLAG = -in=input
19 OUTPUT_NODE_FLAG = -on=InceptionV3/Predictions/Reshape_1
22 all: profile check compile
26 (cd ../../data/ilsvrc12; make)
27 @sed -i 's/\r//' run.py
32 ${NCPROFILE} -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG}
34 .PHONY: browse_profile
35 browse_profile: weights
36 ${NCPROFILE} -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG}
37 firefox output_report.html &
41 @sed -i 's/\r//' ${CONV_SCRIPT}
42 @chmod +x ${CONV_SCRIPT}
43 test -f ${MODEL_FILENAME} || (${GET_WEIGHTS} && ${CONV_SCRIPT})
47 test -f graph || ${NCCOMPILE} -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG}
51 -${NCCHECK} -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} -i ../../data/images/cat.jpg -id 917 -M 128 -S 2 -cs 0,1,2
63 @echo "possible make targets: ";
64 @echo " make help - shows this message";
65 @echo " make all - makes the following: prototxt, profile, compile, check, cpp, run_py, run_cpp";
66 @echo " make weights - downloads the trained model";
67 @echo " make compile - runs SDK compiler tool to compile the NCS graph file for the network";
68 @echo " make check - runs SDK checker tool to verify an NCS graph file";
69 @echo " make profile - runs the SDK profiler tool to profile the network creating output_report.html";
70 @echo " make browse_profile - runs the SDK profiler tool and brings up report in browser.";
71 @echo " make run_py - runs the run.py python example program";
72 @echo " make clean - removes all created content"
77 rm -f output_report.html
78 rm -f output_expected.npy
80 rm -f output_result.npy