原文:Github 项目 - OpenPose 参数说明 - AIUAI
OpenPose 作为强大的关键点估计项目,其提供了很多可配置参数选项.
完整参数列表可运行:
# buntu
cd OPENPOSE_ROOT/
./build/examples/openpose/openpose.bin --help
OpenPose 运行,如:
# Ubuntu: Body + Hand + Face
./build/examples/openpose/openpose.bin
-image_dir /path/to/images/
--num_gpu_start 1
--display 2
--fullscreen
--write_images /path/to/res_images/
--net_resolution "1312x736"
--scale_number 4
--scale_gap 0.25
--hand
--hand_scale_number 6
--hand_scale_range 0.4
--face
# Ubuntu: Body
./build/examples/openpose/openpose.bin
--image_dir /path/to/images/
--num_gpu_start 1
--display 2
--fullscreen
--write_images /path/to/res_images/
--face
: 开启 Face 关键点检测.
--hand
: 开启 Hand 关键点检测
--video input.mp4
: 读取 Video.
--camera 3
: 读取 webcam number 3.
--image_dir path_to_images/
: 运行图像路径内的图片.
--ip_camera http://iris.not.iac.es/axis-cgi/mjpg/video.cgi?resolution=320x240?x.mjpeg
: 在 streamed IP camera 上运行. 参考public IP cameras 例子.
--write_video path.avi
: 将处理后的图片保存为 Video.
--write_images folder_path
: 将处理后的图片保存到指定路径.
--write_keypoint path/
: 在指定路径输出包含人体姿态数据的 JSON, XML 或 YML 文件.
--process_real_time
: 对于视频,可能在实时运行时,跳过某些视频帧.
--disable_blending
: 如果 --disable_blending=True
,则在很色背景上渲染估计结果(如 keypoints skeletons 和 heatmaps),而不显示原始图像. Related: part_to_show
, alpha_pose
, and alpha_pose
.
--part_to_show
: 可视化的预测通道(Prediction channel).
--display 0
: 不打开可视化显示窗口. 对于服务器部署和 OpenPose 加速很帮助.
--num_gpu 2 --num_gpu_start 1
: 多 GPUs 时,设置开始的 GPU id. 默认使用所有可用的 GPUs.
--model_pose MPI
: 采用的模型Model,影响 Keypoints 的数量、运行速度和精度.
--logging_level 3
: Logging messages threshold, range [0,255]: 0 - 输出所有信息e & 255 - 不输出任何信息. Current messages in the range [1-4], 1 for low priority messages and 4 for important ones.
每个 Flag 包括 flag_name
, default value
和 description
.
--camera
or --flir_camera
). -1x-1
will use the default 1280x720 for --camera
, or the maximum flir camera resolution available for --flir_camera
"); 相机分辨率examples/media/video.avi
for our default example video.”); Video 作为输入,而不采用相机examples/media/
for our default example folder with 20 images. Read all standard formats (jpg, png, bmp, etc.).”); 待处理图像的路径n
to the n
-th lowest serial number camera.”); 可用作为输入的 FLIR 相机--frame_step 5
would read and process frames 0, 5, 10, etc…”); 跳过处理的帧数camera_parameter_folder
camera parameters; if true, it will not undistortionate, i.e., it will leave it as it is.”); 每一帧是否扭曲 distortion 处理write_json
& write_keypoint
flags. Select 0
to scale it to the original source resolution; 1
to scale it to the net output size (set with net_resolution
); 2
to scale it to the final output size (set with resolution
); 3
to scale it in the range [0,1], where (0,0) would be the top-left corner of the image, and (1,1) the bottom-right one; and 4 for range [-1,1], where (-1,-1) would be the top-left corner of the image, and (1,1) the bottom-right one. Non related with scale_number
and scale_gap
.”); Keypoints 缩放尺度scaleCOCO
(18 keypoints), MPI
(15 keypoints, ~10% faster), MPI_4_layers
(15 keypoints, even faster but less accurate).”); 采用的 Body 模型,如 Body_25
-1
in any of the dimensions, OP will choose the optimal aspect ratio depending on the user’s input value. E.g., the default -1x368
is equivalent to 656x368
in 16:9 resolutions, e.g., full HD (1980x1080) and HD (1280x720) resolutions.”); 模型网络的输入分辨率,16的倍数net_resolution
by your desired initial scale.”); 尺度Scales 间的 scale gapadd_heatmaps_X
flag is enabled, it will place then in sequential memory order: body parts + bkg + PAFs. It will follow the order on POSE_BODY_PART_MAPPING in src/openpose/pose/poseParameters.cpp
. Program speed will considerably decrease. Not required for OpenPose, enable it only if you intend to explicitly use this information later.”); 是否添加 Body Parts 的 heatmapsadd_heatmaps_parts
, but adding the heatmap corresponding to background.”); 是否添加 BKG 的 heatmapsadd_heatmaps_parts
, but adding the PAFs.”); 是否添加 PAFs 的 heatmapswrite_json
in order to save this information. If true, it will fill the op::Datum::poseCandidates array with the body part candidates. Candidates refer to all the detected body parts, before being assembled into people. Note that the number of candidates is equal or higher than the number of final body parts (i.e., after being assembled into people). The empty body parts are filled with 0s. Program speed will slightly decrease. Not required for OpenPose, enable it only if you intend to explicitly use this information.”); 是否保存 Body Part Candidatesmodel_folder
. Note that this will considerable slow down the performance and increse the required GPU memory. In addition, the greater number of people on the image, the slower OpenPose will be.”); 是否进行 Face 关键点检测net_resolution
but applied to the face keypoint detector. 320x320 usually works fine while giving a substantial speed up when multiple faces on the image.”); Face 模型网络的输入分辨率model_folder
. Analogously to --face
, it will also slow down the performance, increase the required GPU memory and its speed depends on the number of people.”); 是否进行 Hand 关键点检测net_resolution
but applied to the hand keypoint detector.”); Hand 模型的网络输入分辨率scale_number
but applied to the hand keypoint detector. Our best results were found with hand_scale_number
= 6 and hand_scale_range
= 0.4.”); 类似于 scale_number
参数,但只用于 Hand 关键点检测scale_gap
but applied to the hand keypoint detector. Total range between smallest and biggest scale. The scales will be centered in ratio 1. E.g., if scaleRange = 0.4 and scalesNumber = 2, then there will be 2 scales, 0.8 and 1.2.”); 类似于 scale_gap
参数,但只用于 Hand 关键点检测--image_dir
or --video
. OpenPose will read as many images per iteration, allowing tasks such as stereo camera processing (--3d
). Note that --camera_parameters_folder
must be set. OpenPose must find as many xml
files in the parameter folder as this number indicates.”); **3D 视角Videos **part_to_show
, alpha_pose
, and alpha_pose
.”); 是否渲染可视化输出结果alpha_X
flags). If -1, it will pick CPU if CPU_ONLY is enabled, or GPU if CUDA is enabled. If rendering is enabled, it will render both outputData
and cvOutputData
with the original image and desired body part to be shown (i.e., keypoints, heat maps or PAFs).”); 渲染姿态,0 - no rendering, 1 - CPU rendering,2 - GPU rendering
render_threshold
, but applied to the face keypoints.”); 类似于 render_threshold
,但用于 Face 关键点
render_pose
but applied to the face. Extra option: -1 to use the same configuration that render_pose
is using.”); 类似于 render_pose
,但用于 Face 关键点
alpha_pose
but applied to face.”); 类似于 alpha_pose
,但用于 Face 关键点
alpha_heatmap
but applied to face.”); 类似于 alpha_heatmap
,但用于 Face 关键点
render_threshold
, but applied to the hand keypoints.”); 类似于 render_threshold
,但用于 Hand 关键点
render_pose
but applied to the hand. Extra option: -1 to use the same configuration that render_pose
is using.”); 类似于 render_pose
,但用于 Hand 关键点
alpha_pose
but applied to hand.”); 类似于 alpha_pose
,但用于 Hand 关键点****
alpha_heatmap
but applied to hand.”); 类似于 alpha_heatmap
,但用于 Hand 关键点
--3d
enabled); and 1 for both 2-D and 3-D display.”); 显示模式,-1 - 自动选择,0 - 不显示,2 - 2D 显示,3 - 3D 显示, 1 - 2D 和 3D 显示verbose
frames. If number in the range (0,1), it will print the progress every verbose
times the total of frames.”);write_images_format
image format.”); 渲染图像帧的保存路径write_images
, e.g., png, jpg or bmp. Check the OpenCV function cv::imwrite for all compatible extensions.”); 渲染图像帧的保存格式.avi
. It internally uses cv::VideoWriter. Flag write_video_fps
controls FPS.”); 渲染帧的写入 JPEG video 格式的完整文件路径--part_candidates
enabled).”); 输出结果保存为 JSON 格式文件的路径add_heatmaps_X
flag must be enabled.”); Body Pose Heatmaps 写入为 PNG 格式的保存路径write_heatmaps
, analogous to write_images_format
. For lossless compression, recommended png
for integer heatmaps_scale
and float
for floating values.”); 保存 heatmaps 结果的文件格式write_json
) Directory to write the people pose keypoint data. Set format with write_keypoint_format
.”); **[已废弃] **write_json
) File extension and format for write_keypoint
: json, xml, yaml & yml. Json not available for OpenCV < 3.0, use write_json
instead.”); [已废弃]~/Desktop/adamResult.avi
. Flag write_video_fps
controls FPS.”);~/Desktop/mocapResult.bvh
.”);192.168.0.1
.”);