I am trying to use OpenPose on my Jetson AGX Xavier for inference on multiple video streams. I have an OpenPose .onnx model from this git (GitHub - tensorlayer/hyperpose: Library for Fast and Flexible Human Pose Estimation) and I am not sure what I need to do in order to use it with DeepStream.
Can anyone help me out and explain the process that I need to follow?
Deepstream can load onnx models directly. You might need to write some custom code to parse outputs of your model to display the results.
Please check this related discussion for more information:
Hi,
Do you want to run openpose for each camera stream or integrated the output information of each stream?
For the former case, the simplest way is to run multiple pipeline for each input.
To run openpose on Jetson can be found here:
Thanks.
The goal is to run openpose on multiple camera streams (running openpose on each camera stream simultaneously) and then utilize the body keypoints from each frame to perform 2D to 3D reconstruction.
Trying to follow your instructions from (How to install OpenPose on Jetson TX2 with Jetpack 4.2) I run into an issue after trying to use cmake (ver 3.17) .
$ /home/agx1/.local/bin/cmake ../ -DCUDA_ARCH_BIN=53
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- GCC detected, adding compile flags
-- GCC detected, adding compile flags
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda-10.0 (found version "10.0")
-- Building with CUDA.
-- CUDA detected: 10.0
-- Found cuDNN: ver. ??? found (include: /usr/include, library: /usr/lib/aarch64-linux-gnu/libcudnn.so)
CMake Error at cmake/Cuda.cmake:263 (message):
cuDNN version >3 is required.
Call Stack (most recent call first):
cmake/Cuda.cmake:291 (detect_cuDNN)
CMakeLists.txt:422 (include)
-- Configuring incomplete, errors occurred!
See also "/media/agx1/agxSSD/openpose/build/CMakeFiles/CMakeOutput.log".
See also "/media/agx1/agxSSD/openpose/build/CMakeFiles/CMakeError.log".
I have tried the fixes here (Cmake openpose problem (cuDNN not found) · Issue #486 · CMU-Perceptual-Computing-Lab/openpose · GitHub) but nothing seems to work. Perhaps there is something wrong with my CUDA installation? I used SDK Manager to setup my AGX.
I can post the CMake logs if needed.
Hi,
Please check this comment for the cuDNN header issue:
Thanks.
Thank you for the link. I tried making similar changes to what was suggested there but I am still facing the same error message. Sorry, I have never done this before and was wondering if you could have a look at the FindCuDNN.cmake file that comes with the OpenPose git (git clone --recursive GitHub - CMU-Perceptual-Computing-Lab/openpose: OpenPose: Real-time multi-person keypoint detection library for body, face, hands, and foot estimation). After cloning the git I have tried to edit the FindCuDNN file but perhaps I am still doing something wrong with my edits.
set(CUDNN_ROOT "" CACHE PATH "CUDNN root folder")
set(CUDNN_LIB_NAME "libcudnn.so")
find_path(CUDNN_INCLUDE cudnn.h
PATHS ${CUDNN_ROOT} $ENV{CUDNN_ROOT} ${CUDA_TOOLKIT_INCLUDE}
DOC "Path to cuDNN include directory." )
get_filename_component(__libpath_hist ${CUDA_CUDART_LIBRARY} PATH)
find_library(CUDNN_LIBRARY NAMES ${CUDNN_LIB_NAME}
PATHS ${CUDNN_ROOT} $ENV{CUDNN_ROOT} ${CUDNN_INCLUDE} ${__libpath_hist} ${__libpath_hist}/../lib
DOC "Path to cuDNN library.")
if(CUDNN_INCLUDE AND CUDNN_LIBRARY)
set(HAVE_CUDNN TRUE)
set(CUDNN_FOUND TRUE)
file(READ ${CUDNN_INCLUDE}/cudnn.h CUDNN_VERSION_FILE_CONTENTS)
# cuDNN v3 and beyond
string(REGEX MATCH "define CUDNN_MAJOR * +([0-9]+)"
CUDNN_VERSION_MAJOR "${CUDNN_VERSION_FILE_CONTENTS}")
string(REGEX REPLACE "define CUDNN_MAJOR * +([0-9]+)" "\\1"
CUDNN_VERSION_MAJOR "${CUDNN_VERSION_MAJOR}")
string(REGEX MATCH "define CUDNN_MINOR * +([0-9]+)"
CUDNN_VERSION_MINOR "${CUDNN_VERSION_FILE_CONTENTS}")
string(REGEX REPLACE "define CUDNN_MINOR * +([0-9]+)" "\\1"
CUDNN_VERSION_MINOR "${CUDNN_VERSION_MINOR}")
string(REGEX MATCH "define CUDNN_PATCHLEVEL * +([0-9]+)"
CUDNN_VERSION_PATCH "${CUDNN_VERSION_FILE_CONTENTS}")
string(REGEX REPLACE "define CUDNN_PATCHLEVEL * +([0-9]+)" "\\1"
CUDNN_VERSION_PATCH "${CUDNN_VERSION_PATCH}")
if (NOT CUDNN_VERSION_MAJOR)
set(CUDNN_VERSION "???")
else ()
set(CUDNN_VERSION "${CUDNN_VERSION_MAJOR}.${CUDNN_VERSION_MINOR}.${CUDNN_VERSION_PATCH}")
endif()
message(STATUS "Found cuDNN: ver. ${CUDNN_VERSION} found (include: ${CUDNN_INCLUDE}, library: ${CUDNN_LIBRARY})")
string(COMPARE LESS "${CUDNN_VERSION_MAJOR}" 3 cuDNNVersionIncompatible)
if(cuDNNVersionIncompatible)
message(FATAL_ERROR "cuDNN version >3 is required.")
endif()
set(CUDNN_VERSION "${CUDNN_VERSION}")
mark_as_advanced(CUDNN_INCLUDE CUDNN_LIBRARY CUDNN_ROOT)
else(CUDNN_INCLUDE AND CUDNN_LIBRARY)
message(STATUS "cuDNN not found")
endif()
Hi,
Please check the following update:
diff --git a/cmake/Cuda.cmake b/cmake/Cuda.cmake
index acd193a5..7e202d40 100644
--- a/cmake/Cuda.cmake
+++ b/cmake/Cuda.cmake
@@ -234,7 +234,7 @@ function(detect_cuDNN)
set(HAVE_CUDNN TRUE PARENT_SCOPE)
set(CUDNN_FOUND TRUE PARENT_SCOPE)
- file(READ ${CUDNN_INCLUDE}/cudnn.h CUDNN_VERSION_FILE_CONTENTS)
+ file(READ ${CUDNN_INCLUDE}/cudnn_version.h CUDNN_VERSION_FILE_CONTENTS)
# cuDNN v3 and beyond
string(REGEX MATCH "define CUDNN_MAJOR * +([0-9]+)"
diff --git a/cmake/Modules/FindCuDNN.cmake b/cmake/Modules/FindCuDNN.cmake
index 82ee365a..17511694 100644
--- a/cmake/Modules/FindCuDNN.cmake
+++ b/cmake/Modules/FindCuDNN.cmake
@@ -14,7 +14,7 @@ if(CUDNN_INCLUDE AND CUDNN_LIBRARY)
set(HAVE_CUDNN TRUE)
set(CUDNN_FOUND TRUE)
- file(READ ${CUDNN_INCLUDE}/cudnn.h CUDNN_VERSION_FILE_CONTENTS)
+ file(READ ${CUDNN_INCLUDE}/cudnn_version.h CUDNN_VERSION_FILE_CONTENTS)
# cuDNN v3 and beyond
string(REGEX MATCH "define CUDNN_MAJOR * +([0-9]+)"
Thanks.