Commit e1c504de authored by Juan Diego's avatar Juan Diego
Browse files

Phase2 removed

parent e8d87c64
# Docker image after installation
# Downloads model ssd300 and creates yolov3
FROM local/dockervino:phase1
MAINTAINER jdg:juan-diego.gonzales-zuniga@kontron.com
# General envs
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
ENV models=/root/openvino_models
WORKDIR $models
# Downloading Human Pose Detection
RUN python3 $downloader --name human-pose-estimation-0001 --output_dir $models/ir
# Downloading Face Detection
RUN python3 $downloader --name face-detection-retail-0004 --output_dir $models/ir
# Downloading Age gender Recognition
RUN python3 $downloader --name age-gender-recognition-retail-0013 --output_dir $models/ir
# Downloaing Emotion Recognition
RUN python3 $downloader --name emotions-recognition-retail-0003 --output_dir $models/ir
# Downloading Head Pose Estimation
RUN python3 $downloader --name head-pose-estimation-adas-0001 --output_dir $models/ir
# Download tracker networks
RUN $downloader --name person-detection-retail-0013 --output_dir $models/ir
RUN $downloader --name person-reidentification-retail-0277 --output_dir $models/ir
# Downloading SSD Detection
RUN python3 $downloader --name ssd300 --output_dir $models
RUN python3 $optimizer/mo.py \
--input_model $models/public/ssd300/models/VGGNet/VOC0712Plus/SSD_300x300_ft/VGG_VOC0712Plus_SSD_300x300_ft_iter_160000.caffemodel \
--input_proto $models/public/ssd300/models/VGGNet/VOC0712Plus/SSD_300x300_ft/deploy.prototxt \
--output_dir $models/ir/ssd300/FP32 --model_name ssd300 --data_type FP32
RUN python3 $optimizer/mo.py \
--input_model $models/public/ssd300/models/VGGNet/VOC0712Plus/SSD_300x300_ft/VGG_VOC0712Plus_SSD_300x300_ft_iter_160000.caffemodel \
--input_proto $models/public/ssd300/models/VGGNet/VOC0712Plus/SSD_300x300_ft/deploy.prototxt \
--output_dir $models/ir/ssd300/FP16 --model_name ssd300 --data_type FP16
# Downloading Human Pose Detection 3D
RUN python3 $downloader --list $tools/open_model_zoo/demos/python_demos/human_pose_estimation_3d_demo/models.lst
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 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 $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 $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 \
--data_type FP16
WORKDIR $models
# Download smallest maskrcnn
RUN python3 $downloader --name mask_rcnn_inception_v2_coco
# Optimizer on maskrcnn
RUN python3 $optimizer/mo_tf.py \
--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/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"]
# @(#) run with coherent naming
docker build --tag=local/dockervino:phase2 --network=host . #| tee openvinobuild.log
#!/bin/bash
myimage=local/dockervino:phase2
myname=dockervinoph2
set -x
docker run \
-d \
-ti \
--privileged \
--net=host \
--env="DISPLAY" \
--env="PS1=$myname> "\
--publish-all=true \
--hostname=$myname \
--name $myname \
--cidfile=/tmp/monitcont.id \
$myimage /bin/bash
contid=$(cat /tmp/monitcont.id; rm -f /tmp/monitcont.id)
set +x
$debug docker logs $contid
$debug docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' $1 $contid
set +x
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