PoseCamera
PoseCamera is python based SDK for multi human pose estimation through RGB webcam.
Install
install posecamera package through pip
pip install posecamera
If you are having issues with the installation on Windows OS then check this page
Usage
See Google colab notebook https://colab.research.google.com/drive/18uoYeKmliOFV8dTdOrXocClCA7nTwRcX?usp=sharing
draw pose keypoints on image
import posecamera
import cv2
det = posecamera.pose_tracker.PoseTracker()
image = cv2.imread("example.jpg")
pose = det(image)
for name, (y, x, score) in pose.keypoints.items():
cv2.circle(image, (int(x), int(y)), 4, (255, 0, 0), -1)
cv2.imshow("PoseCamera", image)
cv2.waitKey(0)
output of the above example
or get keypoints array
for pose in poses:
keypoints = pose.keypoints
Handtracker
import posecamera
import cv2
det = posecamera.hand_tracker.HandTracker()
image = cv2.imread("tmp/hands.jpg")
keypoints, bbox = det(image)
for hand_keypoints in keypoints:
for (x, y) in hand_keypoints:
cv2.circle(image, (int(x), int(y)), 3, (255, 0, 0), -1)
cv2.imshow("PoseCamera - Hand Tracking", image)
cv2.waitKey(0)
Using Docker
The official docker image is hosted on Docker Hub. The very first step is to install the docker docker on your system.
Also note that your Nvidia driver Needs to be compatible with CUDA10.2.
Doing inference on live webcam feed.
xhost +; docker run --name posecamera --rm --net=host --gpus all -e DISPLAY=$DISPLAY --device=/dev/video0:/dev/video0 wondertree/posecamera --video=0
GPU & Webcam support (if running docker) is not available on Windows Operating System.
To run inference on images use the following command.
docker run --name posecamera --rm --net=host -e DISPLAY=$DISPLAY wondertree/posecamera --images ./tmp/female_pose.jpg --cpu
For more details read our Docs
The base of this repository is based on the following research paper.
@inproceedings{osokin2018lightweight_openpose,
author={Osokin, Daniil},
title={Real-time 2D Multi-Person Pose Estimation on CPU: Lightweight OpenPose},
booktitle = {arXiv preprint arXiv:1811.12004},
year = {2018}
}
Share your thoughts
Join our Discussion Channel! We love to hear your ideas, suggestions or pull request
Metadata
Release files for posecamera 2.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| posecamera-2.1.2.tar.gz | 10.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| posecamera-2.1.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 25.4 kB
Release files / posecamera-2.1.2.tar.gz
| Download URL | posecamera-2.1.2.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
078679abe8bbc608fd9e859f199231172c842cd7a0757e32ea0d89b5675fe842
|
|
BLAKE2b-256 checksum How to use checksums |
de12070cbedef071c20c61248e0919c73c7a9ea4dbe4ad1f1b8bdec198a2146d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.7
|
Release files / posecamera-2.1.2-py2.py3-none-any.whl
| Download URL | posecamera-2.1.2-py2.py3-none-any.whl |
|---|---|
| Size | 14.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
ebae1ebc5ff2cb7ff7b368fcabc78491266057f0d66190757ae2eee1504f3f45
|
|
BLAKE2b-256 checksum How to use checksums |
883f71c2921bc98e6b63fb238a18816bda92144b75d8a6793f09a62f63ca417f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.7
|