Github Project-OpenPose installation on Ubuntu

Original: Github Project-OpenPose Installation on Ubuntu-AIUAI

Github Project-openpose
Team: CMU-Perceptual-Computing-Lab

OpenPose, a powerful open source project for pose estimation, including Body, Face, Hands, 3D Reconstruction, etc.

OpenPose is a real-time multi-person detection system for key points such as the body, hand, and face of a single image (135 in total) key point).

1. the latest update##

For more update details, refer to: all released features and release notes.

1.1 Features

1. Features

[1] - 2 D Real-time multi-person key point detection

[2] - 3 D Real-time single person key point detection

[3] - Calibration toolbox (Calibration toolbox)

[4] - Single-person tracking (Single-person tracking)

2. Input

3. Output

4. Support System (OS)

5. other

1.2 Results

1. Body-Foot Estimation

2. Body, Face, Hands estimate

3. 3 D Reconstruction module

4. Body and Hands estimate

5. Body estimate

2. Ubuntu installation##

The OpenPose support platform is relatively rich, but the installation instructions provided are relatively large, here only the instructions for the personal installation process are combined.

2.1. Dependency###

2.2. OpenPose configuration###

[1] - Open the CMake GUI and select the OpenPose path as the project source code path and the corresponding build compilation path. If the build path does not exist, YES will appear to automatically create it.

[2] - Click on the Configure option, then Unix Makefile (Ubuntu), and finally Finish.

[3] - Click the Generate option to close CMake.

**Note: **If you need to use Python API, you need to select BUILD_PYTHON after [2] Configure, such as:

2.3. OpenPose compile###

cd OPENPOSE_ROOT/build/
make -j`nproc`

Compilation is correct.

2.4. Other related

[1] - Do not use cuDNN when compiling:

In the OpenPose configuration, uncheck the USE_CUDNN of CMake.

If cuDNN is not used, you need to reduce the size set by --net_resolution to avoid insufficient GPU memory.

- - net_resolution can try: 640x320, 320x240, 320x160, 160x80.

Such as: --net_resolution -1x320.

**[2] - Custom Caffe version: **

In the OpenPose configuration, remove the check of CMake's BUILD_CAFEE, and manually define the Caffe include path and library path.

**[3] - Custom OpenCV version: **

In the OpenPose configuration, if OpenCV is compiled and installed from the source code, and OpenPose cannot find the OpenCV path, you can manually specify the OPENCV_DIR path.

2.5. CMake command line configuration###

If you have already used CMake GUI to configure compilation, this part is unnecessary.

[1] - Create the OPENPOSE_ROOT/build path:

cd OPENPOSE_ROOT/build
mkdir build
cd build

[2] - Generate Makefiles files. There are several scenarios at this time: Caffe can be a user-defined installation version; or a Caffe version integrated in OpenPose.

Scenario 1-Caffe is not installed, OpenCV is installed with apt-get

cd build
cmake ..

Scenario 2-Caffe is installed, and OpenCV is installed using source code

Assume that Caffe and OpenCV already exist.

Then, you need to provide CMake with libraries path and include path.

For OpenCV, use OpenCV_INCLUDE_DIRS and OpenCV_LIBS_DIR to specify the libraries path and the include path of the OpenCV installation. Alternatively, you can also set the OpenCV_CONFIG_FILE to specify the path of OpenCVConfig.cmake.

For Caffe, use Caffe_INCLUDE_DIRS and Caffe_LIBS to specify the libraries path and include path for Caffe installation.

Such as:

cmake -DOpenCV_INCLUDE_DIRS=/home/"${USER}"/softwares/opencv/build/install/include \
 - DOpenCV_LIBS_DIR=/home/"${USER}"/softwares/opencv/build/install/lib \
 - DCaffe_INCLUDE_DIRS=/home/"${USER}"/softwares/caffe/build/install/include \
 - DCaffe_LIBS=/home/"${USER}"/softwares/caffe/build/install/lib/libcaffe.so -DBUILD_CAFFE=OFF ..
cmake -DOpenCV_CONFIG_FILE=/home/"${USER}"/softwares/opencv/build/install/share/OpenCV/OpenCVConfig.cmake \
 - DCaffe_INCLUDE_DIRS=/home/"${USER}"/softwares/caffe/build/install/include \
 - DCaffe_LIBS=/home/"${USER}"/softwares/caffe/build/install/lib/libcaffe.so -DBUILD_CAFFE=OFF ..

Scenario 3-OpenvCV is installed

If Caffe is not installed, but OpenCV is installed:

cmake -DOpenCV_INCLUDE_DIRS=/home/"${USER}"/softwares/opencv/build/install/include \
 - DOpenCV_LIBS_DIR=/home/"${USER}"/softwares/opencv/build/install/lib ..
cmake -DOpenCV_CONFIG_FILE=/home/"${USER}"/softwares/opencv/build/install/share/OpenCV/OpenCVConfig.cmake ..

2.6. Python API

OpenPose's Python API requires setting BUILD_PYTHON in CMake GUI.

Such as: ./build/examples/tutorial_developer/python_1_pose_from_heatmaps.py.

2.7. CPU version###

In order to manually select the CPU version, set GPU_MODE to CPU_ONLY in CMake GUI.

Note: The accuracy of the CPU version is about 1% higher than that of the CUDA version. So the results may be different.

OpenPose in Ubuntu uses the Intel MKL (Math Kernel Library) version of Caffe. You can also use a custom Caffe version by deselecting USE_MKL.

The default CPU version is about 0.2 images per second on Ubuntu (~50X slower than the GPU version). The MKL version can increase the speed by 2X, ~0.4 images per second.

2.8. OpenPose reinstall and delete###

[1] - If you run sudo make install, first run sudo make uninstall in build/.

[2] - Delete the build/ path.

[3] - In CMake GUI, click File-Delete Cache.

[4] - Reinstall. (or delete the OPENPOSE_ROOT/ path.)

Recommended Posts

Github Project-OpenPose installation on Ubuntu
Configure ring after installation on Ubuntu 16.04
UBUNTU 16.04 installation diary
How to secure Redis installation on Ubuntu 14.04
ubuntu 1804 installation details
How to optimize Tomcat installation on Ubuntu 14.04
lamp on ubuntu
Ubuntu system installation
Ubuntu installation record
ubuntu 18.04 installation (UEFI+GBT)
ubuntu installation error
Install and use Git and GitHub on Ubuntu Linux
Manual for Ubuntu Installation
install vscode on ubuntu18
Install Redis on Ubuntu
Install R4 on ubuntu20
Install nvtop on Ubuntu 18.04
Install postgresql-10 on Ubuntu 18.04
Install docker on Ubuntu
Ubuntu16.04 installation partition settings
ubuntu redis php installation
Install Docker on ubuntu18.04
Ubuntu offline installation package
Install nodejs10 on Ubuntu16
Ubuntu introduction and installation
Install mysql on Ubuntu 14.04
Install Django on ubuntu
Install Pytorch+CUDA on Ubuntu 16.04
ubuntu nice font installation
Install Python3 on Ubuntu 14.04
LNMP installation under Ubuntu
Install rJava on Ubuntu18
Install JDK10+ on Ubuntu
Install Python3 on Ubuntu 16.04
Ubuntu CEPH quick installation
foreman ubuntu16 quick installation
ROS learning---Install ROS on Ubuntu
Install KDE on Ubuntu16.04.2
Ubuntu 17.10 installation toss record
Install Docker on Ubuntu18
Ubuntu dual system installation
Install Python3.7 on Ubuntu
Install flashplayer on Ubuntu
Docker practice (1): install Docker on Ubuntu 16.04
[Share] Solve the problem of failed installation of Vitis 2019.2 on Ubuntu 16.04
Install ubuntu on virtual machine
Install OpenSSL 1.0.2 on Ubuntu Server 14.04
Install QQ robot on Ubuntu 16.04
Install Python 3.7 on Ubuntu 18.04 LTS
Glusterfs cluster installation on Centos7
Upgrade Ubuntu 18.04 on Azure to 18.10
Install Android Studio on Ubuntu
ubuntu view python installation path
Configure tomcat on ubuntu server
Ubuntu16.04 installation and simple configuration
Install scrapy framework on ubuntu
Detailed ubuntu 20.04 LTS installation record
Install Mysql offline on Ubuntu
Install Oracle Java8 on Ubuntu
Install Odoo 11 stack on Ubuntu 16.04
CSI Tools installation Intel 5300 + Ubuntu 14.04