Commit e64d7abf authored by Ukhu's avatar Ukhu
Browse files

Correct entrypoint double elif, adds running examples

parent fe4a414e
......@@ -16,13 +16,9 @@ if [ "$app" = "/root/omz_demos_build/intel64/Release/interactive_face_detection_
-d_ag $device -m_ag $agM \
-d_em $device -m_em $emM \
-d_hp $device -m_hp $hpM
fi
if [ "$app" = "/root/omz_demos_build/intel64/Release/human_pose_estimation_demo" ]; then
elif [ "$app" = "/root/omz_demos_build/intel64/Release/human_pose_estimation_demo" ]; then
$app -i $input -d $device -m $model -r $raw -broker $broker -client $client
fi
if [ "$app" = "/root/omz_demos_build/intel64/Release/pedestrian_tracker_demo" ]; then
elif [ "$app" = "/root/omz_demos_build/intel64/Release/pedestrian_tracker_demo" ]; then
$app -i $input -d_det $device -d_reid $device -m_det $m_det -m_reid $m_reid -r $raw -broker $broker -client $client
else
$app -i $input -d $device -m $model
......
#!/bin/bash
myimage=local/dockervino:demo
myname=dockervinodemo
#################################
##### Display Parameters #####
#################################
# if run from a graphics window or shell, set some server params, else document what is needed
[ k$DISPLAY = k ] && doit=echo
# X11 Display and access file (to us in XAUTORITY env)
# enable access from anywhere (used for containers)
$doit xhost +
# disable screen saver
$doit xset s 0
# force screen to use (0 is usually the physical display of the system, others would be Xvnc virtual screens)
display=$DISPLAY
rm -f ./xauthority ; cp $XAUTHORITY ./xauthority ;chmod 666 ./xauthority #else root user inside container cannot open
#################################
##### General Parameters ######
#################################
# Init Openvino environment
setupvars=/opt/intel/openvino/bin/setupvars.sh
examples_dir=/root/omz_demos_build/intel64/Release
models_dir=/root/openvino_models/ir
# Input: IPCam or USBCam
input=/videos/test.mp4
# device: CPU or MYRIAD
device=CPU
##### CPU Face, Emotion, Age, Gender and Head Pose estimation #########
if [ "$device" == CPU ]; then
app=${examples_dir}/interactive_face_detection_demo
model=${models_dir}/intel/face-detection-retail-0004/FP32/face-detection-retail-0004.xml
agM=${models_dir}/intel/age-gender-recognition-retail-0013/FP32/age-gender-recognition-retail-0013.xml
emM=${models_dir}/intel/emotions-recognition-retail-0003/FP32/emotions-recognition-retail-0003.xml
hpM=${models_dir}/intel/head-pose-estimation-adas-0001/FP32/head-pose-estimation-adas-0001.xml
fi
###### NCS2 Face, Emotion, Age, Gender and Head Pose estimation #########
if [ "$device" == MYRIAD ]; then
app=${examples_dir}/interactive_face_detection_demo
model=${models_dir}/intel/face-detection-retail-0004/FP16/face-detection-retail-0004.xml
agM=${models_dir}/intel/age-gender-recognition-retail-0013/FP16/age-gender-recognition-retail-0013.xml
emM=${models_dir}/intel/emotions-recognition-retail-0003/FP16/emotions-recognition-retail-0003.xml
hpM=${models_dir}/intel/head-pose-estimation-adas-0001/FP16/head-pose-estimation-adas-0001.xml
fi
opts="--entrypoint=/entrypoint.sh"
# Running the container
set -x
docker run $opts \
-d \
-ti \
--mount type=bind,source="$(pwd)"/videos,target=/videos \
--privileged \
--net=host \
--env="setupvars=$setupvars" \
--env="DISPLAY=$display" \
--env="input=$input" \
--env="device=$device" \
--env="app=$app" \
--env="model=$model" \
--env="m_det=$m_det" \
--env="m_reid=$m_reid" \
--env="broker=$broker" \
--env="client=$client" \
--env="raw=$raw" \
--env="agM=$agM" \
--env="emM=$emM" \
--env="hpM=$hpM" \
--device="/dev/video0:/dev/video0" \
--volume="/dev:/dev" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix" \
--env="PS1=$myname> "\
--publish-all=true \
--hostname=$myname \
--entrypoint /entrypoint.sh \
--name $myname \
--cidfile=/tmp/monitcont.id \
$myimage /bin/sh
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
......@@ -25,25 +25,25 @@ examples_dir=/root/omz_demos_build/intel64/Release
models_dir=/root/openvino_models/ir
# Input: IPCam or USBCam
input=/videos/test.mp4
#################################
######## Examples ###########
#################################
####### CPU Pose Estimation ########
# device: CPU or MYRIAD
device=CPU
app=${examples_dir}/human_pose_estimation_demo
model=${models_dir}/intel/human-pose-estimation-0001/FP32/human-pose-estimation-0001.xml
raw=true
broker=kontron-lora.cloudapp.net
client=Demo
###### NCS2 Pose Estimation ######
#device=MYRIAD
#app=${examples_dir}/human_pose_estimation_demo
#model=${models_dir}/intel/human-pose-estimation-0001/FP16/human-pose-estimation-0001.xml
######## CPU Pose Estimation ###
if [ "$device" == CPU ]; then
app=${examples_dir}/human_pose_estimation_demo
model=${models_dir}/intel/human-pose-estimation-0001/FP32/human-pose-estimation-0001.xml
raw=true
broker=kontron-lora.cloudapp.net
client=Demo
fi
###### NCS2 Pose Estimation #####
if [ "$device" == MYRIAD ]; then
app=${examples_dir}/human_pose_estimation_demo
model=${models_dir}/intel/human-pose-estimation-0001/FP16/human-pose-estimation-0001.xml
raw=true
broker=kontron-lora.cloudapp.net
client=Demo
fi
opts="--entrypoint=/entrypoint.sh"
......
#!/bin/bash
myimage=local/dockervino:demo
myname=dockervinodemo
#################################
##### Display Parameters #####
#################################
# if run from a graphics window or shell, set some server params, else document what is needed
[ k$DISPLAY = k ] && doit=echo
# X11 Display and access file (to us in XAUTORITY env)
# enable access from anywhere (used for containers)
$doit xhost +
# disable screen saver
$doit xset s 0
# force screen to use (0 is usually the physical display of the system, others would be Xvnc virtual screens)
display=$DISPLAY
rm -f ./xauthority ; cp $XAUTHORITY ./xauthority ;chmod 666 ./xauthority #else root user inside container cannot open
#################################
##### General Parameters ######
#################################
# Init Openvino environment
setupvars=/opt/intel/openvino/bin/setupvars.sh
examples_dir=/root/omz_demos_build/intel64/Release
models_dir=/root/openvino_models/ir
# Input: IPCam or USBCam
input=/videos/test.mp4
# device: CPU or MYRIAD
device=CPU
####### CPU Object Detection ###
if [ "$device" == CPU ]; then
export app=${examples_dir}/object_detection_demo_ssd_async
export model=${models_dir}/ssd300/FP32/ssd300.xml
fi
###### NCS2 Object Detection ####
if [ "$device" == MYRIAD ]; then
export app=${examples_dir}/object_detection_demo_ssd_async
export model=${models_dir}/ssd300/FP16/ssd300.xml
fi
opts="--entrypoint=/entrypoint.sh"
# Running the container
set -x
docker run $opts \
-d \
-ti \
--mount type=bind,source="$(pwd)"/videos,target=/videos \
--privileged \
--net=host \
--env="setupvars=$setupvars" \
--env="DISPLAY=$display" \
--env="input=$input" \
--env="device=$device" \
--env="app=$app" \
--env="model=$model" \
--env="m_det=$m_det" \
--env="m_reid=$m_reid" \
--env="broker=$broker" \
--env="client=$client" \
--env="raw=$raw" \
--env="agM=$agM" \
--env="emM=$emM" \
--env="hpM=$hpM" \
--device="/dev/video0:/dev/video0" \
--volume="/dev:/dev" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix" \
--env="PS1=$myname> "\
--publish-all=true \
--hostname=$myname \
--entrypoint /entrypoint.sh \
--name $myname \
--cidfile=/tmp/monitcont.id \
$myimage /bin/sh
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
......@@ -25,24 +25,27 @@ examples_dir=/root/omz_demos_build/intel64/Release
models_dir=/root/openvino_models/ir
# Input: IPCam or USBCam
input=/videos/test.mp4
#################################
######## Examples ###########
#################################
####### Pedestrian Tracker ########
# device: CPU or MYRIAD
device=CPU
app=${examples_dir}/pedestrian_tracker_demo
m_det=${models_dir}/intel/person-detection-retail-0013/FP32/person-detection-retail-0013.xml
m_reid=${models_dir}/intel/person-reidentification-retail-0031/FP32/person-reidentification-retail-0031.xml
raw=true
broker=kontron-lora.cloudapp.net
client=Demo
###### NCS2 Pose Estimation ######
#device=MYRIAD
#app=${examples_dir}/human_pose_estimation_demo
#model=${models_dir}/intel/human-pose-estimation-0001/FP16/human-pose-estimation-0001.xml
######## CPU Pedestrian Tracker ###
if [ "$device" == CPU ]; then
export app=${examples_dir}/pedestrian_tracker_demo
export m_det=${models_dir}/intel/person-detection-retail-0013/FP32/person-detection-retail-0013.xml
export m_reid=${models_dir}/intel/person-reidentification-retail-0031/FP32/person-reidentification-retail-0031.xml
export raw=true
export broker=kontron-lora.cloudapp.net
export client=Demo
fi
###### NCS2 Pedestrian Tracker #####
if [ "$device" == MYRIAD ]; then
export app=${examples_dir}/pedestrian_tracker_demo
export m_det=${models_dir}/intel/person-detection-retail-0013/FP16/person-detection-retail-0013.xml
export m_reid=${models_dir}/intel/person-reidentification-retail-0031/FP16/person-reidentification-retail-0031.xml
export raw=true
export broker=kontron-lora.cloudapp.net
export client=Demo
fi
opts="--entrypoint=/entrypoint.sh"
......
#!/bin/bash
myimage=local/dockervino:demo
myname=dockervinodemo
#################################
##### Display Parameters #####
#################################
# if run from a graphics window or shell, set some server params, else document what is needed
[ k$DISPLAY = k ] && doit=echo
# X11 Display and access file (to us in XAUTORITY env)
# enable access from anywhere (used for containers)
$doit xhost +
# disable screen saver
$doit xset s 0
# force screen to use (0 is usually the physical display of the system, others would be Xvnc virtual screens)
display=$DISPLAY
rm -f ./xauthority ; cp $XAUTHORITY ./xauthority ;chmod 666 ./xauthority #else root user inside container cannot open
#################################
##### General Parameters ######
#################################
# Init Openvino environment
setupvars=/opt/intel/openvino/bin/setupvars.sh
examples_dir=/root/omz_demos_build/intel64/Release
models_dir=/root/openvino_models/ir
# Input: IPCam or USBCam
input=/videos/test.mp4
# device: CPU or MYRIAD
device=CPU
###### CPU YOLO V3 ########
if [ "$device" == CPU ]; then
app=${examples_dir}/object_detection_demo_yolov3_async
model=/root/openvino_models/ir/yolo/FP32/yolo_v3.xml
fi
###### NCS2 YOLO V3 ########
if [ "$device" == MYRIAD ]; then
app=${examples_dir}/object_detection_demo_yolov3_async
model=/root/openvino_models/ir/yolo/FP16/yolo_v3.xml
fi
opts="--entrypoint=/entrypoint.sh"
# Running the container
set -x
docker run $opts \
-d \
-ti \
--mount type=bind,source="$(pwd)"/videos,target=/videos \
--privileged \
--net=host \
--env="setupvars=$setupvars" \
--env="DISPLAY=$display" \
--env="input=$input" \
--env="device=$device" \
--env="app=$app" \
--env="model=$model" \
--env="m_det=$m_det" \
--env="m_reid=$m_reid" \
--env="broker=$broker" \
--env="client=$client" \
--env="raw=$raw" \
--env="agM=$agM" \
--env="emM=$emM" \
--env="hpM=$hpM" \
--device="/dev/video0:/dev/video0" \
--volume="/dev:/dev" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix" \
--env="PS1=$myname> "\
--publish-all=true \
--hostname=$myname \
--entrypoint /entrypoint.sh \
--name $myname \
--cidfile=/tmp/monitcont.id \
$myimage /bin/sh
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