我是靠谱客的博主 合适丝袜,最近开发中收集的这篇文章主要介绍Openpose环境配置,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

配置环境一:

系统:Win10 professional
机器:HP-Z840-Workstation
处理器:Intel® Xeon® CPU E5-2660 v3 @ 2.60GHz × 40
显卡:Quadro K5200/PCIe/SSE2
opencv 4.0.0
cuda 10.1.0
cudnn7.5.0
VS 2017 professional
openpose :1.5.0

配置环境二:

操作系统 Windows 10 64位 professional
处理器 AMD Ryzen 5 2600X 六核
显卡 Nvidia GeForce GTX 1070 Ti ( 8 GB / 索泰 )
opencv 4.0.0
cuda 10.1.0
cudnn7.5.0
VS 2015 professional
openpose :1.5.0

经验一:安装NVIDIA驱动时,网上的教程大多是cuda8.0,实际安装时会有英文提示:may not have driver for this graphic(大致是这样),如果忽略这个提示的话就会白干一场。所以选择最新的CUDA和CUDNN.

经验二:Cmake时选择x64

经验三:VS版本太低时会有414个关于"{“和”}"的报错,原因是因为C++的版本太低导致的格式错误。解决办法,使用更高的VS2017。不必局限于VS2015。

经验四:关于curtbase.dll的异常中断,原因是显卡性能太低导致的,比如显存太小。解决办法:更换更高配置的显卡,openpose要求可用显存大于2GB。

在这里插入图片描述

经验五:使用Release模式,不要使用debug

openpose调参:选择程序的运行功能,比如添加手部,脸部等骨骼功能时,进到#include <openpose/flags.hpp>里

在这里插入图片描述
将false改为true,图片中已经改过了。
类似的脸部的可以找到
在这里插入图片描述
需要注意的是脸部耗源。
在这个文件里搜索write,可以找到保存结果的选项

// Result Saving
DEFINE_string(write_images,             "",             "Directory to write rendered frames in `write_images_format` image format.");
DEFINE_string(write_images_format,      "png",          "File extension and format for `write_images`, e.g., png, jpg or bmp. Check the OpenCV"
                                                        " function cv::imwrite for all compatible extensions.");
DEFINE_string(write_video,              "",             "Full file path to write rendered frames in motion JPEG video format. It might fail if the"
                                                        " final path does not finish in `.avi`. It internally uses cv::VideoWriter. Flag"
                                                        " `write_video_fps` controls FPS. Alternatively, the video extension can be `.mp4`,"
                                                        " resulting in a file with a much smaller size and allowing `--write_video_with_audio`."
                                                        " However, that would require: 1) Ubuntu or Mac system, 2) FFmpeg library installed"
                                                        " (`sudo apt-get install ffmpeg`), 3) the creation temporarily of a folder with the same"
                                                        " file path than the final video (without the extension) to storage the intermediate frames"
                                                        " that will later be used to generate the final MP4 video.");
DEFINE_double(write_video_fps,          -1.,            "Frame rate for the recorded video. By default, it will try to get the input frames producer"
                                                        " frame rate (e.g., input video or webcam frame rate). If the input frames producer does not"
                                                        " have a set FPS (e.g., image_dir or webcam if OpenCV not compiled with its support), set"
                                                        " this value accordingly (e.g., to the frame rate displayed by the OpenPose GUI).");
DEFINE_bool(write_video_with_audio,     false,          "If the input is video and the output is so too, it will save the video with audio. It"
                                                        " requires the output video file path finishing in `.mp4` format (see `write_video` for"
                                                        " details).");
DEFINE_string(write_video_3d,           "",             "Analogous to `--write_video`, but applied to the 3D output.");
DEFINE_string(write_video_adam,         "",             "Experimental, not available yet. Analogous to `--write_video`, but applied to Adam model.");
DEFINE_string(write_json,               "",             "Directory to write OpenPose output in JSON format. It includes body, hand, and face pose"
                                                        " keypoints (2-D and 3-D), as well as pose candidates (if `--part_candidates` enabled).");
DEFINE_string(write_coco_json,          "",             "Full file path to write people pose data with JSON COCO validation format. If foot, face,"
                                                        " hands, etc. JSON is also desired (`--write_coco_json_variants`), they are saved with"
                                                        " different file name suffix.");
DEFINE_int32(write_coco_json_variants,  1,              "Add 1 for body, add 2 for foot, 4 for face, and/or 8 for hands. Use 0 to use all the"
                                                        " possible candidates. E.g., 7 would mean body+foot+face COCO JSON.");
DEFINE_int32(write_coco_json_variant,   0,              "Currently, this option is experimental and only makes effect on car JSON generation. It"
                                                        " selects the COCO variant for cocoJsonSaver.");
DEFINE_string(write_heatmaps,           "",             "Directory to write body pose heatmaps in PNG format. At least 1 `add_heatmaps_X` flag"
                                                        " must be enabled.");
DEFINE_string(write_heatmaps_format,    "png",          "File extension and format for `write_heatmaps`, analogous to `write_images_format`."
                                                        " For lossless compression, recommended `png` for integer `heatmaps_scale` and `float` for"
                                                        " floating values.");
DEFINE_string(write_keypoint,           "",             "(Deprecated, use `write_json`) Directory to write the people pose keypoint data. Set format"
                                                        " with `write_keypoint_format`.");
DEFINE_string(write_keypoint_format,    "yml",          "(Deprecated, use `write_json`) File extension and format for `write_keypoint`: json, xml,"

可以看到有保存相片的,保存骨骼信息的(DEFINE_string(write_json, “”, 在双引号内填写保存路径就好了,使用双斜杠隔开,例如:DEFINE_string(write_json, “C:\Users\jack\Desktop”),不足之处是每张图片都会保存一个json文件,所以磁盘会变得很美丽。

骨骼数据排序

在这里插入图片描述

最后

以上就是合适丝袜为你收集整理的Openpose环境配置的全部内容,希望文章能够帮你解决Openpose环境配置所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(39)

评论列表共有 0 条评论

立即
投稿
返回
顶部