OpenVINOR5 (#400)

main
Boris Sekachev 7 years ago committed by Nikita Manovich
parent 28edba7d15
commit 7ed31cac0e

@ -23,12 +23,18 @@ tar -xzf `ls | grep "openvino_toolkit"`
cd `ls -d */ | grep "openvino_toolkit"` cd `ls -d */ | grep "openvino_toolkit"`
apt-get update && apt-get install -y sudo cpio && \ apt-get update && apt-get install -y sudo cpio && \
./install_cv_sdk_dependencies.sh && SUDO_FORCE_REMOVE=yes apt-get remove -y sudo if [ -f "install_cv_sdk_dependencies.sh" ]; then ./install_cv_sdk_dependencies.sh; \
else ./install_openvino_dependencies.sh; fi && SUDO_FORCE_REMOVE=yes apt-get remove -y sudo
cat ../eula.cfg >> silent.cfg cat ../eula.cfg >> silent.cfg
./install.sh -s silent.cfg ./install.sh -s silent.cfg
cd /tmp/components && rm openvino -r cd /tmp/components && rm openvino -r
echo "source /opt/intel/computer_vision_sdk/bin/setupvars.sh" >> ${HOME}/.bashrc if [ -f "/opt/intel/computer_vision_sdk/bin/setupvars.sh" ]; then
echo -e '\nexport IE_PLUGINS_PATH=${IE_PLUGINS_PATH}' >> /opt/intel/computer_vision_sdk/bin/setupvars.sh echo "source /opt/intel/computer_vision_sdk/bin/setupvars.sh" >> ${HOME}/.bashrc;
echo -e '\nexport IE_PLUGINS_PATH=${IE_PLUGINS_PATH}' >> /opt/intel/computer_vision_sdk/bin/setupvars.sh;
else
echo "source /opt/intel/openvino/bin/setupvars.sh" >> ${HOME}/.bashrc;
echo -e '\nexport IE_PLUGINS_PATH=${IE_PLUGINS_PATH}' >> /opt/intel/openvino/bin/setupvars.sh;
fi

@ -16,17 +16,5 @@ if [[ "$CUDA_SUPPORT" = "yes" ]]
then then
pip3 install --no-cache-dir tensorflow-gpu==1.7.0 pip3 install --no-cache-dir tensorflow-gpu==1.7.0
else else
if [[ "$OPENVINO_TOOLKIT" = "yes" ]] pip3 install --no-cache-dir tensorflow==1.7.0
then
pip3 install -r ${INTEL_CVSDK_DIR}/deployment_tools/model_optimizer/requirements.txt && \
cd ${HOME}/rcnn/ && \
${INTEL_CVSDK_DIR}/deployment_tools/model_optimizer/mo.py --framework tf \
--data_type FP32 --input_shape [1,600,600,3] \
--input image_tensor --output detection_scores,detection_boxes,num_detections \
--tensorflow_use_custom_operations_config ${INTEL_CVSDK_DIR}/deployment_tools/model_optimizer/extensions/front/tf/faster_rcnn_support.json \
--tensorflow_object_detection_api_pipeline_config pipeline.config --input_model inference_graph.pb && \
rm inference_graph.pb
else
pip3 install --no-cache-dir tensorflow==1.7.0
fi
fi fi

@ -219,12 +219,8 @@ def create_thread(tid, labels_mapping):
# Run auto annotation by tf # Run auto annotation by tf
result = None result = None
if os.environ.get('CUDA_SUPPORT') == 'yes' or os.environ.get('OPENVINO_TOOLKIT') != 'yes': slogger.glob.info("tf annotation with tensorflow framework for task {}".format(tid))
slogger.glob.info("tf annotation with tensorflow framework for task {}".format(tid)) result = run_tensorflow_annotation(image_list, labels_mapping, TRESHOLD)
result = run_tensorflow_annotation(image_list, labels_mapping, TRESHOLD)
else:
slogger.glob.info('tf annotation with openvino toolkit for task {}'.format(tid))
result = run_inference_engine_annotation(image_list, labels_mapping, TRESHOLD)
if result is None: if result is None:
slogger.glob.info('tf annotation for task {} canceled by user'.format(tid)) slogger.glob.info('tf annotation for task {} canceled by user'.format(tid))

Loading…
Cancel
Save