From 708b1b57b4c93682d6eca601ac61b3b6268237bd Mon Sep 17 00:00:00 2001 From: Gines Hidalgo Date: Wed, 13 Jan 2021 20:20:14 -0500 Subject: [PATCH] Fixed Unity/cudnn bindings/script Signed-off-by: Gines Hidalgo --- scripts/ubuntu/install_cudnn.sh | 1 + src/openpose/unity/unityBinding.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/ubuntu/install_cudnn.sh b/scripts/ubuntu/install_cudnn.sh index 34804857..3ed36ad0 100755 --- a/scripts/ubuntu/install_cudnn.sh +++ b/scripts/ubuntu/install_cudnn.sh @@ -3,6 +3,7 @@ echo "This script assumes Ubuntu 16 or 14 and Nvidia Graphics card up to 10XX. Otherwise, it will fail." # Install cuDNN 5.1 +ubuntu_version="$(lsb_release -r)" if [[ $UBUNTU_VERSION == *"14."* ]] || [[ $UBUNTU_VERSION == *"15."* ]] || [[ $UBUNTU_VERSION == *"16."* ]]; then CUDNN_URL="http://developer.download.nvidia.com/compute/redist/cudnn/v5.1/cudnn-8.0-linux-x64-v5.1.tgz" wget -c ${CUDNN_URL} diff --git a/src/openpose/unity/unityBinding.cpp b/src/openpose/unity/unityBinding.cpp index b283bd56..f9e39266 100644 --- a/src/openpose/unity/unityBinding.cpp +++ b/src/openpose/unity/unityBinding.cpp @@ -532,6 +532,7 @@ namespace op OP_API void _OPConfigurePose( unsigned char poseMode, int netInputSizeX, int netInputSizeY, // Point + double netInputSizeDynamicBehavior, int outputSizeX, int outputSizeY, // Point unsigned char keypointScaleMode, // ScaleMode int gpuNumber, int gpuNumberStart, int scalesNumber, float scaleGap, @@ -547,10 +548,10 @@ namespace op try { spWrapperStructPose = std::make_shared( - (PoseMode)poseMode, Point{netInputSizeX, netInputSizeY}, Point{outputSizeX, outputSizeY}, - (ScaleMode) keypointScaleMode, gpuNumber, gpuNumberStart, scalesNumber, scaleGap, - (RenderMode) renderMode, (PoseModel) poseModel, blendOriginalFrame, alphaKeypoint, alphaHeatMap, - defaultPartToRender, modelFolder, + (PoseMode)poseMode, Point{netInputSizeX, netInputSizeY}, netInputSizeDynamicBehavior, + Point{outputSizeX, outputSizeY}, (ScaleMode) keypointScaleMode, gpuNumber, gpuNumberStart, + scalesNumber, scaleGap, (RenderMode) renderMode, (PoseModel) poseModel, blendOriginalFrame, + alphaKeypoint, alphaHeatMap, defaultPartToRender, modelFolder, // HeatMapType // (HeatMapType) heatmap_type, flagsToHeatMaps(heatMapAddParts, heatMapAddBkg, heatMapAddPAFs), (ScaleMode) heatMapScaleMode, addPartCandidates, renderThreshold, numberPeopleMax, -- GitLab