Jump to content

Setting up OpenPose on NVIDIA Jetson TX2: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 1: Line 1:
<seo title="OpenPose on NVIDIA Jetson TX2 | OpenPose | RidgeRun Developer" titlemode="replace" keywords="OpenPose, NVIDIA Jetson TX2, NVIDIA, Jetson TX2, TX2, cuDNN, CUDA, Caffe, OpenCV, GStreamer, Installing OpenPose"  description="This wiki page from RidgeRun is about setting up OpenPose and all its dependencies on either a computer with Ubuntu 16.04 or on the NVIDIA Jetson TX2 platform."></seo>
==Introduction to OpenPose on NVIDIA Jetson TX2==
==Introduction to OpenPose on NVIDIA Jetson TX2==


Line 5: Line 7:
==Setting up OpenPose on Ubuntu 16.04 for Desktop==
==Setting up OpenPose on Ubuntu 16.04 for Desktop==


===Requirements===
===<u>Requirements</u>===


====cuDNN (highly recommended)====
====cuDNN (highly recommended)====
Line 50: Line 52:
An output of “Test passed!” should appear.
An output of “Test passed!” should appear.


===Dependencies===
===<u>Dependencies</u>===


====OpenCV (2.X or 3.X)====
====OpenCV (2.X or 3.X)====
Line 95: Line 97:
  $make runtest
  $make runtest


===OpenPose Installation===
===<u>OpenPose Installation</u>===


1. First clone the OpenPose repository:
'''1.''' First clone the OpenPose repository:


  $git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose
  $git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose


2. Install Caffe and dependencies with the following script:
'''2.''' Install Caffe and dependencies with the following script:


  $sudo bash ./scripts/ubuntu/install_deps.sh
  $sudo bash ./scripts/ubuntu/install_deps.sh


3. Configure OpenPose with CMake-GUI
'''3.''' Configure OpenPose with CMake-GUI


* Make a “build” folder
* Make a “build” folder
Line 113: Line 115:
* Press “Generate” and close CMake.
* Press “Generate” and close CMake.


===OpenPose Building===
===<u>OpenPose Building</u>===


Go into the build directory and run:
Go into the build directory and run:
Line 121: Line 123:
  $sudo make install
  $sudo make install


===Verify OpenPose Installation===
===<u>Verify OpenPose Installation</u>===


1. Go to the OpenPose directory
'''1.''' Go to the OpenPose directory


2. For example on video run:
'''2.''' For example on video run:


  $./build/examples/openpose/openpose.bin --video examples/media/video.avi
  $./build/examples/openpose/openpose.bin --video examples/media/video.avi
  $./build/examples/openpose/openpose.bin --video examples/media/video.avi --face --hand
  $./build/examples/openpose/openpose.bin --video examples/media/video.avi --face --hand


3. For example on webcam run:
'''3.''' For example on webcam run:


  $./build/examples/openpose/openpose.bin
  $./build/examples/openpose/openpose.bin
Line 136: Line 138:


==Setting up OpenPose on NVIDIA Jetson TX2==
==Setting up OpenPose on NVIDIA Jetson TX2==
===Requirements and Dependencies===
===<u>Requirements and Dependencies</u>===
====Requirements====
====Requirements====
* It is required for the Jetson TX2 board to be flashed with either JetPack 3.1 or JetPack 3.3.
* It is required for the Jetson TX2 board to be flashed with either JetPack 3.1 or JetPack 3.3.
Line 150: Line 152:
     - The demo and tutorials additionally use GFlags.
     - The demo and tutorials additionally use GFlags.


'''Note:'''
{{Ambox
For OpenCV to be able to access Jetson's onboard camera via GStreamer, it is required to rebuild OpenCV after GStreamer has been installed.
|type=notice
|small=left
|issue='''Note:'''For OpenCV to be able to access Jetson's onboard camera via GStreamer, it is required to rebuild OpenCV after GStreamer has been installed.
|style=width:unset;
}}


1- Please make sure GStreamer is already installed in the Jetson Board.
'''1-''' Please make sure GStreamer is already installed in the Jetson Board.
     $sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-bad
     $sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-bad
2- Remove previous installation of OpenCV.
'''2-''' Remove previous installation of OpenCV.
     $sudo apt-get purge libopencv*  
     $sudo apt-get purge libopencv*  
3- To rebuild OpenCV, is useful to use [https://github.com/jetsonhacks/buildOpenCVTX2 Jetsonhacks buildOpenCVTX2 bash script].
'''3-''' To rebuild OpenCV, is useful to use [https://github.com/jetsonhacks/buildOpenCVTX2 Jetsonhacks buildOpenCVTX2 bash script].
     $git clone https://github.com/jetsonhacks/buildOpenCVTX2.git
     $git clone https://github.com/jetsonhacks/buildOpenCVTX2.git
     $cd buildOpenCVTX2
     $cd buildOpenCVTX2
     $./buildOpenCV.sh
     $./buildOpenCV.sh
4- Remove the build files after installation.
'''4-''' Remove the build files after installation.
     $./removeOpenCVSources.sh  
     $./removeOpenCVSources.sh  


===Installing OpenPose===
===<u>Installing OpenPose</u>===
Once all the requirements and dependencies are ready, installing OpenPose is really easy to install.
Once all the requirements and dependencies are ready, installing OpenPose is really easy to install.
     $git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose
     $git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose
     $bash ./scripts/ubuntu/install_caffe_and_openpose_JetsonTX2_JetPack3.3.sh
     $bash ./scripts/ubuntu/install_caffe_and_openpose_JetsonTX2_JetPack3.3.sh


===Verify OpenPose Installation===
===<u>Verify OpenPose Installation</u>===
Testing if OpenPose was successfully installed can be done by running one of its examples.
Testing if OpenPose was successfully installed can be done by running one of its examples.
     ./build/examples/openpose/openpose.bin -camera_resolution 640x480 -net_resolution 128x96
     ./build/examples/openpose/openpose.bin -camera_resolution 640x480 -net_resolution 128x96
Line 176: Line 182:
==See Also==
==See Also==


1. https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation.md
'''1.''' https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation.md


2. https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html
'''2.''' https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html


3. http://caffe.berkeleyvision.org/installation.html
'''3.''' http://caffe.berkeleyvision.org/installation.html
<br>
<br>
<br>
<br>
Cookies help us deliver our services. By using our services, you agree to our use of cookies.