Code Monkey home page Code Monkey logo

openpose's Introduction

POSE-ESTIMATION with OpenPose

pose-estimation is responsible for estimating the pose given a region with an operator. It uses the open-source pose estimator Openpose as its core engine.

This module has three core operations:

  • Estimate
  • Remove outsider operators
  • Get pose position

Estimate

Uses only one frame as input and returns the coordinates of every person in it, following a matrix of coordinates and probabilities, using the following schema:

It returns two things:

Pose keypoints coordenates

A 21 * 3 matrix with each pose coordinate and accuracy for each person detected

[[x, y, acc],
[x, y, acc], 
... ...
[x, y, acc],
[x, y, acc]]

openpose_ids

PREREQUISITES

  • Ubuntu >= 18.04
  • Nvidia Driver >= 410.68
  • Docker & Nvidia-docker >= 20.10
  • docker-compose >= 1.29.2
  • RabbitMQ >= 3.11.17
  • Kombu >= 5.1.0

INSTALLATION

Install nvidia-docker

sudo su
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/ubuntu22.04/nvidia-docker.list > /etc/apt/sources.list.d/nvidia-docker.list
apt update
apt -y install nvidia-container-toolkit nvidia-docker2

Installation for manual testing

  • First, install Docker.

  • Clone repository:

     git clone https://github.com/fmorenovr/openpose.git
    

Docker installation

We use docker in order to test locally, goes to the repository dir openpose. Then, first we need to run:

sudo docker-compose -f docker-compose.yaml up --build -d

Test the environment:

sudo docker exec -it openpose bash

Local Installation (Ubuntu 18.04)

  • First, Install main libs:
# cmake, usually already installed on Linux
# cmake, usually already installed on Linux, in other case:
sudo apt-get install cmake cmake-qt-gui
sudo apt-get install build-essential libssl-dev
# other libraries
sudo apt-get install libgoogle-glog-dev
sudo apt-get install protobuf-compiler libprotobuf-dev
sudo apt-get install libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-test-dev libboost-filesystem1.74-dev
sudo apt-get install libatlas-base-dev
sudo apt-get install libhdf5-dev
sudo apt-get install libcaffe-cuda-dev
sudo apt-get install libgtk2.0-dev
  • Second, install OpenPose following the installation instructions from here.

Step 1, Clone the OpenPose repository:

git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose.git
cd openpose/
git submodule update --init --recursive --remote

Step-2, Config with CMAKE-GUI (local system only, not inside the docker):

mkdir build/
cd build/
cmake-gui ..

Step-2, Config CMAKE (terminal):

mkdir build/
cd build/
# CPU only
cmake -DBUILD_PYTHON=ON  -DGPU_MODE=CPU_ONLY .. && make -j `nproc`
# GPU 
cmake -DBUILD_PYTHON=ON  -DUSE_CuDNN .. && make -j `nproc`

Notes:

  • You must ensure that BUILD_PYTHON is flagged on

  • You can get the prototxt model files here. or just download models from:

    cd /app/openpose/models
    bash getModels.sh
    

Once you successfully installed OpenPose, copy the openpose/ directory inside this directory one.

Testing videos

Download test videos:

bash get_data.sh
python3 -m unittest discover -s ./openpose_test -p test_*.py

REFERENCES

openpose's People

Contributors

fmorenovr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.