Commit 131d6c7b authored by Ukhu's avatar Ukhu
Browse files

Update to Openvino 2020.4.287

parent 5ff00ecf
......@@ -2,33 +2,34 @@ FROM local/dockervino:phase1 as build
ARG downloader=/opt/intel/openvino/deployment_tools/tools/model_downloader/downloader.py
ARG optimizer=/opt/intel/openvino/deployment_tools/model_optimizer/mo.py
WORKDIR /root/openvino_models
ARG models=/root/openvino_models
WORKDIR $models
RUN python3 $downloader --name googlenet-v3 --output_dir /root/openvino_models
RUN python3 $downloader --name googlenet-v3 --output_dir $models
RUN python3 $optimizer --input_model ./public/googlenet-v3/inception_v3_2016_08_28_frozen.pb --output_dir ./ir/googlenet/v3/FP32 --data_type FP32
RUN python3 $optimizer --input_model ./public/googlenet-v3/inception_v3_2016_08_28_frozen.pb --output_dir ./ir/googlenet/v3/FP16 --data_type FP16
RUN python3 $downloader --name googlenet-v4-tf --output_dir /root/openvino_models
RUN python3 $downloader --name googlenet-v4-tf --output_dir $models
RUN python3 $optimizer --input_model ./public/googlenet-v4-tf/inception_v4.frozen.pb --output_dir ./ir/googlenet/v4/FP32 --data_type FP32
RUN python3 $optimizer --input_model ./public/googlenet-v4-tf/inception_v4.frozen.pb --output_dir ./ir/googlenet/v4/FP16 --data_type FP16
RUN python3 $downloader --name vgg16 --output_dir /root/openvino_models
RUN python3 $downloader --name vgg16 --output_dir $models
RUN python3 $optimizer --input_model ./public/vgg16/vgg16.caffemodel --output_dir ./ir/vgg/16/FP32 --data_type FP32
RUN python3 $optimizer --input_model ./public/vgg16/vgg16.caffemodel --output_dir ./ir/vgg/16/FP16 --data_type FP16
RUN python3 $downloader --name vgg19 --output_dir /root/openvino_models
RUN python3 $downloader --name vgg19 --output_dir $models
RUN python3 $optimizer --input_model ./public/vgg19/vgg19.caffemodel --output_dir ./ir/vgg/19/FP32 --data_type FP32
RUN python3 $optimizer --input_model ./public/vgg19/vgg19.caffemodel --output_dir ./ir/vgg/19/FP16 --data_type FP16
#RUN python3 $downloader --name resnet-50 --output_dir /root/openvino_models
#RUN python3 $downloader --name resnet-50 --output_dir $models
#RUN python3 $optimizer --input_model ./public/resnet-50/resnet-50.caffemodel --output_dir ./ir/resnet/v1/50/FP32 --data_type FP32
#RUN python3 $optimizer --input_model ./public/resnet-50/resnet-50.caffemodel --output_dir ./ir/resnet/v1/50/FP16 --data_type FP16
#RUN python3 $downloader --name resnet-101 --output_dir /root/openvino_models
#RUN python3 $downloader --name resnet-101 --output_dir $models
#RUN python3 $optimizer --input_model ./public/resnet-101/resnet-101.caffemodel --output_dir ./ir/resnet/v1/101/FP32 --data_type FP32
#RUN python3 $optimizer --input_model ./public/resnet-101/resnet-101.caffemodel --output_dir ./ir/resnet/v1/101/FP16 --data_type FP16
#RUN python3 $downloader --name resnet-152 --output_dir /root/openvino_models
#RUN python3 $downloader --name resnet-152 --output_dir $models
#RUN python3 $optimizer --input_model ./public/resnet-152/resnet-152.caffemodel --output_dir ./ir/resnet/v1/152/FP32 --data_type FP32
#RUN python3 $optimizer --input_model ./public/resnet-152/resnet-152.caffemodel --output_dir ./ir/resnet/v1/152/FP16 --data_type FP16
......
......@@ -6,53 +6,54 @@ source $setupvars
benchmark=/root/inference_engine_samples_build/intel64/Release/benchmark_app
input=/opt/intel/openvino/deployment_tools/demo/car.png
stars=/////////////////////////////////////////////////
models=/root/openvino_models
echo "Benchmarking starts now!"
lscpu
if [ "$device" == "CPU" ]; then
echo $stars
echo "Inception V3"
$benchmark -d $device -i $input -api $api -m /root/openvino_models/ir/googlenet/v3/FP32/inception_v3_2016_08_28_frozen.xml
$benchmark -d $device -i $input -api $api -m $models/ir/googlenet/v3/FP32/inception_v3_2016_08_28_frozen.xml
echo $stars
echo "Inception V4"
$benchmark -d $device -i $input -api $api -m /root/openvino_models/ir/googlenet/v4/FP32/inception_v4.frozen.xml
$benchmark -d $device -i $input -api $api -m $models/ir/googlenet/v4/FP32/inception_v4.frozen.xml
echo $stars
echo "VGG16"
$benchmark -d $device -i $input -api $api -m /root/openvino_models/ir/vgg/16/FP32/vgg16.xml
$benchmark -d $device -i $input -api $api -m $models/ir/vgg/16/FP32/vgg16.xml
echo $stars
echo "VGG19"
$benchmark -d $device -i $input -api $api -m /root/openvino_models/ir/vgg/19/FP32/vgg19.xml
$benchmark -d $device -i $input -api $api -m $models/ir/vgg/19/FP32/vgg19.xml
echo $stars
#echo "Resnet 50"
#$benchmark -d $device -i $input -api $api -m /root/openvino_models/ir/resnet/v1/50/FP32/resnet-50.xml
#$benchmark -d $device -i $input -api $api -m $models/ir/resnet/v1/50/FP32/resnet-50.xml
#echo $stars
#echo "Resnet 101"
#$benchmark -d $device -i $input -api $api -m /root/openvino_models/ir/resnet/v1/101/FP32/resnet-101.xml
#$benchmark -d $device -i $input -api $api -m $models/ir/resnet/v1/101/FP32/resnet-101.xml
#echo $stars
#echo "Resnet 152"
#$benchmark -d $device -i $input -api $api -m /root/openvino_models/ir/resnet/v1/152/FP32/resnet-152.xml
#$benchmark -d $device -i $input -api $api -m $models/ir/resnet/v1/152/FP32/resnet-152.xml
#echo $stars
else
echo $stars
echo "Inception V3"
$benchmark -d $device -i $input -api $api -m /root/openvino_models/ir/googlenet/v3/FP16/inception_v3_2016_08_28_frozen.xml
$benchmark -d $device -i $input -api $api -m $models/ir/googlenet/v3/FP16/inception_v3_2016_08_28_frozen.xml
echo $stars
echo "Inception V4"
$benchmark -d $device -i $input -api $api -m /root/openvino_models/ir/googlenet/v4/FP16/inception_v4.frozen.xml
$benchmark -d $device -i $input -api $api -m $models/ir/googlenet/v4/FP16/inception_v4.frozen.xml
echo $stars
echo "VGG16"
$benchmark -d $device -i $input -api $api -m /root/openvino_models/ir/vgg/16/FP16/vgg16.xml
$benchmark -d $device -i $input -api $api -m $models/ir/vgg/16/FP16/vgg16.xml
echo $stars
echo "VGG19"
$benchmark -d $device -i $input -api $api -m /root/openvino_models/ir/vgg/19/FP16/vgg19.xml
$benchmark -d $device -i $input -api $api -m $models/ir/vgg/19/FP16/vgg19.xml
echo $stars
#echo "Resnet 50"
#$benchmark -d $device -i $input -api $api -m /root/openvino_models/ir/resnet/v1/50/FP16/resnet-50.xml
#$benchmark -d $device -i $input -api $api -m $models/ir/resnet/v1/50/FP16/resnet-50.xml
#echo $stars
#echo "Resnet 101"
#$benchmark -d $device -i $input -api $api -m /root/openvino_models/ir/resnet/v1/101/FP16/resnet-101.xml
#$benchmark -d $device -i $input -api $api -m $models/ir/resnet/v1/101/FP16/resnet-101.xml
#echo $stars
#echo "Resnet 152"
#$benchmark -d $device -i $input -api $api -m /root/openvino_models/ir/resnet/v1/152/FP16/resnet-152.xml
#$benchmark -d $device -i $input -api $api -m $models/ir/resnet/v1/152/FP16/resnet-152.xml
#echo $stars
fi
......
......@@ -4,6 +4,12 @@
FROM ubuntu:18.04
MAINTAINER jdg:juan-diego.gonzales-zuniga@kontron.com
USER root
WORKDIR /
SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
# Dependencies
ARG DEPENDENCIES="autoconf \
automake \
......@@ -17,41 +23,79 @@ ARG DEPENDENCIES="autoconf \
lsb-release \
libgtk-3-0 \
libtool \
python3-pip \
python3-dev \
python3-setuptools \
udev \
unzip \
dos2unix \
sudo \
wget \
git"
RUN apt-get update && apt-get -y upgrade && apt-get autoremove && \
RUN apt-get update && \
apt-get install -y --no-install-recommends ${DEPENDENCIES} && \
rm -rf /var/lib/apt/lists/*
# Openvino Version
ARG openvinoTar=l_openvino_toolkit_p_2020.3.194
WORKDIR /thirdparty
RUN sed -Ei 's/# deb-src /deb-src /' /etc/apt/sources.list && \
apt-get update && \
apt-get source ${DEPENDENCIES} && \
rm -rf /var/lib/apt/lists/*
# setup Python
ENV PYTHON python3.6
RUN apt-get update && \
apt-get install -y --no-install-recommends python3-pip python3-dev lib${PYTHON} && \
rm -rf /var/lib/apt/lists/*
# Openvino Version and copy from host
ARG openvinoTar=l_openvino_toolkit_p_2020.4.287
ENV INSTALL_DIR=/opt/intel/openvino
ARG TEMP_DIR=/tmp/openvino_installer
RUN mkdir -p $TEMP_DIR
WORKDIR $TEMP_DIR
WORKDIR ${TEMP_DIR}
COPY ./$openvinoTar.tgz $TEMP_DIR
RUN tar xf $openvinoTar.tgz && cd $openvinoTar && \
sed -i 's/decline/accept/g' silent.cfg && \
./install.sh -s silent.cfg && \
rm -rf $TEMP_DIR && \
$INSTALL_DIR/install_dependencies/install_openvino_dependencies.sh
# install product by installation script
ENV INTEL_OPENVINO_DIR /opt/intel/openvino
RUN tar -xzf ${TEMP_DIR}/*.tgz --strip 1
RUN sed -i 's/decline/accept/g' silent.cfg && \
${TEMP_DIR}/install.sh -s silent.cfg && \
${INTEL_OPENVINO_DIR}/install_dependencies/install_openvino_dependencies.sh
# installing dependencies for package
WORKDIR /tmp
RUN rm -rf ${TEMP_DIR}
RUN ${PYTHON} -m pip install --no-cache-dir setuptools && \
find "${INTEL_OPENVINO_DIR}/" -type f -name "*requirements*.*" -path "*/${PYTHON}/*" -exec ${PYTHON} -m pip install --no-cache-dir -r "{}" \; && \
find "${INTEL_OPENVINO_DIR}/" -type f -name "*requirements*.*" -not -path "*/post_training_optimization_toolkit/*" -not -name "*windows.txt" -not -name "*ubuntu16.txt" -not -path "*/python3*/*" -not -path "*/python2*/*" -exec ${PYTHON} -m pip install --no-cache-dir -r "{}" \;
WORKDIR ${INTEL_OPENVINO_DIR}/deployment_tools/open_model_zoo/tools/accuracy_checker
RUN source ${INTEL_OPENVINO_DIR}/bin/setupvars.sh && \
${PYTHON} -m pip install --no-cache-dir -r ${INTEL_OPENVINO_DIR}/deployment_tools/open_model_zoo/tools/accuracy_checker/requirements.in && \
${PYTHON} ${INTEL_OPENVINO_DIR}/deployment_tools/open_model_zoo/tools/accuracy_checker/setup.py install
WORKDIR ${INTEL_OPENVINO_DIR}/deployment_tools/tools/post_training_optimization_toolkit
RUN if [ -f requirements.txt ]; then \
${PYTHON} -m pip install --no-cache-dir -r ${INTEL_OPENVINO_DIR}/deployment_tools/tools/post_training_optimization_toolkit/requirements.txt && \
${PYTHON} ${INTEL_OPENVINO_DIR}/deployment_tools/tools/post_training_optimization_toolkit/setup.py install; \
fi;
# Install model_optimizer requisites, it needs tf 1.5 for ApolloLake and setuptools
RUN sed -i 's/<2.0.0/<=1.5.0/g' $INSTALL_DIR/deployment_tools/model_optimizer/requirements.txt
RUN pip3 install torch==1.4.0
RUN $INSTALL_DIR/deployment_tools/model_optimizer/install_prerequisites/install_prerequisites.sh
# Init Openvino variables
RUN echo "source $INSTALL_DIR/bin/setupvars.sh" >> /root/.bashrc
RUN echo 'export PYTHONPATH="$PYTHONPATH:/root/omz_demos_build/intel64/Release/lib"' >> /root/.bashrc
RUN echo 'export ngraph_DIR=/opt/intel/openvino/deployment_tools/ngraph/cmake' >> /root/.bashrc
# Check installation with benchmark demo
RUN $INSTALL_DIR/deployment_tools/demo/demo_benchmark_app.sh
#RUN sed -i 's/<2.0.0/<=1.5.0/g' ${INTEL_OPENVINO_DIR}/deployment_tools/model_optimizer/requirements.txt
#RUN pip3 install torch==1.4.0
#RUN ${INTEL_OPENVINO_DIR}/deployment_tools/model_optimizer/install_prerequisites/install_prerequisites.sh
# Post-installation cleanup and setting up OpenVINO environment variables
RUN if [ -f "${INTEL_OPENVINO_DIR}"/bin/setupvars.sh ]; then \
printf "\nsource \${INTEL_OPENVINO_DIR}/bin/setupvars.sh\n" >> /root/.bashrc; \
fi;
RUN find "${INTEL_OPENVINO_DIR}/" -name "*.*sh" -type f -exec dos2unix {} \;
WORKDIR ${INTEL_OPENVINO_DIR}
RUN ${INTEL_OPENVINO_DIR}/deployment_tools/demo/demo_benchmark_app.sh
CMD ["/bin/bash"]
......@@ -3,7 +3,7 @@
FROM local/dockervino:phase1
MAINTAINER jdg:juan-diego.gonzales-zuniga@kontron.com
ENV tools=$INSTALL_DIR/deployment_tools
ENV tools=${INTEL_OPENVINO_DIR}/deployment_tools
ENV downloader=$tools/tools/model_downloader/downloader.py
ENV optimizer=$tools/model_optimizer
ENV converter=$tools/tools/model_downloader/converter.py
......@@ -27,7 +27,7 @@ RUN python3 $downloader --name head-pose-estimation-adas-0001 --output_dir $mode
# Download tracker networks
RUN $downloader --name person-detection-retail-0013 --output_dir $models/ir
RUN $downloader --name person-reidentification-retail-0031 --output_dir $models/ir
RUN $downloader --name person-reidentification-retail-0248 --output_dir $models/ir
# Downloading SSD Detection
RUN python3 $downloader --name ssd300 --output_dir $models
......@@ -46,21 +46,21 @@ RUN python3 $downloader --list $tools/open_model_zoo/demos/python_demos/human_po
RUN python3 $converter --list $tools/open_model_zoo/demos/python_demos/human_pose_estimation_3d_demo/models.lst --o $models/ir --mo $optimizer/mo.py
# Download Yolo v3
RUN apt-get install git wget -y
RUN wget https://download.01.org/opencv/public_models/022020/yolo_v3/yolov3.pb && \
wget https://download.01.org/opencv/public_models/022020/yolo_v3/yolo_v3_new.json
RUN python3 $downloader --name yolo-v3-tf
#wget https://download.01.org/opencv/public_models/022020/yolo_v3/yolov3.pb && \
# wget https://download.01.org/opencv/public_models/022020/yolo_v3/yolo_v3_new.json
# Optimizer on Yolov3
RUN python3 $optimizer/mo_tf.py \
--input_model yolov3.pb \
--transformations_config yolo_v3_new.json \
--input_model $models/public/yolo-v3-tf/yolo-v3.pb \
--transformations_config $models/public/yolo-v3-tf/yolo-v3.json \
--input_shape [1,416,416,3] \
--output_dir $models/ir/yolo/FP32 \
--model_name yolo_v3 \
--data_type FP32
RUN python3 $optimizer/mo_tf.py \
--input_model yolov3.pb \
--transformations_config yolo_v3_new.json \
--input_model $models/public/yolo-v3-tf/yolo-v3.pb \
--transformations_config $models/public/yolo-v3-tf/yolo-v3.json \
--input_shape [1,416,416,3] \
--output_dir $models/ir/yolo/FP16 \
--model_name yolo_v3 \
......@@ -68,21 +68,21 @@ RUN python3 $optimizer/mo_tf.py \
WORKDIR $models
# Download smallest maskrcnn
RUN wget http://download.tensorflow.org/models/object_detection/mask_rcnn_inception_v2_coco_2018_01_28.tar.gz
RUN tar -xzf mask_rcnn_inception_v2_coco_2018_01_28.tar.gz
RUN python3 $downloader --name mask_rcnn_inception_v2_coco
# Optimizer on maskrcnn
RUN python3 $optimizer/mo_tf.py \
--input_model $models/mask_rcnn_inception_v2_coco_2018_01_28/frozen_inference_graph.pb \
--transformations_config /opt/intel/openvino/deployment_tools/model_optimizer/extensions/front/tf/mask_rcnn_support.json \
--tensorflow_object_detection_api_pipeline $models/mask_rcnn_inception_v2_coco_2018_01_28/pipeline.config \
--input_model $models/public/mask_rcnn_inception_v2_coco/mask_rcnn_inception_v2_coco_2018_01_28/frozen_inference_graph.pb \
--transformations_config $tools/model_optimizer/extensions/front/tf/mask_rcnn_support.json \
--tensorflow_object_detection_api_pipeline $models/public/mask_rcnn_inception_v2_coco/mask_rcnn_inception_v2_coco_2018_01_28/pipeline.config \
--output_dir $models/ir/mask_rcnn/FP32 \
--model_name mask_rcnn_inception_v2 \
--data_type FP32 --reverse_input_channels
RUN python3 $optimizer/mo_tf.py \
--input_model $models/mask_rcnn_inception_v2_coco_2018_01_28/frozen_inference_graph.pb \
--transformations_config /opt/intel/openvino/deployment_tools/model_optimizer/extensions/front/tf/mask_rcnn_support.json \
--tensorflow_object_detection_api_pipeline $models/mask_rcnn_inception_v2_coco_2018_01_28/pipeline.config \
--input_model $models/public/mask_rcnn_inception_v2_coco/mask_rcnn_inception_v2_coco_2018_01_28/frozen_inference_graph.pb \
--transformations_config $tools/model_optimizer/extensions/front/tf/mask_rcnn_support.json \
--tensorflow_object_detection_api_pipeline $models/public/mask_rcnn_inception_v2_coco/mask_rcnn_inception_v2_coco_2018_01_28/pipeline.config \
--output_dir $models/ir/mask_rcnn/FP16 \
--model_name mask_rcnn_inception_v2 \
--data_type FP16 --reverse_input_channels
CMD ["/bin/bash"]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment