All Projects → rwightman → Posenet Pytorch

rwightman / Posenet Pytorch

Licence: apache-2.0
A PyTorch port of Google TensorFlow.js PoseNet (Real-time Human Pose Estimation)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Posenet Pytorch

Pose Adv Aug
Code for "Jointly Optimize Data Augmentation and Network Training: Adversarial Data Augmentation in Human Pose Estimation" (CVPR 2018)
Stars: ✭ 83 (-55.61%)
Mutual labels:  human-pose-estimation
Vibe
Official implementation of CVPR2020 paper "VIBE: Video Inference for Human Body Pose and Shape Estimation"
Stars: ✭ 2,080 (+1012.3%)
Mutual labels:  human-pose-estimation
Vnect
Real-time 3D human pose estimation, implemented by tensorflow
Stars: ✭ 157 (-16.04%)
Mutual labels:  human-pose-estimation
Human Pose Estimation
This repository implements a demo of the Human pose estimation via Convolutional Part Heatmap Regression paper.
Stars: ✭ 98 (-47.59%)
Mutual labels:  human-pose-estimation
Tensorflow realtime multi Person pose estimation
Multi-Person Pose Estimation project for Tensorflow 2.0 with a small and fast model based on MobilenetV3
Stars: ✭ 129 (-31.02%)
Mutual labels:  human-pose-estimation
Awesome Human Pose Estimation
A collection of awesome resources in Human Pose estimation.
Stars: ✭ 2,022 (+981.28%)
Mutual labels:  human-pose-estimation
Lightweight Human Pose Estimation.pytorch
Fast and accurate human pose estimation in PyTorch. Contains implementation of "Real-time 2D Multi-Person Pose Estimation on CPU: Lightweight OpenPose" paper.
Stars: ✭ 958 (+412.3%)
Mutual labels:  human-pose-estimation
Deepstream pose estimation
This is a sample DeepStream application to demonstrate a human pose estimation pipeline.
Stars: ✭ 168 (-10.16%)
Mutual labels:  human-pose-estimation
Gccpm Look Into Person Cvpr19.pytorch
Fast and accurate single-person pose estimation, ranked 10th at CVPR'19 LIP challenge. Contains implementation of "Global Context for Convolutional Pose Machines" paper.
Stars: ✭ 137 (-26.74%)
Mutual labels:  human-pose-estimation
V2v Posenet Pytorch
PyTorch implementation of V2V-PoseNet with IntegralPose/PoseFix loss
Stars: ✭ 156 (-16.58%)
Mutual labels:  human-pose-estimation
Personlab Tf
implementation of PersonLab(https://arxiv.org/abs/1803.08225) using TF-slim
Stars: ✭ 103 (-44.92%)
Mutual labels:  human-pose-estimation
Human Pose Estimation Papers
2D&3D human pose estimation
Stars: ✭ 126 (-32.62%)
Mutual labels:  human-pose-estimation
Pytorch Pose Estimation
PyTorch Implementation of Realtime Multi-Person Pose Estimation project.
Stars: ✭ 152 (-18.72%)
Mutual labels:  human-pose-estimation
Shelfnet Human Pose Estimation
Fast and accurate Human Pose Estimation using ShelfNet with PyTorch
Stars: ✭ 95 (-49.2%)
Mutual labels:  human-pose-estimation
Awesome Human Motion
🏃‍♀️ A curated list about human motion capture, analysis and synthesis.
Stars: ✭ 161 (-13.9%)
Mutual labels:  human-pose-estimation
Human3.6m downloader
Human3.6M downloader by Python
Stars: ✭ 37 (-80.21%)
Mutual labels:  human-pose-estimation
Cdcl Human Part Segmentation
Repository for Paper: Cross-Domain Complementary Learning Using Pose for Multi-Person Part Segmentation (TCSVT20)
Stars: ✭ 143 (-23.53%)
Mutual labels:  human-pose-estimation
Imgclsmob
Sandbox for training deep learning networks
Stars: ✭ 2,405 (+1186.1%)
Mutual labels:  human-pose-estimation
Keraspersonlab
Keras-tensorflow implementation of PersonLab (https://arxiv.org/abs/1803.08225)
Stars: ✭ 163 (-12.83%)
Mutual labels:  human-pose-estimation
Evoskeleton
Official project website for the CVPR 2020 paper (Oral Presentation) "Cascaded Deep Monocular 3D Human Pose Estimation With Evolutionary Training Data"
Stars: ✭ 154 (-17.65%)
Mutual labels:  human-pose-estimation

PoseNet Pytorch

This repository contains a PyTorch implementation (multi-pose only) of the Google TensorFlow.js Posenet model.

This port is based on my Tensorflow Python (https://github.com/rwightman/posenet-python) conversion of the same model. An additional step of the algorithm was performed on the GPU in this implementation so it is faster and consumes less CPU (but more GPU). On a GTX 1080 Ti (or better) it can run over 130fps.

Further optimization is possible as the MobileNet base models have a throughput of 200-300 fps.

Install

A suitable Python 3.x environment with a recent version of PyTorch is required. Development and testing was done with Python 3.7.1 and PyTorch 1.0 w/ CUDA10 from Conda.

If you want to use the webcam demo, a pip version of opencv (pip install python-opencv=3.4.5.20) is required instead of the conda version. Anaconda's default opencv does not include ffpmeg/VideoCapture support. The python bindings for OpenCV 4.0 currently have a broken impl of drawKeypoints so please force install a 3.4.x version.

A fresh conda Python 3.6/3.7 environment with the following installs should suffice:

conda install -c pytorch pytorch cudatoolkit
pip install requests opencv-python==3.4.5.20

Usage

There are three demo apps in the root that utilize the PoseNet model. They are very basic and could definitely be improved.

The first time these apps are run (or the library is used) model weights will be downloaded from the TensorFlow.js version and converted on the fly.

For all demos, the model can be specified with the '--model` argument by using its integer depth multiplier (50, 75, 100, 101). The default is the 101 model.

image_demo.py

Image demo runs inference on an input folder of images and outputs those images with the keypoints and skeleton overlayed.

python image_demo.py --model 101 --image_dir ./images --output_dir ./output

A folder of suitable test images can be downloaded by first running the get_test_images.py script.

benchmark.py

A minimal performance benchmark based on image_demo. Images in --image_dir are pre-loaded and inference is run --num_images times with no drawing and no text output.

webcam_demo.py

The webcam demo uses OpenCV to capture images from a connected webcam. The result is overlayed with the keypoints and skeletons and rendered to the screen. The default args for the webcam_demo assume device_id=0 for the camera and that 1280x720 resolution is possible.

Credits

The original model, weights, code, etc. was created by Google and can be found at https://github.com/tensorflow/tfjs-models/tree/master/posenet

This port and my work is in no way related to Google.

The Python conversion code that started me on my way was adapted from the CoreML port at https://github.com/infocom-tpo/PoseNet-CoreML

TODO (someday, maybe)

  • More stringent verification of correctness against the original implementation
  • Performance improvements (especially edge loops in 'decode.py')
  • OpenGL rendering/drawing
  • Comment interfaces, tensor dimensions, etc
  • Implement batch inference for image_demo
  • Create a training routine and add models with more advanced CNN backbones
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].