Openpose installation configuration and testing

Source: Internet
Author: User

1. About Openpose
Introduction: Openpose is a CMU open source real-time multiplayer key point detection Library, which implements a real-time system for the detection of key points in human body, hand and face (a total of 130 key points).
GitHub Address: Https://github.com/CMU-Perceptual-Computing-Lab/openpose

2. System Configuration
Operating system: Win7 x64
Ide:viusal Studio 2015
GPU:GT 720
cuda:8.0

2.1 Installation Cuda,cudnn,visual Studio2015
(1) Cuda Installation: Https://developer.nvidia.com/cuda-downloads
Follow the prompts to install it directly.

(2) CUDNN Installation: HTTPS://DEVELOPER.NVIDIA.COM/CUDNN
This step needs to register an account, and fill out a questionnaire, you can download after completion. Cudnn after downloading, add [Yourpath]\cuda and [Yourpath]\cuda\bin to environment variables and follow the following actions:
[yourpath]\cuda\bin\cudnn64_5.dll-> (Copy to)
[Yourpath]\program files\nvidia GPU Computing toolkit\cuda\v8.0\bin
[yourpath]\cuda\include\cudnn.h-> (Copy to)
[Yourpath]\nvidia GPU Computing Toolkit\cuda\v8.0\include
[yourpath]\cuda\lib\x64\cudnn.lib-> (Copy to)
[Yourpath]\nvidia GPU Computing toolkit\cuda\v8.0\lib\x64

(2) Install Visual Studio 2015
You have tried to compile with visual Studio 2013 with a number of errors, which are normal after you switch to VS2015 (possibly related to the engineering configuration or the new features of c++14).

2.2 Download related dependencies
Download the Openpose on the above GitHub, run the batch file "Download_3rdparty_and_models.bat" under the Openpose-master/windows path, and automatically download the Caffe of the project needed, OPENCV and related model.

After the download is complete, download the CAFFE,OPENCV and related library files under Openpose-master/3rdparty/windows:

The Caffemodel files of the human body, hand, and face are in the respective folders of Pose,hand and faces under Openpose-master\models:

(3) Running
Open the project, switch to release mode, directly compile and run.
Problems that may be encountered:
A. GPU out of memory-> gup memory is not enough, swapping for higher memory gup, or changing related parameters (see below)
B. GPU compute capacity mismatch-> gup compute and capacity do not match. CUDNN requires the compute capacity of the GPU to be greater than 3.0. Previous use of Tesla c2050 encountered such a situation. The compute capacity of the GPU is detailed in Https://developer.nvidia.com/cuda-gpus, which has the relevant data of various models of the GPU provided by Nvida.

3. Test
The program will automatically detect available cameras, or it can be set up to use local pictures or videos to test, and use local picture tests to modify Openpose.cpp:
(1) Read the test Picture folder (the project has brought some test pictures, stored in Openpose-master\examples\media):

(2) Save the Test Results folder (Create a new resultimg folder under Openpose-master\examples\media):

Use GT720 graphics card to test a single picture of the GPU out of the memory problem, because there is no greater capacity of the GPU, modified some of the program parameters to normal operation. The main modified parameter netinputsize,facenetinputsize,handnetinputsize. The modified parameter is the following figure, where the annotation is the parameter of the default setting in the program. Note that the length of size needs to be an integer multiple of 16.
About Netinputsize, comments in the code:
/**
* CCN (Conv Net) input size.
* The greater, the slower and more memory it'll be needed, but it'll potentially increase.
* Both width and height must be divisible by 16.
*/

After the modified test, this machine uses GT720 fps for 0.6 (due to the graphics capacity limit, here only detects the human body key point, does not open the human face and the hand key point detection), partial test result (picture from the network):

Because the netinputsize is modified, the result is worse than the default parameter.

Use K40C graphics card for testing, the use of engineering default netinputsize, only for human key point detection, FPS in about 4.0. Simultaneously carries on the human body, the hand and the face key Spot detection (project default only carries on the human body key point detection, detects the human face and the hand key point needs to modify in the code to open) and modifies the netinputsize parameter respectively to 512x256,256x256,256x256 FPS at around 1.2, some of the results are as follows:



In the test, use Windows's own screenshot tool to take screenshots from the Web page and save it in jpg format, suffix. JPG "(uppercase) can not complete the test, the project from the picture, the suffix of". jpg "(lowercase) to normal test. Use the Paint tool "Save as JPEG" with the drawing tools to get the picture suffix ". jpg" to be tested correctly. May be a procedural problem.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.