What is AlphaPose? (Https://github.com/MVIG-SJTU/AlphaPose)
It is a deep learning tool ** that estimates the postures of multiple ** people in an image or video. There are many deep learning tools other than AlphaPose that can estimate the posture of a person. Among them, the difference from the most major OpenPose is ・ Realtime will do ** Pose Tracking **. ・ A type of Human Pose Optimization, AP is superior to ** OpenPose. ** ** ・ ** Top-down approach **. I understand that. This time I wanted to implement Pose estimation and Tracking, so I chose AlphaPose.
ubuntu16.04 ROS version kinetic That is the place. The rest is an environment where AlphaPose works.
AlphaPose publishes api script, but compared to my request ・ ** Since it is an API that supports images, it does not support videos. ** ** ・ ** No tracking implementation. ** There was no such thing, so I added it. Code here (Alphapose_ros.py) It's not optimized because it feels like it should work.
Kinetic is python2 by default, so it supports Python3. .. .. (I want to make it ROS2 or noetic soon ...) So, when making a node with ROS, I referred to here and made it work with Python3 in the disguise environment created with AlphaPose.
When I brought the image from the webcam, I tried to make it topic using cv_brige from python3, but apparently it is necessary to rebuild cv_brige to support python3 system, and in the disguise environment it is with other libraries Coexistence did not work. Refer to here After a lot of research, I found that CompressedImage is compatible with python3, so I used this to receive image topics from webcam in python3. Refer to here
Since it is pkg, put it directly under src.
catkin_ws/src/ $ git clone https://github.com/yone-moto/AlphaPose_ros.git
catkin_ws/ $ catkin_make
######Ready / executed######
catkin_ws/src/ $ roslaunch alphapose_ros alphapose_demo.launch
(alphapose) (path to)AlphaPose_ros/scripts/$./alphapose.sh
** Poseestimation (visualized with Rviz) **
There is only one video and tracking cannot be shown. .. .. It is intentional that only the right half is painted, and the left half is also output.
I really wanted to show tracking, so I calculated the speed vector (direction of travel of the person) in combination with the rider.
Like this
that's all. Thank you for watching until the end. ** I would like to continue to add or modify this article and code! !! !! !! And I want to be more useful in the world. ** **