{"id":423,"date":"2023-04-23T22:54:20","date_gmt":"2023-04-23T14:54:20","guid":{"rendered":"http:\/\/61.171.118.62:9999\/?p=423"},"modified":"2023-04-24T13:26:28","modified_gmt":"2023-04-24T05:26:28","slug":"openpose%e7%bc%96%e8%af%91unity3d%e8%81%94%e5%8a%a8","status":"publish","type":"post","link":"https:\/\/lalaland.wlzy.online\/?p=423","title":{"rendered":"OpenPose\u7f16\u8bd1 (\u9644\u5e26PythonAPI)"},"content":{"rendered":"\n<p>\u53c2\u8003\u94fe\u63a5\uff1ahttps:\/\/github.com\/CMU-Perceptual-Computing-Lab\/openpose<\/p>\n\n\n\n<p>\u672c\u6b21\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u4f7f\u7528\u7684\u73af\u5883\u53ca\u8f6f\u4ef6\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Windows 11\nPython 3.7.0  (\u5f88\u5173\u952e\uff0c\u5b9e\u6d4b3.10.6\u751a\u81f33.7.6\u90fd\u4e0d\u884c\uff01)\nCMake 3.25.3\nVisual Studio 2017 community<\/code><\/pre>\n\n\n\n<p>\u9996\u5148\u4e0b\u8f7d\u6e90\u7801\uff0cgit clone https:\/\/github.com\/CMU-Perceptual-Computing-Lab\/openpose.git<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">CMake\u914d\u7f6e\u7f16\u8bd1\u9009\u9879<\/h3>\n\n\n\n<p>\u7136\u540e\u8fdb\u884cCMake\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"791\" height=\"672\" src=\"http:\/\/lalaland.wlzy.online\/wp-content\/uploads\/2023\/04\/image.png\" alt=\"\" class=\"wp-image-430\" srcset=\"https:\/\/lalaland.wlzy.online\/wp-content\/uploads\/2023\/04\/image.png 791w, https:\/\/lalaland.wlzy.online\/wp-content\/uploads\/2023\/04\/image-300x255.png 300w, https:\/\/lalaland.wlzy.online\/wp-content\/uploads\/2023\/04\/image-768x652.png 768w\" sizes=\"auto, (max-width: 791px) 100vw, 791px\" \/><\/figure>\n\n\n\n<p>source code\u586b\u4e0b\u8f7d\u4e0b\u6765\u7684\u6e90\u7801\u76ee\u5f55\uff0cbuild\u76ee\u6807\u4f4d\u7f6e\u5c31\u5728\u90a3\u4e2a\u76ee\u5f55\u4e0b\u9762\u65b0\u5efa\u4e2abuild\u6587\u4ef6\u5939\u3002<br>\u52fe\u4e0aAdcanced\uff0c\u8fd9\u4e2a\u540e\u9762\u6709\u7528\u3002 <\/p>\n\n\n\n<p>\u70b9\u51fb\u5de6\u4e0b\u89d2Configure\uff0c\u4f1a\u8ba9\u4f60\u9009\u7f16\u8bd1\u5de5\u5177\u548c\u5e73\u53f0\uff0cvisual studio\u4f60\u88c5\u4e86\u54ea\u4e2a\u7248\u672c\u5c31\u9009\u54ea\u4e2a\u7248\u672c\uff0c\u5e73\u53f0\u9009x64\uff0c\u7136\u540e\u70b9\u786e\u5b9a\u3002<br>\u4e00\u822c\u6765\u8bf4\u7b2c\u4e00\u6b21\u70b9\u51fb\u4e4b\u540e\u4f1a\u50cf\u4e0b\u9762\u4e00\u6837\u6709\u5f88\u591a\u7ea2\u7684\u6761\u76ee\uff0c\u89c2\u5bdf\u4e0b\u9762\u7684\u8f93\u51fa\u6846\u91cc\u6709\u6ca1\u6709\u7ea2\u8272\u62a5\u9519\uff0c\u6709\u7684\u8bdd\u5bf9\u5e94\u5904\u7406\u4e00\u4e0b\u3002\u4e00\u822c\u6765\u8bf4\u90fd\u662f\u8be5\u4e0b\u8f7d\u7684\u4e1c\u897f\u6ca1\u4e0b\u8f7d\u597d\uff0c\u8fd9\u4e2a\u6b65\u9aa4\u4e2d\u4f1a\u81ea\u52a8\u4e0b\u8f7d\uff0c\u4f46\u53ef\u80fd\u4f1a\u7531\u4e8e\u7f51\u7edc\u539f\u56e0\u5931\u8d25\uff0c\u8fdb\u800c\u5bfc\u81f4\u62a5\u9519\u3002\u5efa\u8bae\u5230\u4ee3\u7801\u76ee\u5f55\u4e0b\u76843rdparty\/windows\/\u4e0b\u53bb\u627e\u7c7b\u4f3cgetCaffe.bat\u8fd9\u6837\u7684\u6587\u4ef6\uff0c\u53cc\u51fb\u53ef\u4ee5\u624b\u52a8\u4e0b\u8f7d\uff0c\u6bd4\u8f83\u7a33\u5b9a\u3002<br>\u8fd8\u6709\u4e00\u4e2a\u5f88\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\u662f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CMake Error at python\/openpose\/CMakeLists.txt:6 (pybind11_add_module):\n  Unknown CMake command \"pybind11_add_module\".<\/code><\/pre>\n\n\n\n<p>\u8fd9\u662f\u7f3a\u4e86pybind11\u8fd9\u4e2a\u9879\u76ee\uff0c\u8fdb\u5165openpose\u4ee3\u7801\u76ee\u5f55\u4e0b\u7684 3rdparty \u6587\u4ef6\u5939\u5185\uff0c\u5728\u8fd9\u91cc\u4f7f\u7528git bash\uff0cgit clone https:\/\/github.com\/pybind\/pybind11.git\uff0c\u4e0b\u8f7d\u5373\u53ef\u3002<\/p>\n\n\n\n<p>\u4e0b\u8f7d\u5b8c\u4e4b\u540e\u518d\u6b21\u70b9\u51fbConfigure\uff0c\u5982\u679c\u8fd8\u6709\u62a5\u9519\u5c31\u7ee7\u7eed\u5904\u7406\u6216\u8005\u4e0b\u8f7d\uff0c\u5982\u679c\u6ca1\u6709\u62a5\u9519\uff0c\u518d\u89c2\u5bdf\u4e0a\u9762\u7684\u6761\u76ee\u6709\u6ca1\u6709\u7ea2\u8272\uff0c\u6709\u7684\u8bdd\u518d\u70b9\u51fb\u4e00\u6b21Configure\u3002<br>\u4e00\u822c\u6765\u8bf4\u5230\u8fd9\u91cc\u5c31\u4e0d\u4f1a\u518d\u6709\u7ea2\u8272\u7684\u6761\u76ee\u4e86\uff0c\u63a5\u4e0b\u6765\u6211\u4eec\u518d\u6761\u76ee\u4e2d\u627e\u5230BUILD_PYTHON\u548cBUILD_UNITY_SUPPORT\u4e24\u4e2a\u9009\u9879\uff0c\u52fe\u4e0a\u3002<\/p>\n\n\n\n<p>\u7136\u540e\u6211\u4eec\u8fd8\u9700\u8981\u52a0\u4e00\u6761\u5b83\u539f\u672c\u6ca1\u6709\u7684\u6761\u76ee\uff0c\u53eb\u505aPYTHON_EXECUTABLE\uff0c\u5c5e\u6027\u4e3aPATH\uff0c\u586b\u5165\u6211\u4eec\u7684python3.7.0\u7684exe\u6587\u4ef6\u8def\u5f84\uff08\u518d\u6b21\u5f3a\u8c03\u7248\u672c\u4e0d\u8981\u641e\u9519\uff09\u3002\u52fe\u4e0a Adcanced\u7684\u4f5c\u7528\u4e5f\u5728\u8fd9\u91cc\uff0c\u4e0d\u52fe\u7684\u8bdd\u4e5f\u80fd\u52a0\u8fdb\u53bb\uff0c\u4f46\u662f\u4f1a\u770b\u4e0d\u89c1\u5b83\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"944\" height=\"322\" src=\"http:\/\/lalaland.wlzy.online\/wp-content\/uploads\/2023\/04\/image-2.png\" alt=\"\" class=\"wp-image-432\" srcset=\"https:\/\/lalaland.wlzy.online\/wp-content\/uploads\/2023\/04\/image-2.png 944w, https:\/\/lalaland.wlzy.online\/wp-content\/uploads\/2023\/04\/image-2-300x102.png 300w, https:\/\/lalaland.wlzy.online\/wp-content\/uploads\/2023\/04\/image-2-768x262.png 768w\" sizes=\"auto, (max-width: 944px) 100vw, 944px\" \/><\/figure>\n\n\n\n<p>\u7136\u540e\u518d\u6b21\u70b9\u51fbConfigure\uff0c\u5982\u679c\u4e00\u6761\u7ea2\u8272\u90fd\u6ca1\u6709\u5c31\u7b97\u662f\u6210\u529f\u4e86\uff0c\u63a5\u4e0b\u6765\u53ef\u4ee5\u70b9\u51fbGenerate\u3002<br>\u70b9\u5b8c\u4e4b\u540e\u70b9\u51fbOpen Project\uff0c\u4f1a\u5728VS\u4e2d\u6253\u5f00\u9879\u76ee\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5f00\u59cb\u7f16\u8bd1<\/h3>\n\n\n\n<p>\u6253\u5f00VS\u4e4b\u540e\u5728\u53f3\u4fa7\u8d44\u6e90\u7ba1\u7406\u5668\u4e2d\u627e\u5230pyopenpose\uff0c\u5c06\u5176\u8bbe\u7f6e\u4e3a\u542f\u52a8\u9879\u76ee\u3002\u7136\u540e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>1 \u9009\u62e9Relese\u914d\u7f6e\n2 \u5728\u53f3\u4fa7\u8d44\u6e90\u7ba1\u7406\u5668\u4e2d\u627e\u5230pyopenpose\n3 \u53f3\u952epyopenpose\uff0c\u70b9\u51fb\u8bbe\u4e3a\u542f\u52a8\u9879\u76ee\n4 \u53f3\u952epyopenpose\uff0c\u70b9\u51fb\u751f\u6210<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"744\" src=\"http:\/\/lalaland.wlzy.online\/wp-content\/uploads\/2023\/04\/image-6-1024x744.png\" alt=\"\" class=\"wp-image-436\" srcset=\"https:\/\/lalaland.wlzy.online\/wp-content\/uploads\/2023\/04\/image-6-1024x744.png 1024w, https:\/\/lalaland.wlzy.online\/wp-content\/uploads\/2023\/04\/image-6-300x218.png 300w, https:\/\/lalaland.wlzy.online\/wp-content\/uploads\/2023\/04\/image-6-768x558.png 768w, https:\/\/lalaland.wlzy.online\/wp-content\/uploads\/2023\/04\/image-6.png 1261w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u7b49\u5f85\u51e0\u5206\u949f\u540e\uff0c\u5982\u679c\u51fa\u73b0\u7c7b\u4f3c\u5982\u4e0b\u7ed3\u679c\uff0c\u5c31\u662f\u6210\u529f\u4e86\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>========== \u751f\u6210: \u6210\u529f 2 \u4e2a\uff0c\u5931\u8d25 0 \u4e2a\uff0c\u6700\u65b0 0 \u4e2a\uff0c\u8df3\u8fc7 0 \u4e2a ==========<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u6d4b\u8bd5\u7f16\u8bd1\u7ed3\u679c<\/h3>\n\n\n\n<p>\u6253\u5f00\u4ee3\u7801\u6839\u76ee\u5f55\u4e0b\u7684build\\examples\\tutorial_api_python\u76ee\u5f55\uff0c\u8fd0\u884c01_body_from_image.py<br>\u6ca1\u6709\u62a5\u9519\u7684\u8bdd\u5c31\u4f1a\u51fa\u73b0\u5982\u4e0b\u7ed3\u679c\u5566<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"634\" height=\"504\" src=\"http:\/\/lalaland.wlzy.online\/wp-content\/uploads\/2023\/04\/image-7.png\" alt=\"\" class=\"wp-image-437\" srcset=\"https:\/\/lalaland.wlzy.online\/wp-content\/uploads\/2023\/04\/image-7.png 634w, https:\/\/lalaland.wlzy.online\/wp-content\/uploads\/2023\/04\/image-7-300x238.png 300w\" sizes=\"auto, (max-width: 634px) 100vw, 634px\" \/><\/figure>\n\n\n\n<p>\u5982\u679c\u51fa\u73b0\u627e\u4e0d\u5230pyopenpose\u5305\u7684\u62a5\u9519\uff0c\u5927\u6982\u7387\u5c31\u662f\u6ca1\u7f16\u8bd1\u597d\uff0c\u8bf7\u4ed4\u7ec6\u518d\u8bfb\u4e00\u904d\u4e0a\u9762\u7684\u6587\u7ae0\u3002\u4e00\u822c\u6765\u8bf4\u4f1a\u6709\u8fd9\u51e0\u4e2a\u53ef\u80fd\u72af\u7684\u9519\u8bef\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>1 \u7f16\u8bd1\u7528\u7684python\u7248\u672c\u4e0d\u662f3.7.0\n2 CMake\u8fc7\u7a0b\u4e2d\u6ca1\u6709\u52fe\u4e0aBUILD_PYTHON\n3 CMake\u8fc7\u7a0b\u4e2d\u6ca1\u6709\u914d\u7f6ePYTHON_EXECUTABLE\u6216\u8005\u662f\u914d\u7f6e\u9519\u8bef\uff08\u8def\u5f84\u8981\u5199\u5230python.exe\u4e3a\u6b62\uff09\n4 \u5728VS\u91cc\u7f16\u8bd1\u7684\u65f6\u5019\u6ca1\u6709\u9009Release\n5 \u5728VS\u91cc\u7f16\u8bd1\u7684\u65f6\u5019\u6ca1\u6709\u5728\u53f3\u8fb9\u9009\u4e2dpyopenpose\n6 \u7f16\u8bd1\u6210\u529f\u4e86\uff0c\u4f46\u662f\u8fd0\u884c\u7684\u65f6\u5019\u6ca1\u6709\u7528python3.7\u8fd0\u884c\u800c\u662f\u4f7f\u7528\u4e86\u5176\u4ed6\u7248\u672c<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u8003\u94fe\u63a5\uff1ahttps:\/\/github.com\/CMU-Perceptual-Computing-Lab\/op&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[26,1,27],"tags":[],"class_list":["post-423","post","type-post","status-publish","format-standard","hentry","category-unity3d","category-tech","category-27"],"_links":{"self":[{"href":"https:\/\/lalaland.wlzy.online\/index.php?rest_route=\/wp\/v2\/posts\/423","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lalaland.wlzy.online\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lalaland.wlzy.online\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lalaland.wlzy.online\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lalaland.wlzy.online\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=423"}],"version-history":[{"count":10,"href":"https:\/\/lalaland.wlzy.online\/index.php?rest_route=\/wp\/v2\/posts\/423\/revisions"}],"predecessor-version":[{"id":505,"href":"https:\/\/lalaland.wlzy.online\/index.php?rest_route=\/wp\/v2\/posts\/423\/revisions\/505"}],"wp:attachment":[{"href":"https:\/\/lalaland.wlzy.online\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lalaland.wlzy.online\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lalaland.wlzy.online\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}