https://github.com/quanhua92/human-pose-estimation-opencv
Perform Human Pose Estimation in OpenCV Using OpenPose MobileNet
https://github.com/quanhua92/human-pose-estimation-opencv
computer-vision humanpose opencv openpose pose-estimation tensorflow
Last synced: 17 days ago
JSON representation
Perform Human Pose Estimation in OpenCV Using OpenPose MobileNet
- Host: GitHub
- URL: https://github.com/quanhua92/human-pose-estimation-opencv
- Owner: quanhua92
- License: apache-2.0
- Created: 2018-06-15T10:16:26.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-15T10:38:10.000Z (almost 7 years ago)
- Last Synced: 2025-03-31T18:18:26.495Z (24 days ago)
- Topics: computer-vision, humanpose, opencv, openpose, pose-estimation, tensorflow
- Language: Python
- Size: 6.8 MB
- Stars: 366
- Watchers: 10
- Forks: 149
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# human-pose-estimation-opencv
Perform Human Pose Estimation in OpenCV Using OpenPose MobileNet
# How to use
- Test with webcam
```
python openpose.py
```- Test with image
```
python openpose.py --input image.jpg
```- Use `--thr` to increase confidence threshold
```
python openpose.py --input image.jpg --thr 0.5
```# Notes:
- I modified the [OpenCV DNN Example](https://github.com/opencv/opencv/blob/master/samples/dnn/openpose.py) to use the `Tensorflow MobileNet Model`, which is provided by [ildoonet/tf-pose-estimation](https://github.com/ildoonet/tf-pose-estimation/tree/master/models/graph/mobilenet_thin), instead of `Caffe Model` from CMU OpenPose. The original `openpose.py` from `OpenCV example` only uses `Caffe Model` which is more than 200MB while the `Mobilenet` is only 7MB.
- Basically, we need to change the `cv.dnn.blobFromImage` and use `out = out[:, :19, :, :]` to get only the first 19 rows in the `out` variable.