<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[在小强上使用body_pose进行人体识别]]></title><description><![CDATA[<p dir="auto"><a href="https://github.com/BluewhaleRobot/body_pose" target="_blank" rel="noopener noreferrer">body_pose</a> 是一个人体姿态识别的软件包。这个软件包可以从图片中识别出人体的耳朵，眼睛，鼻子，四肢的共17个特征点。其实现是通过深度学习网络利用tensorflow框架。此软件还支持多人同时识别。</p>
<p dir="auto"><img src="/assets/uploads/files/1530878219879-6f71b239-27ae-453a-94d9-94de429c8c84-image-resized.png" alt="0_1530878202843_6f71b239-27ae-453a-94d9-94de429c8c84-image.png" class=" img-responsive img-markdown" /></p>
<h3>安装</h3>
<ol>
<li>安装tensorflow<br />
由于小强上面没有Nvidia显卡, 所以我们安装CPU版本的Tensorflow。小强的CPU支持一些高效的指令集，默认的Tensorflow为了能够在更多平台上运行，没有使用这些指令集。所以性能实际上没有发挥到最高。我们可以安装开启了这些优化指令的版本。</li>
</ol>
<pre><code class="language-bash">sudo pip install --ignore-installed --upgrade "https://github.com/lakshayg/tensorflow-build/raw/master/tensorflow-1.4.0-cp27-cp27mu-linux_x86_64.whl"
</code></pre>
<ol start="2">
<li>安装软件包相关依赖</li>
</ol>
<pre><code class="language-bash">sudo pip install scipy scikit-image matplotlib pyyaml easydict cython munkres==1.0.12
</code></pre>
<ol start="3">
<li>下载相关模型</li>
</ol>
<pre><code># 单人模型
cd src/models/mpii
./download_models.sh
$ cd -
# 多人模型

./compile.sh
cd models/coco
./download_models.sh
cd -
</code></pre>
<h3>运行</h3>
<ol>
<li>运行单人识别测试程序</li>
</ol>
<pre><code class="language-bash"># 在src文件夹内运行
TF_CUDNN_USE_AUTOTUNE=0 python demo/singleperson.py
</code></pre>
<p dir="auto">运行成功后可以看到下图</p>
<p dir="auto"><img src="/assets/uploads/files/1530879564082-94996fd8-2ca8-418f-ac9f-11da6221380a-image-resized.png" alt="0_1530879542859_94996fd8-2ca8-418f-ac9f-11da6221380a-image.png" class=" img-responsive img-markdown" /></p>
<ol start="2">
<li>运行多人识别的例子</li>
</ol>
<pre><code class="language-bash">TF_CUDNN_USE_AUTOTUNE=0 python demo/demo_multiperson.py
</code></pre>
<p dir="auto">成功运行后显示下面的图像</p>
<p dir="auto"><img src="/assets/uploads/files/1530879880168-158a04a4-defc-498a-87e3-fdae8ee9ab41-image-resized.png" alt="0_1530879857466_158a04a4-defc-498a-87e3-fdae8ee9ab41-image.png" class=" img-responsive img-markdown" /></p>
<ol start="3">
<li>运行ROS服务</li>
</ol>
<pre><code class="language-bash">roslaunch body_pose body_pose_test.launch
</code></pre>
<p dir="auto">这个launch文件在小强上可以直接运行。但是如果不是在小强上你需要把usb_cam的节点换成自己的摄像头节点。<br />
服务启动成功后会自动的识别摄像头中的图像。处理的结果会显示在 <code>/body_pose_tester/processed_image</code> topic 里面。可以利用摄像头显示处理结果。</p>
<pre><code>rosrun image_view image_view image:=/body_pose_tester/processed_image
</code></pre>
<p dir="auto">可以看到图中标了一些圆圈。这些都是被识别出的人体特征位置。</p>
<p dir="auto"><img src="/assets/uploads/files/1530880392561-qq%E5%9B%BE%E7%89%8720180706203240-resized.jpg" alt="0_1530880373290_QQ图片20180706203240.jpg" class=" img-responsive img-markdown" /></p>
<h3>在自己的程序中使用此服务</h3>
<p dir="auto">可以在自己的launch文件中添加这样的内容来启动节点</p>
<pre><code class="language-xml">&lt;node name="body_pose" pkg="body_pose" type="body_pose_node.py"&gt;
    &lt;param name="process_width" value="200" /&gt;
    &lt;param name="process_height" value="150" /&gt;
    &lt;param name="conf_min_count" value="3" /&gt;
&lt;/node&gt;
</code></pre>
<p dir="auto">参数说明<br />
process_width 内部处理宽度，process_height内部处理高度。可能采集的图片很大，这样处理起来非常费时间。可以通过这两个参数对图片进行压缩以提高处理速度。<br />
conf_min_count最小可接受点数。如果在一个人上识别出的特征点小于这个值，则认为这个识别对象并不是人。</p>
<p dir="auto">发布的服务<br />
服务默认发布在 <code>~get_body_pose</code>可以类型为<a href="https://github.com/BluewhaleRobot/body_pose/blob/master/srv/BodyPose.srv" target="_blank" rel="noopener noreferrer">BodyPose.srv</a>。</p>
<p dir="auto">详细的使用方法可以参照 <a href="https://github.com/BluewhaleRobot/body_pose/blob/master/src/body_pose_test_node.py" target="_blank" rel="noopener noreferrer">body_pose_test_node.py </a>文件。</p>
]]></description><link>http://community.bwbot.org/topic/497/在小强上使用body_pose进行人体识别</link><generator>RSS for Node</generator><lastBuildDate>Fri, 16 Oct 2026 08:28:29 GMT</lastBuildDate><atom:link href="http://community.bwbot.org/topic/497.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 06 Jul 2018 12:42:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 在小强上使用body_pose进行人体识别 on Tue, 27 Apr 2021 00:37:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.bwbot.org/uid/1325">@yellow</a> launch文件内的图像话题要改成kinect的图像话题</p>
]]></description><link>http://community.bwbot.org/post/16599</link><guid isPermaLink="true">http://community.bwbot.org/post/16599</guid><dc:creator><![CDATA[weijiz]]></dc:creator><pubDate>Tue, 27 Apr 2021 00:37:54 GMT</pubDate></item><item><title><![CDATA[Reply to 在小强上使用body_pose进行人体识别 on Tue, 27 Apr 2021 00:25:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.bwbot.org/uid/1221">@marcos452</a> 你好 请问你解决了这个问题吗 我也遇到了此问题</p>
]]></description><link>http://community.bwbot.org/post/16598</link><guid isPermaLink="true">http://community.bwbot.org/post/16598</guid><dc:creator><![CDATA[yellow]]></dc:creator><pubDate>Tue, 27 Apr 2021 00:25:16 GMT</pubDate></item><item><title><![CDATA[Reply to 在小强上使用body_pose进行人体识别 on Mon, 16 Nov 2020 10:01:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.bwbot.org/uid/7">@weijiz</a> 您好，我roslaunch body_pose body_pose_test.launch后<br />
出现如下情况<br />
[WARN] [1605520393.882227]: Cannot get image from ~image<br />
[WARN] [1605520394.884241]: Cannot get image from ~image<br />
但是我点击鼠标右键会出现以下命令<br />
[ INFO] [1605520396.100524512]: Saved image frame0004.jpg<br />
然后我就使用rosrun image_view image_view image:=/body_pose_tester/processed_image<br />
发现摄像头就消失了，也没有发现出现被识别出的人体特征位置的照片<br />
您能否为解答一下吗？<br />
我注释这句话&lt;include file=“$(find xiaoqiang_tts)/launch/tts_xunfei.launch” /–&gt;</p>
]]></description><link>http://community.bwbot.org/post/4014</link><guid isPermaLink="true">http://community.bwbot.org/post/4014</guid><dc:creator><![CDATA[marcos452]]></dc:creator><pubDate>Mon, 16 Nov 2020 10:01:20 GMT</pubDate></item><item><title><![CDATA[Reply to 在小强上使用body_pose进行人体识别 on Mon, 09 Nov 2020 05:31:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.bwbot.org/uid/1206">@moist</a> 可能你的模型没有下载完整</p>
]]></description><link>http://community.bwbot.org/post/4002</link><guid isPermaLink="true">http://community.bwbot.org/post/4002</guid><dc:creator><![CDATA[weijiz]]></dc:creator><pubDate>Mon, 09 Nov 2020 05:31:43 GMT</pubDate></item><item><title><![CDATA[Reply to 在小强上使用body_pose进行人体识别 on Mon, 09 Nov 2020 02:37:31 GMT]]></title><description><![CDATA[<p dir="auto">执行单人姿态识别成功，没有报错。<br />
执行多人姿态识别时候报错如下<br />
Traceback (most recent call last):<br />
File “demo/demo_multiperson.py”, line 17, in <br />
from multiperson.detections import extract_detections<br />
File “demo/…/multiperson/detections.py”, line 10, in <br />
from nms_grid import nms_grid<br />
ImportError: No module named nms_grid</p>
<p dir="auto">ROS执行报错如下，好像是同名节点的问题：<br />
[camera_node-5] process has died [pid 31196, exit code 1, cmd /home/xiaoqiang/Documents/ros/devel/lib/usb_cam/usb_cam_node __name:=camera_node __log:=/home/xiaoqiang/.ros/log/b7b359c8-2222-11eb-ae28-cfd9b2d8c1b5/camera_node-5.log].<br />
log file: /home/xiaoqiang/.ros/log/b7b359c8-2222-11eb-ae28-cfd9b2d8c1b5/camera_node-5*.log<br />
shutdown request: new node registered with same name<br />
有懂的朋友麻烦解释一下，感谢。</p>
]]></description><link>http://community.bwbot.org/post/4001</link><guid isPermaLink="true">http://community.bwbot.org/post/4001</guid><dc:creator><![CDATA[moist]]></dc:creator><pubDate>Mon, 09 Nov 2020 02:37:31 GMT</pubDate></item><item><title><![CDATA[Reply to 在小强上使用body_pose进行人体识别 on Mon, 04 Nov 2019 02:06:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.bwbot.org/uid/1003">@lm213</a> 这个包是由<a href="https://github.com/eldar/pose-tensorflow" target="_blank" rel="noopener noreferrer">这里</a>改出来的，说明里面有算法的论文。具体的我也没看，不太清楚</p>
]]></description><link>http://community.bwbot.org/post/1527</link><guid isPermaLink="true">http://community.bwbot.org/post/1527</guid><dc:creator><![CDATA[weijiz]]></dc:creator><pubDate>Mon, 04 Nov 2019 02:06:17 GMT</pubDate></item><item><title><![CDATA[Reply to 在小强上使用body_pose进行人体识别 on Sun, 03 Nov 2019 15:48:10 GMT]]></title><description><![CDATA[<p dir="auto">这个姿态识别包用的什么算法啊？大概实现的原理能说一下吗？</p>
]]></description><link>http://community.bwbot.org/post/1526</link><guid isPermaLink="true">http://community.bwbot.org/post/1526</guid><dc:creator><![CDATA[lm213]]></dc:creator><pubDate>Sun, 03 Nov 2019 15:48:10 GMT</pubDate></item><item><title><![CDATA[Reply to 在小强上使用body_pose进行人体识别 on Mon, 11 Mar 2019 05:54:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.bwbot.org/uid/814">@robot0612</a> 里面的一个依赖库新版本不支持python2.7了。需要下载旧版本</p>
<pre><code class="language-bash">pip install munkres==1.0.12
</code></pre>
]]></description><link>http://community.bwbot.org/post/1130</link><guid isPermaLink="true">http://community.bwbot.org/post/1130</guid><dc:creator><![CDATA[weijiz]]></dc:creator><pubDate>Mon, 11 Mar 2019 05:54:41 GMT</pubDate></item><item><title><![CDATA[Reply to 在小强上使用body_pose进行人体识别 on Mon, 11 Mar 2019 05:50:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.bwbot.org/uid/814">@robot0612</a> 感觉你的python环境可能有问题，错误的代码语法是python3的，但是却出现在python2.7的路径里面</p>
]]></description><link>http://community.bwbot.org/post/1129</link><guid isPermaLink="true">http://community.bwbot.org/post/1129</guid><dc:creator><![CDATA[weijiz]]></dc:creator><pubDate>Mon, 11 Mar 2019 05:50:03 GMT</pubDate></item><item><title><![CDATA[Reply to 在小强上使用body_pose进行人体识别 on Mon, 11 Mar 2019 05:33:23 GMT]]></title><description><![CDATA[<p dir="auto">模型重新下载了。运行还是出现这个问题：<img src="/assets/uploads/files/1552282326937-cf613e6b-fe38-4e6b-827b-cabd6695ba4c-image.png" alt="cf613e6b-fe38-4e6b-827b-cabd6695ba4c-image.png" class=" img-responsive img-markdown" width="1128" height="394" /></p>
]]></description><link>http://community.bwbot.org/post/1125</link><guid isPermaLink="true">http://community.bwbot.org/post/1125</guid><dc:creator><![CDATA[robot0612]]></dc:creator><pubDate>Mon, 11 Mar 2019 05:33:23 GMT</pubDate></item><item><title><![CDATA[Reply to 在小强上使用body_pose进行人体识别 on Mon, 11 Mar 2019 00:43:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.bwbot.org/uid/814">@robot0612</a> 是不是模型没有下载完整，重新执行下载模型的指令试试</p>
]]></description><link>http://community.bwbot.org/post/1122</link><guid isPermaLink="true">http://community.bwbot.org/post/1122</guid><dc:creator><![CDATA[weijiz]]></dc:creator><pubDate>Mon, 11 Mar 2019 00:43:20 GMT</pubDate></item><item><title><![CDATA[Reply to 在小强上使用body_pose进行人体识别 on Sat, 09 Mar 2019 16:16:56 GMT]]></title><description><![CDATA[<p dir="auto">运行TF_CUDNN_USE_AUTOTUNE=0 python demo/demo_multiperson.py时出现<br />
<img src="/assets/uploads/files/1552148215227-e4dbeb85-4586-4914-973e-a1cb899952c7-image.png" alt="e4dbeb85-4586-4914-973e-a1cb899952c7-image.png" class=" img-responsive img-markdown" width="968" height="109" /></p>
]]></description><link>http://community.bwbot.org/post/1121</link><guid isPermaLink="true">http://community.bwbot.org/post/1121</guid><dc:creator><![CDATA[robot0612]]></dc:creator><pubDate>Sat, 09 Mar 2019 16:16:56 GMT</pubDate></item><item><title><![CDATA[Reply to 在小强上使用body_pose进行人体识别 on Sat, 09 Mar 2019 16:15:22 GMT]]></title><description><![CDATA[<p dir="auto">配置运行roslaunch body_pose body_pose_test.launch出现<br />
<img src="/assets/uploads/files/1552148119862-082d6687-09fe-4421-9990-730fe8e1e5c0-image.png" alt="082d6687-09fe-4421-9990-730fe8e1e5c0-image.png" class=" img-responsive img-markdown" width="1034" height="164" /></p>
]]></description><link>http://community.bwbot.org/post/1120</link><guid isPermaLink="true">http://community.bwbot.org/post/1120</guid><dc:creator><![CDATA[robot0612]]></dc:creator><pubDate>Sat, 09 Mar 2019 16:15:22 GMT</pubDate></item></channel></rss>