PoseCamera is python based SDK for human pose estimation through RGB webcam.

Overview

PoseCamera

PyPI version PoseCamera Actions Status CodeFactor

PoseCamera is python based SDK for 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/1pzsgxaz1ZVesh_j-96PBak_OQKP19HHA?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}
}

The base of hand tracking is based on the following repository : https://google.github.io/mediapipe/solutions/hands

Share your thoughts

Join our Discussion Channel! We love to hear your ideas, suggestions or pull request

Comments
  • Fetching Realtime buffer data

    Fetching Realtime buffer data

    Hi,

    Thank you for this lovely SDK. I am trying to explore this library. My intension is to calculate the movement of individuals using pose estimation.

    How can I implement PoseCamera on video/webcam data in realtime? And get the estimation value in a small buffer data (maybe of 4 secs ) to further process it, to find the movement in each individual. I am trying to use google colab for it. Any example notebook?

    Regards, Suti

    opened by SutirthaChakraborty 6
  • module 'posecamera' has no attribute 'load'

    module 'posecamera' has no attribute 'load'

    Hi ,

    Thank you for PoseCamera!

    I installed it on my Linux machine and trying to run it on the Jupyter notebook. But I get at the below error:

    ---------------------------------------------------------------------------
    AttributeError                            Traceback (most recent call last)
          4 # !wget https://storage.googleapis.com/wt_storage/lightweight_pose_estimation.pth
          5 
    ----> 6 posecamera.load("lightweight_pose_estimation.pth")
          7 
          8 image = cv2.imread("3.jpeg")
    
    **AttributeError: module 'posecamera' has no attribute 'load'**
    
    
    opened by senemaktas 5
  • xcb problems

    xcb problems

    On Linux with nvidia-docker2

    fabien@fabien-CORSAIR-ONE-i160:~$ xhost +; docker run --name posecamera --rm --gpus all -e DISPLAY=$DISPLAY --device=/dev/video0:/dev/video0 wondertree/posecamera --video=0
    access control disabled, clients can connect from any host
    qt.qpa.xcb: could not connect to display :1
    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/user/miniconda/lib/python3.8/site-packages/cv2/qt/plugins" even though it was found.
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
    
    Available platform plugins are: xcb.
    

    Same for running on image rather than webcam :

    fabien@fabien-CORSAIR-ONE-i160:~$ docker run --name posecamera --rm -e DISPLAY=$DISPLAY  wondertree/posecamera --images ./tmp/female_pose.jpg --cpu
    qt.qpa.xcb: could not connect to display :1
    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/user/miniconda/lib/python3.8/site-packages/cv2/qt/plugins" even though it was found.
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
    
    Available platform plugins are: xcb.
    
    bug good first issue 
    opened by Utopiah 3
  • multiple person pose estimation on images

    multiple person pose estimation on images

    Hi again,

    I am working with your library nowadays. When I work with an image containing multiple people, it only gives value to a single person key points. For example:

     det = posecamera.pose_tracker.PoseTracker()
    
    image = cv2.imread("/content/1.png")
    
    pose = det(image)
    for name, (y, x, score) in pose.keypoints.items():
        #cv2.circle(image, center_coordinates, radius, color, thickness)
        cv2.circle(image, (int(x), int(y)), 8, (243, 255, 51), -1)
    
    img = cv2.resize(image, (250, 250))        
    cv2_imshow(img)
    

    index

    How can i get it for multiple person? Thank you.

    opened by senemaktas 2
  • Testing

    Testing

    Description

    PyPi package integrated and documentation updated to the latest version.

    Resolved Issues

    Closes #6 PyPi python package Closes #7 Github CI on pull request

    opened by musab1234 0
  • Float keypoints into pixels ?

    Float keypoints into pixels ?

    Thank you very much for creating this module.

    is there a way to get the keypoints as pixels numbers ? Because right now it looks like this :

    {'nose': array([-5.9867120e+00, 9.0966003e+02, 3.6360759e-01], dtype=float32), 'left_eye': array([-4.8970135e+01, 9.4581982e+02, 9.4886214e-02], dtype=float32), 'right_eye': array([-5.1433197e+01, 8.6966357e+02, 9.2111975e-02], dtype=float32), 'left_ear': array([8.2545176e+00, 9.7673682e+02, 4.2675975e-01], dtype=float32), 'right_ear': array([2.1643393e+01, 7.6527582e+02, 5.2597636e-01], dtype=float32), 'left_shoulder': array([3.0106079e+02, 1.0566696e+03, 6.5383315e-01], dtype=float32), 'right_shoulder': array([3.2392834e+02, 6.6651459e+02, 4.0876174e-01], dtype=float32), 'left_elbow': array([5.6922583e+02, 1.3786616e+03, 6.2058413e-01], dtype=float32), 'right_elbow': array([6.7028491e+02, 6.0433405e+02, 5.2336699e-01], dtype=float32), 'left_wrist': array([8.1140930e+02, 1.1170122e+03, 5.4489833e-01], dtype=float32), 'right_wrist': array([1.01784973e+03, 5.69821289e+02, 7.70775676e-01], dtype=float32), 'left_hip': array([1.0433268e+03, 9.6914252e+02, 6.5443105e-01], dtype=float32), 'right_hip': array([1.0465645e+03, 7.2657220e+02, 7.1066779e-01], dtype=float32), 'left_knee': array([1.6087389e+03, 1.0228279e+03, 7.9422629e-01], dtype=float32), 'right_knee': array([1.5593778e+03, 7.6752869e+02, 7.4263895e-01], dtype=float32), 'left_ankle': array([2.0873940e+03, 1.2951686e+03, 7.3480493e-01], dtype=float32), 'right_ankle': array([2.1593096e+03, 8.6261426e+02, 7.3734212e-01], dtype=float32)}

    opened by schwarzwals 1
Repository for the paper "PoseAug: A Differentiable Pose Augmentation Framework for 3D Human Pose Estimation", CVPR 2021.

PoseAug: A Differentiable Pose Augmentation Framework for 3D Human Pose Estimation Code repository for the paper: PoseAug: A Differentiable Pose Augme

Pyjcsx 328 Dec 17, 2022
Single-stage Keypoint-based Category-level Object Pose Estimation from an RGB Image

CenterPose Overview This repository is the official implementation of the paper "Single-stage Keypoint-based Category-level Object Pose Estimation fro

NVIDIA Research Projects 188 Dec 27, 2022
Human POSEitioning System (HPS): 3D Human Pose Estimation and Self-localization in Large Scenes from Body-Mounted Sensors, CVPR 2021

Human POSEitioning System (HPS): 3D Human Pose Estimation and Self-localization in Large Scenes from Body-Mounted Sensors Human POSEitioning System (H

Aymen Mir 66 Dec 21, 2022
Official PyTorch implementation of "Camera Distance-aware Top-down Approach for 3D Multi-person Pose Estimation from a Single RGB Image", ICCV 2019

PoseNet of "Camera Distance-aware Top-down Approach for 3D Multi-person Pose Estimation from a Single RGB Image" Introduction This repo is official Py

Gyeongsik Moon 677 Dec 25, 2022
DSAC* for Visual Camera Re-Localization (RGB or RGB-D)

DSAC* for Visual Camera Re-Localization (RGB or RGB-D) Introduction Installation Data Structure Supported Datasets 7Scenes 12Scenes Cambridge Landmark

Visual Learning Lab 143 Dec 22, 2022
3DMV jointly combines RGB color and geometric information to perform 3D semantic segmentation of RGB-D scans.

3DMV 3DMV jointly combines RGB color and geometric information to perform 3D semantic segmentation of RGB-D scans. This work is based on our ECCV'18 p

Владислав Молодцов 0 Feb 6, 2022
SE3 Pose Interp - Interpolate camera pose or trajectory in SE3, pose interpolation, trajectory interpolation

SE3 Pose Interpolation Pose estimated from SLAM system are always discrete, and

Ran Cheng 4 Dec 15, 2022
Web service for facial landmark detection, head pose estimation, facial action unit recognition, and eye-gaze estimation based on OpenFace 2.0

OpenGaze: Web Service for OpenFace Facial Behaviour Analysis Toolkit Overview OpenFace is a fantastic tool intended for computer vision and machine le

Sayom Shakib 4 Nov 3, 2022
《Unsupervised 3D Human Pose Representation with Viewpoint and Pose Disentanglement》(ECCV 2020) GitHub: [fig9]

Unsupervised 3D Human Pose Representation [Paper] The implementation of our paper Unsupervised 3D Human Pose Representation with Viewpoint and Pose Di

null 42 Nov 24, 2022
Simple Pose: Rethinking and Improving a Bottom-up Approach for Multi-Person Pose Estimation

SimplePose Code and pre-trained models for our paper, “Simple Pose: Rethinking and Improving a Bottom-up Approach for Multi-Person Pose Estimation”, a

Jia Li 256 Dec 24, 2022
This repository contains codes of ICCV2021 paper: SO-Pose: Exploiting Self-Occlusion for Direct 6D Pose Estimation

SO-Pose This repository contains codes of ICCV2021 paper: SO-Pose: Exploiting Self-Occlusion for Direct 6D Pose Estimation This paper is basically an

shangbuhuan 52 Nov 25, 2022
A Planar RGB-D SLAM which utilizes Manhattan World structure to provide optimal camera pose trajectory while also providing a sparse reconstruction containing points, lines and planes, and a dense surfel-based reconstruction.

ManhattanSLAM Authors: Raza Yunus, Yanyan Li and Federico Tombari ManhattanSLAM is a real-time SLAM library for RGB-D cameras that computes the camera

null 117 Dec 28, 2022
The project is an official implementation of our CVPR2019 paper "Deep High-Resolution Representation Learning for Human Pose Estimation"

Deep High-Resolution Representation Learning for Human Pose Estimation (CVPR 2019) News [2020/07/05] A very nice blog from Towards Data Science introd

Leo Xiao 3.9k Jan 5, 2023
Human head pose estimation using Keras over TensorFlow.

RealHePoNet: a robust single-stage ConvNet for head pose estimation in the wild.

Rafael Berral Soler 71 Jan 5, 2023
Deep Dual Consecutive Network for Human Pose Estimation (CVPR2021)

Deep Dual Consecutive Network for Human Pose Estimation (CVPR2021) Introduction This is the official code of Deep Dual Consecutive Network for Human P

null 295 Dec 29, 2022
Bottom-up Human Pose Estimation

Introduction This is the official code of Rethinking the Heatmap Regression for Bottom-up Human Pose Estimation. This paper has been accepted to CVPR2

null 108 Dec 1, 2022
This is an official implementation of our CVPR 2021 paper "Bottom-Up Human Pose Estimation Via Disentangled Keypoint Regression" (https://arxiv.org/abs/2104.02300)

Bottom-Up Human Pose Estimation Via Disentangled Keypoint Regression Introduction In this paper, we are interested in the bottom-up paradigm of estima

HRNet 367 Dec 27, 2022
HPRNet: Hierarchical Point Regression for Whole-Body Human Pose Estimation

HPRNet: Hierarchical Point Regression for Whole-Body Human Pose Estimation Official PyTroch implementation of HPRNet. HPRNet: Hierarchical Point Regre

Nermin Samet 53 Dec 4, 2022
A large-scale video dataset for the training and evaluation of 3D human pose estimation models

ASPset-510 ASPset-510 (Australian Sports Pose Dataset) is a large-scale video dataset for the training and evaluation of 3D human pose estimation mode

Aiden Nibali 36 Oct 30, 2022