Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hand pose estimation #2601

Merged
merged 35 commits into from
Sep 7, 2021
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f481a19
[jsk_recognition_msgs]Add hand_pose msgs
W567 May 16, 2021
cc56f01
[jsk_perception]Add hand_pose_estimation_2d.py
W567 May 16, 2021
88ef18f
[jsk_recognition_msgs/HandPose.msg]Add scores
W567 May 22, 2021
36636e4
[jsk_perception/hand_pose_estimation_2d.py]Add scoring functionality
W567 May 22, 2021
a682168
[jsk_perception]Add sample launch file for hand_pose_estimation_2d
W567 May 22, 2021
67d864c
[jsk_perception]Add documentation for hand_pose_estimation_2d
W567 May 23, 2021
74d487f
[jsk_perception/hand_pose_estimation_2d.py]Import print_function
W567 May 23, 2021
4b9eb3a
[jsk_perception]Add test file for hand_pose_estimation_2d
W567 May 23, 2021
4a362ba
[jsk_perception/hand_pose_estimation_2d.py]Fix SyntaxError
W567 May 24, 2021
e05ce5e
move srhandnet.png images
knorth55 May 24, 2021
eb23c66
fix typo in hand_pose_estimation_2d.rst
knorth55 May 24, 2021
f1f9195
add sample hand_pose_estimation_2d.bag
knorth55 May 24, 2021
28f8fc5
add SRHandNet.pts in install_trained_data.py
knorth55 May 24, 2021
f100266
use image_view
knorth55 May 24, 2021
9ed5e9c
fix format of hand_pose_estimation_2d.py doc
knorth55 May 24, 2021
f5ae469
refactor hand_pose_estimation_2d.py
knorth55 May 24, 2021
4534f21
add self.bridge
knorth55 May 24, 2021
4f4f2b9
[jsk_perception/sample_hand_pose_estimation_2d.launch]Change input_image
W567 May 25, 2021
d70f5aa
[jsk_perception/hand_pose_estimation_2d.py]Change image encoding format
W567 May 25, 2021
4acf540
[jsk_perception]Change sample image for hand_pose_estimation(srhandnet)
W567 May 25, 2021
65ea296
update install_sample_data.py
knorth55 May 25, 2021
96ca313
load model file only when model_file is not set
knorth55 May 25, 2021
5274674
change topic name
knorth55 May 25, 2021
5e154ac
update hand_pose_estimation_2d doc
knorth55 May 25, 2021
8994533
change topic name
knorth55 May 25, 2021
093b4d9
use future division
knorth55 May 25, 2021
5ac603f
refactor
knorth55 May 25, 2021
ea6ea52
add hand_pose_estimation_2d.launch
knorth55 May 25, 2021
5eb1c0c
Merge branch 'master' into add-hand-pose-estimation
knorth55 Jul 8, 2021
4261c7e
add use_usb_cam arg in sample_hand_pose_estimation_2d.launch
knorth55 Jul 9, 2021
05c5e9a
change warning to torch>1.1.0
knorth55 Jul 9, 2021
1e7a729
run usb_cam in sample_hand_pose_estimation_2d.launch
knorth55 Jul 9, 2021
75603a7
Show warning when you set gpu>=0 but torch.cuda.is_available() is False
k-okada Jul 11, 2021
084b247
Merge pull request #1 from k-okada/add-hand-pose-estimation2
W567 Jul 11, 2021
be4f38c
Merge branch 'master' into add-hand-pose-estimation
k-okada Jul 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
88 changes: 88 additions & 0 deletions doc/jsk_perception/nodes/hand_pose_estimation_2d.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
hand_pose_estimation_2d.py
==========================


What is this?
-------------

.. image:: ./images/srhandnet.png

Estimate hand pose in 2d.
Please refer to `original paper <https://www.yangangwang.com/papers/WANG-SRH-2019-07.html>`_.

In order to use this feature, you need to install `pytorch <https://pytorch.org/get-started/locally/>`_ (pytorch >= 1.4.0 is recommended).


Subscribing Topic
-----------------

* ``~input`` (``sensor_msgs/Image``)

Input image.


Publishing Topic
----------------

* ``~output/pose`` (``jsk_recognition_msgs/HandPoseArray``)

Detected hand keypoints 2D positions and scores in image.

* ``~output/vis`` (``sensor_msgs/Image``)

Visualization image of detected hand poses.


Parameters
----------

* ``~gpu`` (Int, Default: ``-1``)

GPU id. ``-1`` represents CPU mode.

* ``~thre1`` (Float, Default: ``0.3``)

Threshold of hand bounding box heatmap value.

* ``~thre2`` (Float, Default: ``0.2``)

Threshold of hand keypoint heatmap value.

* ``~thre3`` (Int, Default: ``5``)

Threshold of undetected keypoints quantity.

* ``~visualize`` (Bool, Default: ``True``)

If ``~visualize`` is true, draw estimated hand keypoints.

* ``~model_file`` (String, Required)

Trained `SRHandNet model file <https://www.yangangwang.com/papers/WANG-SRH-2019-07.html>`_.


Example
-------

.. code-block:: bash

roslaunch jsk_perception sample_hand_pose_estimation_2d.launch gpu:=0


Reference
---------

::

@article{Wang:2019:SRH,
doi = {10.1109/TIP.2019.2955280},
title = {SRHandNet: Real-time 2D Hand Pose Estimation with Simultaneous Region Localization},
journal = {IEEE Transactions on Image Processing},
author = {Yangang Wang, Baowen Zhang and Cong Peng},
number = 1,
month = Oct.,
volume = 29,
year = 2019,
pages = {2977 - 2986},
url = {http://yangangwang.com/papers/WANG-SRH-2019-07.html},
}
Binary file added doc/jsk_perception/nodes/images/srhandnet.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions jsk_perception/launch/hand_pose_estimation_2d.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<launch>

<arg name="gui" default="true" />
<arg name="gpu" default="-1" />
<arg name="INPUT_IMAGE" default="/usb_cam/image_raw" />

<node name="hand_pose_estimation_2d"
pkg="jsk_perception" type="hand_pose_estimation_2d.py"
output="screen">
<remap from="~input" to="$(arg INPUT_IMAGE)" />
<rosparam subst_value="true">
gpu: $(arg gpu)
model_file: $(find jsk_perception)/trained_data/SRHandNet.pts
</rosparam>
</node>

<group if="$(arg gui)" >
<node name="$(anon image_view)" pkg="image_view" type="image_view"
args="image:=/hand_pose_estimation_2d/output/vis">
</node>
</group>

</launch>