Commit 12859742 authored by Juan Diego Gonzales Zuniga's avatar Juan Diego Gonzales Zuniga
Browse files

added segmentation file

parent 24d4a9da
......@@ -16,14 +16,16 @@ elif [ "$app" = "/root/omz_demos_build/intel64/Release/human_pose_estimation_dem
$app -i $input -at openpose -d $device -m $model -send $send -broker $broker -client $client
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 -send $send -broker $broker -client $client
elif [ "$app" = "/opt/intel/openvino/deployment_tools/open_model_zoo/demos/python_demos/human_pose_estimation_3d_demo/human_pose_estimation_3d_demo.py" ]; then
elif [ "$app" = "/opt/intel/openvino/deployment_tools/open_model_zoo/demos/human_pose_estimation_3d_demo/python/human_pose_estimation_3d_demo.py" ]; then
if [ "$send" = "true" ]; then
python3 $app -i $input -d $device -m $model --send --broker $broker --client $client
else
python3 $app -i $input -d $device -m $model
fi
else
elif [ "$app" = "/opt/intel/openvino/deployment_tools/open_model_zoo/demos/instance_segmentation_demo/python/instance_segmentation_demo.py" ]; then
python3 $app -i $input -d $device -m $model --labels $labels_file
else
$app -i $input -d $device -m $model
fi
#!/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
app=/opt/intel/openvino/deployment_tools/open_model_zoo/demos/instance_segmentation_demo/python/instance_segmentation_demo.py
labels_file=/opt/intel/openvino/deployment_tools/open_model_zoo/data/dataset_classes/coco_80cl_bkgr.txt
######## Instance Segmentation CPU ###
if [ "$device" == CPU ]; then
model=${models_dir}/intel/instance-segmentation-security-0228/FP32/instance-segmentation-security-0228.xml
send=true
broker=kontron-lora.cloudapp.net
client=Demo
fi
###### Instance Segmentation MYRIAD #####
if [ "$device" == MYRIAD ]; then
model=${models_dir}/intel/instance-segmentation-security-0228/FP16/instance-segmentation-security-0228.xml
send=true
broker=kontron-lora.cloudapp.net
client=Demo
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="labels_file=$labels_file" \
--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="send=$send" \
--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