https://github.com/Wyverns010/Body-Keypoints-Detection.git
quanhua92/human-pose-estimation-opencv
Perform Human Pose Estimation in OpenCV Using OpenPose MobileNet
- Test with image
python keypoints_detector.py
Things to Note:
- All images that being processed by the code are in
imagesfolder - The keypoints for all the iamgesw processed are stored in
keypoints.csvfile
- Test with webcam
python openpose.py
- Test with image
python openpose.py --input image.jpg
- Use
--thrto increase confidence threshold
python openpose.py --input image.jpg --thr 0.5
- I modified the OpenCV DNN Example to use the
Tensorflow MobileNet Model, which is provided by ildoonet/tf-pose-estimation, instead ofCaffe Modelfrom CMU OpenPose. The originalopenpose.pyfromOpenCV exampleonly usesCaffe Modelwhich is more than 200MB while theMobilenetis only 7MB. - Basically, we need to change the
cv.dnn.blobFromImageand useout = out[:, :19, :, :]to get only the first 19 rows in theoutvariable.