Docker下运行openvino人脸识别示例的步骤

2019-08-13  本文已影响0人  遇事不决_可问春风_

(1)获取openvino的软件镜像openvino_docker.tar

2019-08-13 15-49-53.png

(2)Docker导入本地镜像为openvino

cat /home/czw/下载/openvino_docker/openvino_docker |docker import - openvino

(3)查看主机上的镜像,找到IMAGE ID

docker images


2019-08-13 15-54-26.png

(4)使用openvino镜像来运行

docker run -it openvino:latest /bin/bash
docker ps -a

使用docker ps -a查看有那些容器在运行
2019-08-13 15-58-48.png

(5)再次启动容器需要的操作

docker start 容器ID
docker attach 容器ID


2019-08-13 16-03-25.png

root@7483ae1d61a4:容器已启动标志

之后所有的操作都是在容器内:

2019-08-13 16-05-48.png

在容器内时,把它当做linux系统来操作即可

(6)在容器内运行人脸识别示例

main.cpp所在位置:/opt/intel/computer_vision_sdk_2018.3.343/
deployment_tools/inference_engine/samples/interactice_face
_detection_sample

(1)在xx/samples目录下创建名为build的目录

创建build目录:mkdir build
切换到build目录:cd build

(2)编译

cmake -DCMAKE_BUILD_+TYPE=Debug /opt/intel/computer_vision_sdk_2018.3.343/deployment_tools/inference_engine/samples)
运行make生成示例:make
切换到build下的/intel64/Debug目录:
cd /opt/intel/computer_vision_sdk_2018.3.343/deployment_tools/
inference_engine/samples/build/intel64/Debug

(3)输入模型参数,运行示例

./interactive_face_detection_sample -i /opt/image.jpg -m /opt/intel/computer_vision_sdk_2018.3.343/deployment_tools/intel_models/face-detection-adas-0001/FP32/face-detection-adas-0001.xml -m_ag /opt/intel/computer_vision_sdk_2018.3.343/deployment_tools/intel_models/age-gender-recognition-retail-0013/FP32/age-gender-recognition-retail-0013.xml -m_hp /opt/intel/computer_vision_sdk_2018.3.343/deployment_tools/intel_models/head-pose-estimation-adas-0001/FP32/head-pose-estimation-adas-0001.xml -m_em /opt/intel/computer_vision_sdk_2018.3.343/deployment_tools/intel_models/emotions-recognition-retail-0003/FP32/emotions-recognition-retail-0003.xml -d CPU


2019-08-13 16-26-54.png 2019-08-13 16-27-14.png

图像或视频处理后的存储位置: /opt/video/

(4)从容器将文件复制到本机

docker cp 7483ae1d61a4:/opt/video/image.jpg /home/czw/下载

上一篇下一篇

猜你喜欢

热点阅读