Dockerfile 4.32 KB
Newer Older
GONZALES ZUNIGA Juan Diego's avatar
GONZALES ZUNIGA Juan Diego committed
1
2
# Docker image after installation
# Downloads model ssd300 and creates yolov3
GONZALES ZUNIGA Juan Diego's avatar
GONZALES ZUNIGA Juan Diego committed
3

4
FROM local/dockervino:phase1
GONZALES ZUNIGA Juan Diego's avatar
GONZALES ZUNIGA Juan Diego committed
5
MAINTAINER jdg:juan-diego.gonzales-zuniga@kontron.com
Ukhu's avatar
Ukhu committed
6
7

# General envs
Ukhu's avatar
Ukhu committed
8
ENV tools=${INTEL_OPENVINO_DIR}/deployment_tools
Ukhu's avatar
Ukhu committed
9
10
11
ENV downloader=$tools/tools/model_downloader/downloader.py
ENV optimizer=$tools/model_optimizer
ENV converter=$tools/tools/model_downloader/converter.py
Ukhu's avatar
Ukhu committed
12
ENV models=/root/openvino_models
GONZALES ZUNIGA Juan Diego's avatar
GONZALES ZUNIGA Juan Diego committed
13

Ukhu's avatar
Ukhu committed
14
WORKDIR $models
GONZALES ZUNIGA Juan Diego's avatar
GONZALES ZUNIGA Juan Diego committed
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# 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

Ukhu's avatar
Ukhu committed
30
31
# Download tracker networks
RUN $downloader --name person-detection-retail-0013 --output_dir $models/ir
develop's avatar
develop committed
32
RUN $downloader --name person-reidentification-retail-0277 --output_dir $models/ir
Ukhu's avatar
Ukhu committed
33
34
35
36
37
38
39
40
41
42
43
44
45

# 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

Ukhu's avatar
Ukhu committed
46
47
48
49
# 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

Ukhu's avatar
Ukhu committed
50
# Download Yolo v3
Ukhu's avatar
Ukhu committed
51
52
RUN python3 $downloader --name yolo-v3-tf
#wget https://download.01.org/opencv/public_models/022020/yolo_v3/yolov3.pb && \
Ukhu's avatar
Ukhu committed
53
#wget https://download.01.org/opencv/public_models/022020/yolo_v3/yolo_v3_new.json
GONZALES ZUNIGA Juan Diego's avatar
GONZALES ZUNIGA Juan Diego committed
54
55
56

# Optimizer on Yolov3
RUN python3 $optimizer/mo_tf.py \
Ukhu's avatar
Ukhu committed
57
58
	--input_model $models/public/yolo-v3-tf/yolo-v3.pb \
	--transformations_config $models/public/yolo-v3-tf/yolo-v3.json \
GONZALES ZUNIGA Juan Diego's avatar
GONZALES ZUNIGA Juan Diego committed
59
60
61
62
63
	--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 \
Ukhu's avatar
Ukhu committed
64
65
	--input_model $models/public/yolo-v3-tf/yolo-v3.pb \
	--transformations_config $models/public/yolo-v3-tf/yolo-v3.json \
GONZALES ZUNIGA Juan Diego's avatar
GONZALES ZUNIGA Juan Diego committed
66
67
68
69
70
71
72
	--input_shape [1,416,416,3] \
	--output_dir $models/ir/yolo/FP16 \
	--model_name yolo_v3 \
	--data_type FP16

WORKDIR $models
# Download smallest maskrcnn
Ukhu's avatar
Ukhu committed
73
RUN python3 $downloader --name mask_rcnn_inception_v2_coco
GONZALES ZUNIGA Juan Diego's avatar
GONZALES ZUNIGA Juan Diego committed
74
75
# Optimizer on maskrcnn
RUN python3 $optimizer/mo_tf.py \
Ukhu's avatar
Ukhu committed
76
77
78
	--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 \
GONZALES ZUNIGA Juan Diego's avatar
GONZALES ZUNIGA Juan Diego committed
79
80
81
82
	--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 \
Ukhu's avatar
Ukhu committed
83
84
85
        --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 \
GONZALES ZUNIGA Juan Diego's avatar
GONZALES ZUNIGA Juan Diego committed
86
87
88
        --output_dir $models/ir/mask_rcnn/FP16 \
        --model_name mask_rcnn_inception_v2 \
        --data_type FP16 --reverse_input_channels
Ukhu's avatar
Ukhu committed
89

90
CMD ["/bin/bash"]