赞
踩
运行例程是进行开发的第一步,本篇分享一下如何运行行人追踪的demo。
官网文档link
运行环境:
Windows10系统
关于工具包安装和例程编译参考上篇:
win10环境搭建OpenVINO Toolkit并编译运行例程----(1)openvino简介和win10环境搭建
activate env_name
cd C:\Program Files (x86)\IntelSWTools\openvino\bin
setupvars.bat
C:\Users\hp\Documents\Intel\OpenVINO\inference_engine_demos_build\intel64\Release
./pedestrian_tracker_demo -h InferenceEngine: API version ............ <version> Build .................. <number> pedestrian_tracker_demo [OPTION] Options: -h Print a usage message. -i "<path>" Required. Path to a video file or a folder with images (all images should have names 0000000001.jpg, 0000000002.jpg, etc). -m_det "<path>" Required. Path to the Pedestrian Detection Retail model (.xml) file. -m_reid "<path>" Required. Path to the Pedestrian Reidentification Retail model (.xml) file. -l "<absolute_path>" Optional. For CPU custom layers, if any. Absolute path to a shared library with the kernels implementation. Or -c "<absolute_path>" Optional. For GPU custom kernels, if any. Absolute path to the .xml file with the kernels description. -d_det "<device>" Optional. Specify the target device for pedestrian detection (the list of available devices is shown below). Default value is CPU. Use "-d HETERO:<comma-separated_devices_list>" format to specify HETERO plugin. -d_reid "<device>" Optional. Specify the target device for pedestrian reidentification (the list of available devices is shown below). Default value is CPU. Use "-d HETERO:<comma-separated_devices_list>" format to specify HETERO plugin. -r Optional. Output pedestrian tracking results in a raw format (compatible with MOTChallenge format). -pc Optional. Enable per-layer performance statistics. -no_show Optional. Do not show processed video. -delay Optional. Delay between frames used for visualization. If negative, the visualization is turned off (like with the option 'no_show'). If zero, the visualization is made frame-by-frame. -out "<path>" Optional. The file name to write output log file with results of pedestrian tracking. The format of the log file is compatible with MOTChallenge format. -first Optional. The index of the first frame of video sequence to process. This has effect only if it is positive and the source video sequence is an image folder. -last Optional. The index of the last frame of video sequence to process. This has effect only if it is positive and the source video sequence is an image folder.
根据上述输入参数,有3个必须输入的文件:
后两个的下载可以从open model zoo中下载对应openVINO工具包版本文件夹下的xml和bin文件。下载link
其中VPU的设备必须使用FP16版本的文件。
另外,使用chrome浏览器直接点击下载只能下载bin文件,对于xml文件只能浏览的情况我使用了wget命令获取下载:
下载FP32/person-detection-retail-0013.xml 命令行示例:
wget --no-check-certificate https://download.01.org/opencv/2019/open_model_zoo/R3/20190905_163000_models_bin/person-detection-retail-0013/FP32/person-detection-retail-0013.bin
./pedestrian_tracker_demo -i <路径视频文件> \
-m_det <模型路径> /person-detection-retail-0013.xml \
-m_reid <模型路径> /person-reidentification-retail-0031.xml \
-d_det GPU
该演示使用OpenCV来显示结果帧,并将检测结果渲染为边界框,曲线(用于显示轨迹)和文本。
运行截图后期补充。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。