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_v1_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-v1.meta
16 CONV_SCRIPT = ./inception-v1.py
18 INPUT_NODE_FLAG = -in=input
19 OUTPUT_NODE_FLAG = -on=InceptionV1/Logits/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 profile
36 @if [ -e output_report.html ] ; \
38 firefox output_report.html & \
40 @echo "***\nError - output_report.html not found" ; \
45 @sed -i 's/\r//' ${CONV_SCRIPT}
46 @chmod +x ${CONV_SCRIPT}
47 test -f ${MODEL_FILENAME} || (${GET_WEIGHTS} && ${CONV_SCRIPT})
51 test -f graph || ${NCCOMPILE} -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG}
55 -${NCCHECK} -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} -i ../../data/images/cat.jpg -id 829 -S 2 -M 128 -cs 0,1,2 -metric top1
67 @echo "possible make targets: ";
68 @echo " make help - shows this message";
69 @echo " make all - makes the following: prototxt, profile, compile, check, cpp, run_py, run_cpp";
70 @echo " make weights - downloads the trained model";
71 @echo " make compile - runs SDK compiler tool to compile the NCS graph file for the network";
72 @echo " make check - runs SDK checker tool to verify an NCS graph file";
73 @echo " make profile - runs the SDK profiler tool to profile the network creating output_report.html";
74 @echo " make browse_profile - runs the SDK profiler tool and brings up report in browser.";
75 @echo " make run_py - runs the run.py python example program";
76 @echo " make clean - removes all created content"
82 rm -f output_report.html
83 rm -f output_expected.npy
85 rm -f output_result.npy