Skip to content

Flask application for human pose estimation using webcam of the computer

License

Notifications You must be signed in to change notification settings

dkurzend/Human_Pose_Estimation_Flask_App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Human_Pose_Estimation_Flask_App

Flask application for human pose estimation using webcam of the computer.

This repository contains the flask application to test the models from Soft_Gated_Pose_Estimation_Pytorch in real-time.

Supportd Models

  • Stacked Hourglass Network
  • Soft-Gated Skip Connections

Getting Started

Requirements

  • Python 3.10.4
  • Pytorch

Installation

  1. Clone the repository:

    git clone https://github.com/dkurzend/Human_Pose_Estimation_Flask_App.git
    
  2. Install miniconda and create a virtual environment.

    conda create --name hpe_app
    
  3. Activate the virtual env and install pip as well as the dependencies.

    conda activate hpe_app
    conda install pip
    pip install -r requirements.txt
    

    (Alternatively use venv instead of miniconda)

  4. Download the models and put them into the models folder (soft-gated skip connections, stacked hourglass). You have to download both models.

  5. Start the flask app

    python app.py
    

The requirements.txt file includes the cpu version of pytorch. If your computer/laptop has a gpu available feel free to change the pytorch version to one including cuda (tested with cuda version 11.6). If cuda is available, you will be able to switch between gpu and cpu in the application.

Result

Soft-Gated Skip Connections Stacked Hourglass Network
Number of Parameters 13.6 Mio 32.8 Mio
Speed on CPU* 0.29 sec (3.45 fps) 0.56 sec (1.79 fps)
Speed on GPU* 0.04 sec (25 fps) 0.07 sec (14.29 fps)
Speed on CPU** 0.24 sec (4.17 fps) 0.42 sec (2.38 fps)
Speed on GPU** 0.03 sec (33.3 fps) 0.06 sec (16.67 fps)
*System: Laptop with i7-10750H CPU and GeForce RTX 2060 GPU
**System: Desktop with i9-9900K CPU and GeForce RTX 2080 GPU

Example prediction Example prediction

Final Note

This repository was part of a university project at university of Tübingen. Project team:
David Kurzendörfer, Jan-Patrick Kirchner, Tim Herold, Daniel Banciu

Releases

No releases published

Packages

No packages published