From 7ae8d776204e265ae50f11d0ddfec1e73fb24bea Mon Sep 17 00:00:00 2001 From: Gines Hidalgo Martinez Date: Wed, 25 Oct 2017 16:42:55 -0400 Subject: [PATCH] Fixed rescaling issue & score for COCO val. --- 3rdparty/caffe/install_caffe_if_cuda8.sh | 7 +- doc/installation.md | 4 +- doc/release_notes.md | 9 +- examples/tests/pose_accuracy_coco_test.sh | 8 +- include/openpose/core/datum.hpp | 11 +- include/openpose/core/resizeAndMergeCaffe.hpp | 2 +- include/openpose/filestream/cocoJsonSaver.hpp | 11 +- .../openpose/filestream/wCocoJsonSaver.hpp | 2 +- .../openpose/pose/bodyPartConnectorBase.hpp | 10 +- .../openpose/pose/bodyPartConnectorCaffe.hpp | 7 +- include/openpose/pose/poseExtractor.hpp | 3 + include/openpose/pose/poseParameters.hpp | 4 +- include/openpose/pose/wPoseExtractor.hpp | 1 + include/openpose/utilities/headers.hpp | 1 + include/openpose/utilities/keypoint.hpp | 6 +- include/openpose/utilities/standard.hpp | 31 ++++ include/openpose/wrapper/wrapper.hpp | 1 + src/openpose/core/datum.cpp | 5 + src/openpose/core/netCaffe.cpp | 17 +- src/openpose/core/resizeAndMergeCaffe.cpp | 21 ++- src/openpose/face/faceDetectorOpenCV.cpp | 12 +- src/openpose/face/faceExtractorCaffe.cpp | 2 +- src/openpose/filestream/cocoJsonSaver.cpp | 13 +- src/openpose/gui/gui.cpp | 2 +- src/openpose/hand/handExtractorCaffe.cpp | 2 +- src/openpose/pose/bodyPartConnectorBase.cpp | 157 ++++++++++-------- src/openpose/pose/bodyPartConnectorBase.cu | 6 +- src/openpose/pose/bodyPartConnectorCaffe.cpp | 7 +- src/openpose/pose/poseExtractor.cpp | 24 ++- src/openpose/pose/poseExtractorCaffe.cpp | 41 ++--- src/openpose/pose/poseGpuRenderer.cpp | 3 + src/openpose/utilities/openCv.cpp | 39 +++-- windows/OpenPose/OpenPose.vcxproj | 1 + windows/OpenPose/OpenPose.vcxproj.filters | 3 + .../OpenPose3DReconstruction.vcxproj | 4 +- windows/OpenPoseDemo/OpenPoseDemo.vcxproj | 4 +- .../1_custom_post_processing.vcxproj | 4 +- .../TutorialPose/1_extract_from_image.vcxproj | 4 +- ...extract_pose_or_heatmat_from_image.vcxproj | 4 +- .../1_openpose_read_and_display.vcxproj | 4 +- .../2_user_processing_function.vcxproj | 4 +- ...3_user_input_processing_and_output.vcxproj | 4 +- ..._input_processing_output_and_datum.vcxproj | 4 +- .../1_user_asynchronous_output.vcxproj | 4 +- .../2_user_synchronous.vcxproj | 4 +- .../3_user_asynchronous.vcxproj | 4 +- 46 files changed, 312 insertions(+), 209 deletions(-) create mode 100644 include/openpose/utilities/standard.hpp diff --git a/3rdparty/caffe/install_caffe_if_cuda8.sh b/3rdparty/caffe/install_caffe_if_cuda8.sh index b7a1f989..0645d172 100755 --- a/3rdparty/caffe/install_caffe_if_cuda8.sh +++ b/3rdparty/caffe/install_caffe_if_cuda8.sh @@ -57,10 +57,11 @@ sudo apt-get --assume-yes install --no-install-recommends libboost-all-dev sudo apt-get --assume-yes install libgflags-dev libgoogle-glog-dev liblmdb-dev # fi # Python libs -sudo apt-get --assume-yes install python-setuptools python-dev build-essential -sudo easy_install pip -sudo -H pip install --upgrade numpy protobuf +sudo apt-get --assume-yes install python-setuptools python-pip python-dev build-essential sudo apt-get install python-numpy +sudo easy_install pip +sudo -H pip install numpy protobuf +# sudo -H pip install --upgrade numpy protobuf sudo ldconfig # OpenCV 2.4 # sudo apt-get --assume-yes install libopencv-dev diff --git a/doc/installation.md b/doc/installation.md index 5332b01f..8194edb7 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -57,7 +57,7 @@ Recommended installation method. It is simpler and it offers many more customiza ### Installation - Script Compilation **Highly important**: This script only works with CUDA 8 and Ubuntu 14 or 16. Otherwise, see [doc/installation_cmake.md](installation_cmake.md) or [Installation - Manual Compilation](#installation---manual-compilation). 1. Required: CUDA, cuDNN, OpenCV and Atlas must be already installed on your machine. - 1. [CUDA](https://developer.nvidia.com/cuda-downloads) must be installed. You should reboot your machine after installing CUDA. + 1. [CUDA](https://developer.nvidia.com/cuda-80-ga2-download-archive) must be installed. You should reboot your machine after installing CUDA. 2. [cuDNN](https://developer.nvidia.com/cudnn): Once you have downloaded it, just unzip it and copy (merge) the contents on the CUDA folder, e.g. `/usr/local/cuda-8.0/`. Note: We found OpenPose working ~10% faster with cuDNN 5.1 compared to cuDNN 6. Otherwise, check [Compiling without cuDNN](#compiling-without-cudnn). 3. OpenCV can be installed with `apt-get install libopencv-dev`. If you have compiled OpenCV 3 by your own, follow [Manual Compilation](#manual-compilation). After both Makefile.config files have been generated, edit them and uncomment the line `# OPENCV_VERSION := 3`. You might alternatively modify all `Makefile.config.UbuntuXX` files and then run the scripts in step 2. 4. In addition, OpenCV 3 does not incorporate the `opencv_contrib` module by default. Assuming you have OpenCV 3 compiled with the contrib module and you want to use it, append `opencv_contrib` at the end of the line `LIBRARIES += opencv_core opencv_highgui opencv_imgproc` in the `Makefile` file. @@ -134,7 +134,7 @@ You just need to remove the OpenPose folder, by default called `openpose/`. E.g. ### Installation - Library 1. Install the pre-requisites: 1. Microsoft Visual Studio (VS) 2015 Enterprise Update 3. If Visual Studio 2017 Community is desired, we do not support it, but it might be compiled by firstly [enabling CUDA 8.0 in VS2017](https://stackoverflow.com/questions/43745099/using-cuda-with-visual-studio-2017?answertab=active#tab-top). VS Enterprise Update 1 will give some compiler errors and VS 2015 Community has not been tested. - 2. [CUDA 8](https://developer.nvidia.com/cuda-downloads): Install it on the default location, `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0`. Otherwise, modify the Visual Studio project solution accordingly. Install CUDA 8.0 after Visual Studio 2015 is installed to assure that the CUDA installation will generate all necessary files for VS. If CUDA was already installed, re-install it after installing VS! + 2. [CUDA 8](https://developer.nvidia.com/cuda-80-ga2-download-archive): Install it on the default location, `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0`. Otherwise, modify the Visual Studio project solution accordingly. Install CUDA 8.0 after Visual Studio 2015 is installed to assure that the CUDA installation will generate all necessary files for VS. If CUDA was already installed, re-install it after installing VS! 3. [cuDNN 5.1](https://developer.nvidia.com/cudnn): Once you have downloaded it, just unzip it and copy (merge) the contents on the CUDA folder, `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0`. 2. Download the OpenPose dependencies and models (body, face and hand models) by double-clicking on `{openpose_path}\windows\download_3rdparty_and_models.bat`. Alternatively, you might prefer to download them manually: - Models: diff --git a/doc/release_notes.md b/doc/release_notes.md index 22b8fff5..f1ad62bf 100644 --- a/doc/release_notes.md +++ b/doc/release_notes.md @@ -113,7 +113,7 @@ OpenPose Library - Release Notes -## Current version (future OpenPose 2.0.0alpha) +## Current version (future OpenPose 1.2.0alpha) 1. Main improvements: 1. Added IP camera support. 2. Output images can have the input size, OpenPose able to change its size for each image and not required fixed size anymore. @@ -128,7 +128,7 @@ OpenPose Library - Release Notes 8. Added example for OpenPose for user asynchronous output and cleaned all `tutorial_wrapper/` examples. 9. Added `-1` option for `net_resolution` in order to auto-select the best possible aspect ratio given the user input. 10. Net resolution can be dynamically changed (e.g. for images with different size). - 11. Added example to add functionality to OpenPose. + 11. Added example to add functionality/modules to OpenPose. 2. Functions or parameters renamed: 1. OpenPose able to change its size and initial size dynamically: 1. Flag `resolution` renamed as `output_resolution`. @@ -140,5 +140,6 @@ OpenPose Library - Release Notes 1. Changed several functions on `core/`, `pose/`, `face/`, and `hand/` modules. 3. `CPU_ONLY` changed by `USE_CUDA` to keep format. 3. Main bugs fixed: - 1. Ubuntu installer script now works even if Python pip was not installed previously. - 2. Flags to set first and last frame as well as jumping frames backward and forward now works on image directory reader. + 1. Scaling resize issue fixed: ~1-pixel offset due to not considering 0-based indexes. + 2. Ubuntu installer script now works even if Python pip was not installed previously. + 3. Flags to set first and last frame as well as jumping frames backward and forward now works on image directory reader. diff --git a/examples/tests/pose_accuracy_coco_test.sh b/examples/tests/pose_accuracy_coco_test.sh index c68556ea..903ebb99 100755 --- a/examples/tests/pose_accuracy_coco_test.sh +++ b/examples/tests/pose_accuracy_coco_test.sh @@ -22,13 +22,15 @@ OP_BIN=./build/examples/openpose/openpose.bin # 1 scale $OP_BIN --image_dir $IMAGE_FOLDER --write_coco_json ${JSON_FOLDER}1.json --no_display --render_pose 0 --frame_last 3558 -# --output_resolution "1280x720" + + # 1 scale - Debugging +# $OP_BIN --image_dir $IMAGE_FOLDER --write_coco_json ${JSON_FOLDER}1.json --no_display --frame_last 3558 --write_images ~/Desktop/CppValidation/ # # 3 scales -# $OP_BIN --image_dir $IMAGE_FOLDER --write_coco_json ${JSON_FOLDER}1_3.json --no_display --render_pose 0 --scale_number 3 --scale_gap 0.25 --frame_last 3558 --output_resolution "1280x720" +# $OP_BIN --image_dir $IMAGE_FOLDER --write_coco_json ${JSON_FOLDER}1_3.json --no_display --render_pose 0 --scale_number 3 --scale_gap 0.25 --frame_last 3558 # # 4 scales -# $OP_BIN --num_gpu 1 --image_dir $IMAGE_FOLDER --write_coco_json ${JSON_FOLDER}1_4.json --no_display --render_pose 0 --num_gpu 1 --scale_number 4 --scale_gap 0.25 --net_resolution "1312x736" --frame_last 3558 --output_resolution "1280x720" +# $OP_BIN --num_gpu 1 --image_dir $IMAGE_FOLDER --write_coco_json ${JSON_FOLDER}1_4.json --no_display --render_pose 0 --num_gpu 1 --scale_number 4 --scale_gap 0.25 --net_resolution "1312x736" --frame_last 3558 # Debugging - Rendered frames saved # $OP_BIN --image_dir $IMAGE_FOLDER --write_images ${JSON_FOLDER}frameOutput --no_display diff --git a/include/openpose/core/datum.hpp b/include/openpose/core/datum.hpp index d1dbdfc6..d2840ddb 100644 --- a/include/openpose/core/datum.hpp +++ b/include/openpose/core/datum.hpp @@ -59,11 +59,20 @@ namespace op /** * Body pose (x,y,score) locations for each person in the image. * It has been resized to the desired output resolution (e.g. `resolution` flag in the demo). - * If outputData is empty, then cvOutputData will also be empty. * Size: #people x #body parts (e.g. 18 for COCO or 15 for MPI) x 3 ((x,y) coordinates + score) */ Array poseKeypoints; + /** + * Body pose global confidence/score for each person in the image. + * It does not only consider the score of each body keypoint, but also the score of each PAF association. + * Optimized for COCO evaluation metric. + * It will highly penalyze people with missing body parts (e.g. cropped people on the borders of the image). + * If poseKeypoints is empty, then poseScores will also be empty. + * Size: #people + */ + Array poseScores; + /** * Body pose heatmaps (body parts, background and/or PAFs) for the whole image. * This parameters is by default empty and disabled for performance. Each group (body parts, background and diff --git a/include/openpose/core/resizeAndMergeCaffe.hpp b/include/openpose/core/resizeAndMergeCaffe.hpp index c7f700ca..0d92545d 100644 --- a/include/openpose/core/resizeAndMergeCaffe.hpp +++ b/include/openpose/core/resizeAndMergeCaffe.hpp @@ -24,7 +24,7 @@ namespace op virtual void LayerSetUp(const std::vector*>& bottom, const std::vector*>& top); virtual void Reshape(const std::vector*>& bottom, const std::vector*>& top, - const float factor, const bool mergeFirstDimension = true); + const float netFactor, const float scaleFactor, const bool mergeFirstDimension = true); virtual inline const char* type() const { return "ResizeAndMerge"; } diff --git a/include/openpose/filestream/cocoJsonSaver.hpp b/include/openpose/filestream/cocoJsonSaver.hpp index a0f0c88e..cee43c0a 100644 --- a/include/openpose/filestream/cocoJsonSaver.hpp +++ b/include/openpose/filestream/cocoJsonSaver.hpp @@ -7,20 +7,23 @@ namespace op { /** - * The CocoJsonSaver class creates a COCO validation json file with details about the processed images. It inherits from Recorder. + * The CocoJsonSaver class creates a COCO validation json file with details about the processed images. It + * inherits from Recorder. */ class OP_API CocoJsonSaver { public: /** - * This constructor of CocoJsonSaver extends the Recorder::Recorder(const std::string & filePathToSave) constructor. - * @param filePathToSave const std::string parameter with the final file path where the generated json file will be saved. + * This constructor of CocoJsonSaver extends the Recorder::Recorder(const std::string & filePathToSave) + * constructor. + * @param filePathToSave const std::string parameter with the final file path where the generated json file + * will be saved. */ explicit CocoJsonSaver(const std::string& filePathToSave, const bool humanReadable = true); ~CocoJsonSaver(); - void record(const Array& poseKeypoints, const std::string& imageName); + void record(const Array& poseKeypoints, const Array& poseScores, const std::string& imageName); private: JsonOfstream mJsonOfstream; diff --git a/include/openpose/filestream/wCocoJsonSaver.hpp b/include/openpose/filestream/wCocoJsonSaver.hpp index 79b79757..9818e3a5 100644 --- a/include/openpose/filestream/wCocoJsonSaver.hpp +++ b/include/openpose/filestream/wCocoJsonSaver.hpp @@ -60,7 +60,7 @@ namespace op // T* to T const auto& tDatum = tDatums->at(0); // Record json in COCO format - spCocoJsonSaver->record(tDatum.poseKeypoints, tDatum.name); + spCocoJsonSaver->record(tDatum.poseKeypoints, tDatum.poseScores, tDatum.name); // Profiling speed Profiler::timerEnd(profilerKey); Profiler::printAveragedTimeMsOnIterationX(profilerKey, __LINE__, __FUNCTION__, __FILE__); diff --git a/include/openpose/pose/bodyPartConnectorBase.hpp b/include/openpose/pose/bodyPartConnectorBase.hpp index b6265aa3..cfc6de51 100644 --- a/include/openpose/pose/bodyPartConnectorBase.hpp +++ b/include/openpose/pose/bodyPartConnectorBase.hpp @@ -7,15 +7,15 @@ namespace op { template - OP_API void connectBodyPartsCpu(Array& poseKeypoints, const T* const heatMapPtr, const T* const peaksPtr, - const PoseModel poseModel, const Point& heatMapSize, const int maxPeaks, - const int interMinAboveThreshold, const T interThreshold, const int minSubsetCnt, - const T minSubsetScore, const T scaleFactor = 1.f); + OP_API void connectBodyPartsCpu(Array& poseKeypoints, Array& poseScores, const T* const heatMapPtr, + const T* const peaksPtr, const PoseModel poseModel, const Point& heatMapSize, + const int maxPeaks, const T interMinAboveThreshold, const T interThreshold, + const int minSubsetCnt, const T minSubsetScore, const T scaleFactor = 1.f); template OP_API void connectBodyPartsGpu(Array& poseKeypoints, T* posePtr, const T* const heatMapPtr, const T* const peaksPtr, const PoseModel poseModel, const Point& heatMapSize, - const int maxPeaks, const int interMinAboveThreshold, const T interThreshold, + const int maxPeaks, const T interMinAboveThreshold, const T interThreshold, const int minSubsetCnt, const T minSubsetScore, const T scaleFactor = 1.f); } diff --git a/include/openpose/pose/bodyPartConnectorCaffe.hpp b/include/openpose/pose/bodyPartConnectorCaffe.hpp index 241270c1..1b46e967 100644 --- a/include/openpose/pose/bodyPartConnectorCaffe.hpp +++ b/include/openpose/pose/bodyPartConnectorCaffe.hpp @@ -30,7 +30,7 @@ namespace op void setPoseModel(const PoseModel poseModel); - void setInterMinAboveThreshold(const int interMinAboveThreshold); + void setInterMinAboveThreshold(const T interMinAboveThreshold); void setInterThreshold(const T interThreshold); @@ -40,7 +40,8 @@ namespace op void setScaleNetToOutput(const T scaleNetToOutput); - virtual void Forward_cpu(const std::vector*>& bottom, Array& poseKeypoints); + virtual void Forward_cpu(const std::vector*>& bottom, Array& poseKeypoints, + Array& poseScores); virtual void Forward_gpu(const std::vector*>& bottom, const std::vector*>& top, Array& poseKeypoints); @@ -53,7 +54,7 @@ namespace op private: PoseModel mPoseModel; - int mInterMinAboveThreshold; + T mInterMinAboveThreshold; T mInterThreshold; int mMinSubsetCnt; T mMinSubsetScore; diff --git a/include/openpose/pose/poseExtractor.hpp b/include/openpose/pose/poseExtractor.hpp index a15afadc..ae6fac59 100644 --- a/include/openpose/pose/poseExtractor.hpp +++ b/include/openpose/pose/poseExtractor.hpp @@ -35,6 +35,8 @@ namespace op Array getPoseKeypoints() const; + Array getPoseScores() const; + float getScaleNetToOutput() const; double get(const PoseProperty property) const; @@ -47,6 +49,7 @@ namespace op const PoseModel mPoseModel; Point mNetOutputSize; Array mPoseKeypoints; + Array mPoseScores; float mScaleNetToOutput; void checkThread() const; diff --git a/include/openpose/pose/poseParameters.hpp b/include/openpose/pose/poseParameters.hpp index 0035f77b..9b51140e 100644 --- a/include/openpose/pose/poseParameters.hpp +++ b/include/openpose/pose/poseParameters.hpp @@ -287,8 +287,8 @@ namespace op const std::array POSE_DEFAULT_NMS_THRESHOLD{ 0.05f, 0.6f, 0.3f, 0.05f, 0.05f, 0.05f }; - const std::array POSE_DEFAULT_CONNECT_INTER_MIN_ABOVE_THRESHOLD{ - 9, 8, 8, 9, 9, 9 + const std::array POSE_DEFAULT_CONNECT_INTER_MIN_ABOVE_THRESHOLD{ + 0.95f, 0.95f, 0.95f, 0.95f, 0.95f, 0.95f }; const std::array POSE_DEFAULT_CONNECT_INTER_THRESHOLD{ 0.05f, 0.01f, 0.01f, 0.05f, 0.05f, 0.05f diff --git a/include/openpose/pose/wPoseExtractor.hpp b/include/openpose/pose/wPoseExtractor.hpp index b27a2708..727b9984 100644 --- a/include/openpose/pose/wPoseExtractor.hpp +++ b/include/openpose/pose/wPoseExtractor.hpp @@ -63,6 +63,7 @@ namespace op tDatum.scaleInputToNetInputs); tDatum.poseHeatMaps = spPoseExtractor->getHeatMaps().clone(); tDatum.poseKeypoints = spPoseExtractor->getPoseKeypoints().clone(); + tDatum.poseScores = spPoseExtractor->getPoseScores().clone(); tDatum.scaleNetToOutput = spPoseExtractor->getScaleNetToOutput(); } // Profiling speed diff --git a/include/openpose/utilities/headers.hpp b/include/openpose/utilities/headers.hpp index b89ae6e1..ae91070a 100644 --- a/include/openpose/utilities/headers.hpp +++ b/include/openpose/utilities/headers.hpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #endif // OPENPOSE_UTILITIES_HEADERS_HPP diff --git a/include/openpose/utilities/keypoint.hpp b/include/openpose/utilities/keypoint.hpp index 23dda229..aaa025fc 100644 --- a/include/openpose/utilities/keypoint.hpp +++ b/include/openpose/utilities/keypoint.hpp @@ -21,11 +21,13 @@ namespace op const float thicknessCircleRatio, const float thicknessLineRatioWRTCircle, const float threshold); - OP_API Rectangle getKeypointsRectangle(const Array& keypoints, const int person, const int numberKeypoints, const float threshold); + OP_API Rectangle getKeypointsRectangle(const Array& keypoints, const int person, + const int numberKeypoints, const float threshold); OP_API float getAverageScore(const Array& keypoints, const int person); - OP_API float getKeypointsArea(const Array& keypoints, const int person, const int numberKeypoints, const float threshold); + OP_API float getKeypointsArea(const Array& keypoints, const int person, const int numberKeypoints, + const float threshold); OP_API int getBiggestPerson(const Array& keypoints, const float threshold); } diff --git a/include/openpose/utilities/standard.hpp b/include/openpose/utilities/standard.hpp new file mode 100644 index 00000000..f59d97ba --- /dev/null +++ b/include/openpose/utilities/standard.hpp @@ -0,0 +1,31 @@ +#ifndef OPENPOSE_UTILITIES_STANDARD_HPP +#define OPENPOSE_UTILITIES_STANDARD_HPP + +#include + +namespace op +{ + template + bool vectorsAreEqual(const std::vector& vectorA, const std::vector& vectorB) + { + try + { + if (vectorA.size() != vectorB.size()) + return false; + else + { + for (auto i = 0u ; i < vectorA.size() ; i++) + if (vectorA[i] != vectorB[i]) + return false; + return true; + } + } + catch (const std::exception& e) + { + error(e.what(), __LINE__, __FUNCTION__, __FILE__); + return false; + } + } +} + +#endif // OPENPOSE_UTILITIES_STANDARD_HPP diff --git a/include/openpose/wrapper/wrapper.hpp b/include/openpose/wrapper/wrapper.hpp index c509d059..06ac0e8b 100644 --- a/include/openpose/wrapper/wrapper.hpp +++ b/include/openpose/wrapper/wrapper.hpp @@ -647,6 +647,7 @@ namespace op if (wrapperStructPose.renderMode == RenderMode::Cpu) { poseCpuRenderer = std::make_shared(wrapperStructPose.poseModel, + wrapperStructPose.renderThreshold, wrapperStructPose.blendOriginalFrame); cpuRenderers.emplace_back(std::make_shared>(poseCpuRenderer)); } diff --git a/src/openpose/core/datum.cpp b/src/openpose/core/datum.cpp index 08d13552..226be9f0 100644 --- a/src/openpose/core/datum.cpp +++ b/src/openpose/core/datum.cpp @@ -19,6 +19,7 @@ namespace op cvOutputData{datum.cvOutputData}, // Resulting Array data poseKeypoints{datum.poseKeypoints}, + poseScores{datum.poseScores}, poseHeatMaps{datum.poseHeatMaps}, faceRectangles{datum.faceRectangles}, faceKeypoints{datum.faceKeypoints}, @@ -48,6 +49,7 @@ namespace op cvOutputData = datum.cvOutputData; // Resulting Array data poseKeypoints = datum.poseKeypoints; + poseScores = datum.poseScores, poseHeatMaps = datum.poseHeatMaps, faceRectangles = datum.faceRectangles, faceKeypoints = datum.faceKeypoints, @@ -88,6 +90,7 @@ namespace op std::swap(cvOutputData, datum.cvOutputData); // Resulting Array data std::swap(poseKeypoints, datum.poseKeypoints); + std::swap(poseScores, datum.poseScores); std::swap(poseHeatMaps, datum.poseHeatMaps); std::swap(faceRectangles, datum.faceRectangles); std::swap(faceKeypoints, datum.faceKeypoints); @@ -119,6 +122,7 @@ namespace op std::swap(cvOutputData, datum.cvOutputData); // Resulting Array data std::swap(poseKeypoints, datum.poseKeypoints); + std::swap(poseScores, datum.poseScores); std::swap(poseHeatMaps, datum.poseHeatMaps); std::swap(faceRectangles, datum.faceRectangles); std::swap(faceKeypoints, datum.faceKeypoints); @@ -158,6 +162,7 @@ namespace op datum.cvOutputData = cvOutputData.clone(); // Resulting Array data datum.poseKeypoints = poseKeypoints.clone(); + datum.poseScores = poseScores.clone(); datum.poseHeatMaps = poseHeatMaps.clone(); datum.faceRectangles = faceRectangles; datum.faceKeypoints = faceKeypoints.clone(); diff --git a/src/openpose/core/netCaffe.cpp b/src/openpose/core/netCaffe.cpp index 73d11846..e2c52fd1 100644 --- a/src/openpose/core/netCaffe.cpp +++ b/src/openpose/core/netCaffe.cpp @@ -7,6 +7,7 @@ #endif #include #include +#include #include namespace op @@ -71,20 +72,6 @@ namespace op error(e.what(), __LINE__, __FUNCTION__, __FILE__); } } - - inline bool requiredReshapeNetCaffe(const std::vector& dimensionsA, const std::vector& dimensionsB) - { - try - { - return (dimensionsA[0] != dimensionsB[0] || dimensionsA[1] != dimensionsB[1] - || dimensionsA[2] != dimensionsB[2] || dimensionsA[3] != dimensionsB[3]); - } - catch (const std::exception& e) - { - error(e.what(), __LINE__, __FUNCTION__, __FILE__); - return false; - } - } #endif NetCaffe::NetCaffe(const std::string& caffeProto, const std::string& caffeTrainedModel, const int gpuId, @@ -157,7 +144,7 @@ namespace op error("The Array inputData must have 4 dimensions: [batch size, 3 (RGB), height, width].", __LINE__, __FUNCTION__, __FILE__); // Reshape Caffe net if required - if (requiredReshapeNetCaffe(upImpl->mNetInputSize4D, inputData.getSize())) + if (!vectorsAreEqual(upImpl->mNetInputSize4D, inputData.getSize())) { upImpl->mNetInputSize4D = inputData.getSize(); reshapeNetCaffe(upImpl->upCaffeNet.get(), inputData.getSize()); diff --git a/src/openpose/core/resizeAndMergeCaffe.cpp b/src/openpose/core/resizeAndMergeCaffe.cpp index 7d01d069..caa7a334 100644 --- a/src/openpose/core/resizeAndMergeCaffe.cpp +++ b/src/openpose/core/resizeAndMergeCaffe.cpp @@ -48,22 +48,27 @@ namespace op template void ResizeAndMergeCaffe::Reshape(const std::vector*>& bottom, - const std::vector*>& top, const float factor, + const std::vector*>& top, + const float netFactor, + const float scaleFactor, const bool mergeFirstDimension) { try { #ifdef USE_CAFFE - auto bottomBlob = bottom.at(0); - auto topBlob = top.at(0); - - // Top shape + // Data + const auto* bottomBlob = bottom.at(0); + auto* topBlob = top.at(0); + // Set top shape auto topShape = bottomBlob->shape(); topShape[0] = (mergeFirstDimension ? 1 : bottomBlob->shape(0)); - topShape[2] = intRound(topShape[2] * factor); - topShape[3] = intRound(topShape[3] * factor); + // -1 and later +1 to take into account that we are using 0-based index + // E.g. 100x100 image --> 200x200 --> 0-99 to 0-199 --> scale = 199/99 (not 2!) + // E.g. 101x101 image --> 201x201 --> scale = 2 + // Test: pixel 0 --> 0, pixel 99 (ex 1) --> 199, pixel 100 (ex 2) --> 200 + topShape[2] = intRound((topShape[2]*netFactor - 1.f) * scaleFactor + 1); + topShape[3] = intRound((topShape[3]*netFactor - 1.f) * scaleFactor + 1); topBlob->Reshape(topShape); - // Array sizes mTopSize = std::array{topBlob->shape(0), topBlob->shape(1), topBlob->shape(2), topBlob->shape(3)}; diff --git a/src/openpose/face/faceDetectorOpenCV.cpp b/src/openpose/face/faceDetectorOpenCV.cpp index 0f69358a..1513d16b 100644 --- a/src/openpose/face/faceDetectorOpenCV.cpp +++ b/src/openpose/face/faceDetectorOpenCV.cpp @@ -25,11 +25,11 @@ namespace op // Image to grey and pyrDown cv::Mat frameGray; cv::cvtColor(cvInputData, frameGray, cv::COLOR_BGR2GRAY); - auto multiplier = 1; + auto multiplier = 1.f; while (frameGray.cols * frameGray.rows > 640*360) { cv::pyrDown(frameGray, frameGray); - multiplier *= 2; + multiplier *= 2.f; } // Face detection - Example from: // http://docs.opencv.org/2.4/doc/tutorials/objdetect/cascade_classifier/cascade_classifier.html @@ -40,10 +40,10 @@ namespace op for(auto i = 0u; i < detectedFaces.size(); i++) { // Enlarge detected rectangle by 1.5x, so that it covers the whole face - faceRectangles.at(i).x = detectedFaces.at(i).x - 0.25*detectedFaces.at(i).width; - faceRectangles.at(i).y = detectedFaces.at(i).y - 0.25*detectedFaces.at(i).height; - faceRectangles.at(i).width = 1.5*detectedFaces.at(i).width; - faceRectangles.at(i).height = 1.5*detectedFaces.at(i).height; + faceRectangles.at(i).x = detectedFaces.at(i).x - 0.25f*detectedFaces.at(i).width; + faceRectangles.at(i).y = detectedFaces.at(i).y - 0.25f*detectedFaces.at(i).height; + faceRectangles.at(i).width = 1.5f*detectedFaces.at(i).width; + faceRectangles.at(i).height = 1.5f*detectedFaces.at(i).height; faceRectangles.at(i) *= multiplier; } return faceRectangles; diff --git a/src/openpose/face/faceExtractorCaffe.cpp b/src/openpose/face/faceExtractorCaffe.cpp index 60a631f9..372ff4e1 100644 --- a/src/openpose/face/faceExtractorCaffe.cpp +++ b/src/openpose/face/faceExtractorCaffe.cpp @@ -80,7 +80,7 @@ namespace op // HeatMaps extractor blob and layer const bool mergeFirstDimension = true; resizeAndMergeCaffe->Reshape({caffeNetOutputBlob.get()}, {heatMapsBlob.get()}, - FACE_CCN_DECREASE_FACTOR, mergeFirstDimension); + FACE_CCN_DECREASE_FACTOR, 1.f, mergeFirstDimension); // Pose extractor blob and layer maximumCaffe->Reshape({heatMapsBlob.get()}, {peaksBlob.get()}); // Cuda check diff --git a/src/openpose/filestream/cocoJsonSaver.cpp b/src/openpose/filestream/cocoJsonSaver.cpp index 1f4f4a9f..ad87410a 100644 --- a/src/openpose/filestream/cocoJsonSaver.cpp +++ b/src/openpose/filestream/cocoJsonSaver.cpp @@ -28,10 +28,14 @@ namespace op } } - void CocoJsonSaver::record(const Array& poseKeypoints, const std::string& imageName) + void CocoJsonSaver::record(const Array& poseKeypoints, const Array& poseScores, + const std::string& imageName) { try { + // Security checks + if ((size_t)poseKeypoints.getSize(0) != poseScores.getVolume()) + error("Dimension mismatch between poseKeypoints and poseScores.", __LINE__, __FUNCTION__, __FILE__); const auto numberPeople = poseKeypoints.getSize(0); const auto numberBodyParts = poseKeypoints.getSize(1); const auto imageId = getLastNumber(imageName); @@ -75,11 +79,12 @@ namespace op for (auto bodyPart = 0u ; bodyPart < indexesInCocoOrder.size() ; bodyPart++) { const auto finalIndex = 3*(person*numberBodyParts + indexesInCocoOrder.at(bodyPart)); - mJsonOfstream.plainText(poseKeypoints[finalIndex] + 0.5f); + mJsonOfstream.plainText(poseKeypoints[finalIndex]); mJsonOfstream.comma(); - mJsonOfstream.plainText(poseKeypoints[finalIndex+1] + 0.5f); + mJsonOfstream.plainText(poseKeypoints[finalIndex+1]); mJsonOfstream.comma(); mJsonOfstream.plainText((poseKeypoints[finalIndex+2] > 0.f ? 1 : 0)); + // mJsonOfstream.plainText(poseKeypoints[finalIndex+2]); // For debugging if (bodyPart < indexesInCocoOrder.size() - 1u) mJsonOfstream.comma(); } @@ -88,7 +93,7 @@ namespace op // score mJsonOfstream.key("score"); - mJsonOfstream.plainText("0.0"); + mJsonOfstream.plainText(poseScores[person]); mJsonOfstream.objectClose(); } diff --git a/src/openpose/gui/gui.cpp b/src/openpose/gui/gui.cpp index a96a0b30..56c8d502 100644 --- a/src/openpose/gui/gui.cpp +++ b/src/openpose/gui/gui.cpp @@ -97,7 +97,7 @@ namespace op poseExtractor->increase(PoseProperty::ConnectInterThreshold, 0.005f * (castedKey=='[' ? -1 : 1)); else if (castedKey=='{' || castedKey=='}') for (auto& poseExtractor : poseExtractors) - poseExtractor->increase(PoseProperty::ConnectInterMinAboveThreshold, (castedKey=='{' ? -1 : 1)); + poseExtractor->increase(PoseProperty::ConnectInterMinAboveThreshold, (castedKey=='{' ? -0.1f : 0.1f)); else if (castedKey==';' || castedKey=='\'') for (auto& poseExtractor : poseExtractors) poseExtractor->increase(PoseProperty::ConnectMinSubsetCnt, (castedKey==';' ? -1 : 1)); diff --git a/src/openpose/hand/handExtractorCaffe.cpp b/src/openpose/hand/handExtractorCaffe.cpp index 6c73610b..45861ed6 100644 --- a/src/openpose/hand/handExtractorCaffe.cpp +++ b/src/openpose/hand/handExtractorCaffe.cpp @@ -166,7 +166,7 @@ namespace op // HeatMaps extractor blob and layer const bool mergeFirstDimension = true; resizeAndMergeCaffe->Reshape({caffeNetOutputBlob.get()}, {heatMapsBlob.get()}, - HAND_CCN_DECREASE_FACTOR, mergeFirstDimension); + HAND_CCN_DECREASE_FACTOR, 1.f, mergeFirstDimension); // Pose extractor blob and layer maximumCaffe->Reshape({heatMapsBlob.get()}, {peaksBlob.get()}); // Cuda check diff --git a/src/openpose/pose/bodyPartConnectorBase.cpp b/src/openpose/pose/bodyPartConnectorBase.cpp index d1784977..31ac09a5 100644 --- a/src/openpose/pose/bodyPartConnectorBase.cpp +++ b/src/openpose/pose/bodyPartConnectorBase.cpp @@ -6,10 +6,10 @@ namespace op { template - void connectBodyPartsCpu(Array& poseKeypoints, const T* const heatMapPtr, const T* const peaksPtr, - const PoseModel poseModel, const Point& heatMapSize, const int maxPeaks, - const int interMinAboveThreshold, const T interThreshold, const int minSubsetCnt, - const T minSubsetScore, const T scaleFactor) + void connectBodyPartsCpu(Array& poseKeypoints, Array& poseScores, const T* const heatMapPtr, + const T* const peaksPtr, const PoseModel poseModel, const Point& heatMapSize, + const int maxPeaks, const T interMinAboveThreshold, const T interThreshold, + const int minSubsetCnt, const T minSubsetScore, const T scaleFactor) { try { @@ -36,7 +36,7 @@ namespace op const auto nA = intRound(candidateA[0]); const auto nB = intRound(candidateB[0]); - // add parts into the subset in special case + // Add parts into the subset in special case if (nA == 0 || nB == 0) { // Change w.r.t. other @@ -142,7 +142,6 @@ namespace op else // if (nA != 0 && nB != 0) { std::vector> temp; - const auto numInter = 10; const auto* const mapX = heatMapPtr + mapIdx[2*pairIndex] * heatMapOffset; const auto* const mapY = heatMapPtr + mapIdx[2*pairIndex+1] * heatMapOffset; for (auto i = 1; i <= nA; i++) @@ -151,6 +150,8 @@ namespace op { const auto dX = candidateB[j*3] - candidateA[i*3]; const auto dY = candidateB[j*3+1] - candidateA[i*3+1]; + const auto dMax = fastMax(std::abs(dX), std::abs(dY)); + const auto numberPointsInLine = fastMax(5, fastMin(25, intRound(std::sqrt(5*dMax)))); const auto normVec = T(std::sqrt( dX*dX + dY*dY )); // If the peaksPtr are coincident. Don't connect them. if (normVec > 1e-6) @@ -162,10 +163,12 @@ namespace op auto sum = 0.; auto count = 0; - for (auto lm=0; lm < numInter; lm++) + const auto dXInLine = dX/numberPointsInLine; + const auto dYInLine = dY/numberPointsInLine; + for (auto lm = 0; lm < numberPointsInLine; lm++) { - const auto mX = fastMin(heatMapSize.x-1, intRound(sX + lm*dX/numInter)); - const auto mY = fastMin(heatMapSize.y-1, intRound(sY + lm*dY/numInter)); + const auto mX = fastMin(heatMapSize.x-1, intRound(sX + lm*dXInLine)); + const auto mY = fastMin(heatMapSize.y-1, intRound(sY + lm*dYInLine)); checkGE(mX, 0, "", __LINE__, __FUNCTION__, __FILE__); checkGE(mY, 0, "", __LINE__, __FUNCTION__, __FILE__); const auto idx = mY * heatMapSize.x + mX; @@ -178,7 +181,7 @@ namespace op } // parts score + connection score - if (count > interMinAboveThreshold) + if (count/(float)numberPointsInLine > interMinAboveThreshold) temp.emplace_back(std::make_tuple(sum/count, i, j)); } } @@ -190,7 +193,6 @@ namespace op std::sort(temp.begin(), temp.end(), std::greater>()); std::vector> connectionK; - const auto minAB = fastMin(nA, nB); std::vector occurA(nA, 0); std::vector occurB(nB, 0); @@ -214,63 +216,63 @@ namespace op } // Cluster all the body part candidates into subset based on the part connection - // initialize first body part connection 15&16 - if (pairIndex==0) + if (!connectionK.empty()) { - for (const auto connectionKI : connectionK) + // initialize first body part connection 15&16 + if (pairIndex==0) { - std::vector rowVector(numberBodyParts+3, 0); - const auto indexA = std::get<0>(connectionKI); - const auto indexB = std::get<1>(connectionKI); - const auto score = std::get<2>(connectionKI); - rowVector[bodyPartPairs[0]] = indexA; - rowVector[bodyPartPairs[1]] = indexB; - rowVector[subsetCounterIndex] = 2; - // add the score of parts and the connection - const auto subsetScore = peaksPtr[indexA] + peaksPtr[indexB] + score; - subset.emplace_back(std::make_pair(rowVector, subsetScore)); - } - } - // Add ears connections (in case person is looking to opposite direction to camera) - else if (((poseModel == PoseModel::COCO_18 - || poseModel == PoseModel::BODY_18) && (pairIndex==17 || pairIndex==18)) - || (poseModel == PoseModel::BODY_19 && (pairIndex==18 || pairIndex==19)) - || (poseModel == PoseModel::BODY_23 && (pairIndex==22 || pairIndex==23))) - { - for (const auto& connectionKI : connectionK) - { - const auto indexA = std::get<0>(connectionKI); - const auto indexB = std::get<1>(connectionKI); - for (auto& subsetJ : subset) + for (const auto connectionKI : connectionK) { - auto& subsetJFirst = subsetJ.first[bodyPartA]; - auto& subsetJFirstPlus1 = subsetJ.first[bodyPartB]; - if (subsetJFirst == indexA && subsetJFirstPlus1 == 0) - subsetJFirstPlus1 = indexB; - else if (subsetJFirstPlus1 == indexB && subsetJFirst == 0) - subsetJFirst = indexA; + std::vector rowVector(numberBodyParts+3, 0); + const auto indexA = std::get<0>(connectionKI); + const auto indexB = std::get<1>(connectionKI); + const auto score = std::get<2>(connectionKI); + rowVector[bodyPartPairs[0]] = indexA; + rowVector[bodyPartPairs[1]] = indexB; + rowVector[subsetCounterIndex] = 2; + // add the score of parts and the connection + const auto subsetScore = peaksPtr[indexA] + peaksPtr[indexB] + score; + subset.emplace_back(std::make_pair(rowVector, subsetScore)); } } - } - else - { - if (!connectionK.empty()) + // Add ears connections (in case person is looking to opposite direction to camera) + else if (((poseModel == PoseModel::COCO_18 + || poseModel == PoseModel::BODY_18) && (pairIndex==17 || pairIndex==18)) + || (poseModel == PoseModel::BODY_19 && (pairIndex==18 || pairIndex==19)) + || (poseModel == PoseModel::BODY_23 && (pairIndex==22 || pairIndex==23))) + { + for (const auto& connectionKI : connectionK) + { + const auto indexA = std::get<0>(connectionKI); + const auto indexB = std::get<1>(connectionKI); + for (auto& subsetJ : subset) + { + auto& subsetJFirst = subsetJ.first[bodyPartA]; + auto& subsetJFirstPlus1 = subsetJ.first[bodyPartB]; + if (subsetJFirst == indexA && subsetJFirstPlus1 == 0) + subsetJFirstPlus1 = indexB; + else if (subsetJFirstPlus1 == indexB && subsetJFirst == 0) + subsetJFirst = indexA; + } + } + } + else { // A is already in the subset, find its connection B - for (auto i = 0u; i < connectionK.size(); i++) + for (const auto& connectionKI : connectionK) { - const auto indexA = std::get<0>(connectionK[i]); - const auto indexB = std::get<1>(connectionK[i]); - const auto score = std::get<2>(connectionK[i]); + const auto indexA = std::get<0>(connectionKI); + const auto indexB = std::get<1>(connectionKI); + const auto score = std::get<2>(connectionKI); auto num = 0; - for (auto j = 0u; j < subset.size(); j++) + for (auto& subsetJ : subset) { - if (subset[j].first[bodyPartA] == indexA) + if (subsetJ.first[bodyPartA] == indexA) { - subset[j].first[bodyPartB] = indexB; + subsetJ.first[bodyPartB] = indexB; num++; - subset[j].first[subsetCounterIndex] = subset[j].first[subsetCounterIndex] + 1; - subset[j].second = subset[j].second + peaksPtr[indexB] + score; + subsetJ.first[subsetCounterIndex] = subsetJ.first[subsetCounterIndex] + 1; + subsetJ.second += peaksPtr[indexB] + score; } } // if can not find partA in the subset, create a new subset @@ -300,7 +302,7 @@ namespace op { const auto subsetCounter = subset[index].first[subsetCounterIndex]; const auto subsetScore = subset[index].second; - if (subsetCounter >= minSubsetCnt && (subsetScore/subsetCounter) > minSubsetScore) + if (subsetCounter >= minSubsetCnt && (subsetScore/subsetCounter) >= minSubsetScore) { numberPeople++; validSubsetIndexes.emplace_back(index); @@ -314,20 +316,30 @@ namespace op // Fill and return poseKeypoints if (numberPeople > 0) + { poseKeypoints.reset({numberPeople, (int)numberBodyParts, 3}); + poseScores.reset(numberPeople); + } else + { poseKeypoints.reset(); + poseScores.reset(); + } + const auto numberBodyPartsAndPAFs = numberBodyParts + numberBodyPartPairs; for (auto person = 0u ; person < validSubsetIndexes.size() ; person++) { - const auto& subsetI = subset[validSubsetIndexes[person]].first; + const auto& subsetPair = subset[validSubsetIndexes[person]]; + const auto& subsetI = subsetPair.first; for (auto bodyPart = 0u; bodyPart < numberBodyParts; bodyPart++) { const auto baseOffset = (person*numberBodyParts + bodyPart) * 3; const auto bodyPartIndex = subsetI[bodyPart]; if (bodyPartIndex > 0) { - poseKeypoints[baseOffset] = peaksPtr[bodyPartIndex-2] * scaleFactor; - poseKeypoints[baseOffset + 1] = peaksPtr[bodyPartIndex-1] * scaleFactor; + // Best results for 1 scale: x + 0, y + 0.5 + // +0.5 to both to keep Matlab format + poseKeypoints[baseOffset] = peaksPtr[bodyPartIndex-2] * scaleFactor + 0.5f; + poseKeypoints[baseOffset + 1] = peaksPtr[bodyPartIndex-1] * scaleFactor + 0.5f; poseKeypoints[baseOffset + 2] = peaksPtr[bodyPartIndex]; } else @@ -337,6 +349,7 @@ namespace op poseKeypoints[baseOffset + 2] = 0.f; } } + poseScores[person] = subsetPair.second / (float)(numberBodyPartsAndPAFs); } } catch (const std::exception& e) @@ -345,16 +358,16 @@ namespace op } } - template void connectBodyPartsCpu(Array& poseKeypoints, const float* const heatMapPtr, - const float* const peaksPtr, const PoseModel poseModel, - const Point& heatMapSize, const int maxPeaks, - const int interMinAboveThreshold, const float interThreshold, - const int minSubsetCnt, const float minSubsetScore, - const float scaleFactor); - template void connectBodyPartsCpu(Array& poseKeypoints, const double* const heatMapPtr, - const double* const peaksPtr, const PoseModel poseModel, - const Point& heatMapSize, const int maxPeaks, - const int interMinAboveThreshold, const double interThreshold, - const int minSubsetCnt, const double minSubsetScore, - const double scaleFactor); + template void connectBodyPartsCpu(Array& poseKeypoints, Array& poseScores, + const float* const heatMapPtr, const float* const peaksPtr, + const PoseModel poseModel, const Point& heatMapSize, + const int maxPeaks, const float interMinAboveThreshold, + const float interThreshold, const int minSubsetCnt, + const float minSubsetScore, const float scaleFactor); + template void connectBodyPartsCpu(Array& poseKeypoints, Array& poseScores, + const double* const heatMapPtr, const double* const peaksPtr, + const PoseModel poseModel, const Point& heatMapSize, + const int maxPeaks, const double interMinAboveThreshold, + const double interThreshold, const int minSubsetCnt, + const double minSubsetScore, const double scaleFactor); } diff --git a/src/openpose/pose/bodyPartConnectorBase.cu b/src/openpose/pose/bodyPartConnectorBase.cu index b865f9d4..a320362e 100644 --- a/src/openpose/pose/bodyPartConnectorBase.cu +++ b/src/openpose/pose/bodyPartConnectorBase.cu @@ -6,7 +6,7 @@ namespace op template void connectBodyPartsGpu(Array& poseKeypoints, T* posePtr, const T* const heatMapPtr, const T* const peaksPtr, const PoseModel poseModel, const Point& heatMapSize, const int maxPeaks, - const int interMinAboveThreshold, const T interThreshold, const int minSubsetCnt, + const T interMinAboveThreshold, const T interThreshold, const int minSubsetCnt, const T minSubsetScore, const T scaleFactor) { try @@ -35,11 +35,11 @@ namespace op template void connectBodyPartsGpu(Array& poseKeypoints, float* posePtr, const float* const heatMapPtr, const float* const peaksPtr, const PoseModel poseModel, const Point& heatMapSize, const int maxPeaks, - const int interMinAboveThreshold, const float interThreshold, + const float interMinAboveThreshold, const float interThreshold, const int minSubsetCnt, const float minSubsetScore, const float scaleFactor); template void connectBodyPartsGpu(Array& poseKeypoints, double* posePtr, const double* const heatMapPtr, const double* const peaksPtr, const PoseModel poseModel, const Point& heatMapSize, const int maxPeaks, - const int interMinAboveThreshold, const double interThreshold, + const double interMinAboveThreshold, const double interThreshold, const int minSubsetCnt, const double minSubsetScore, const double scaleFactor); } diff --git a/src/openpose/pose/bodyPartConnectorCaffe.cpp b/src/openpose/pose/bodyPartConnectorCaffe.cpp index d9e1bed7..867442f0 100644 --- a/src/openpose/pose/bodyPartConnectorCaffe.cpp +++ b/src/openpose/pose/bodyPartConnectorCaffe.cpp @@ -92,7 +92,7 @@ namespace op } template - void BodyPartConnectorCaffe::setInterMinAboveThreshold(const int interMinAboveThreshold) + void BodyPartConnectorCaffe::setInterMinAboveThreshold(const T interMinAboveThreshold) { try { @@ -157,7 +157,8 @@ namespace op } template - void BodyPartConnectorCaffe::Forward_cpu(const std::vector*>& bottom, Array& poseKeypoints) + void BodyPartConnectorCaffe::Forward_cpu(const std::vector*>& bottom, Array& poseKeypoints, + Array& poseScores) { try { @@ -166,7 +167,7 @@ namespace op const auto* const heatMapsPtr = heatMapsBlob->cpu_data(); // ~8.5ms / 114 const auto* const peaksPtr = bottom.at(1)->cpu_data(); // ~0.02ms const auto maxPeaks = mTopSize[1]; - connectBodyPartsCpu(poseKeypoints, heatMapsPtr, peaksPtr, mPoseModel, + connectBodyPartsCpu(poseKeypoints, poseScores, heatMapsPtr, peaksPtr, mPoseModel, Point{heatMapsBlob->shape(3), heatMapsBlob->shape(2)}, maxPeaks, mInterMinAboveThreshold, mInterThreshold, mMinSubsetCnt, mMinSubsetScore, mScaleNetToOutput); diff --git a/src/openpose/pose/poseExtractor.cpp b/src/openpose/pose/poseExtractor.cpp index 06b6dcdb..e5664be7 100644 --- a/src/openpose/pose/poseExtractor.cpp +++ b/src/openpose/pose/poseExtractor.cpp @@ -46,7 +46,7 @@ namespace op PoseExtractor::PoseExtractor(const PoseModel poseModel, const std::vector& heatMapTypes, const ScaleMode heatMapScale) : mPoseModel{poseModel}, - mNetOutputSize{0, 0}, + mNetOutputSize{0,0}, mHeatMapTypes{heatMapTypes}, mHeatMapScaleMode{heatMapScale} { @@ -103,15 +103,19 @@ namespace op Array heatMaps; if (!mHeatMapTypes.empty()) { + // Get heatmaps size + const auto heatMapSize = getHeatMapSize(); + // Allocate memory const auto numberHeatMapChannels = getNumberHeatMapChannels(mHeatMapTypes, mPoseModel); - heatMaps.reset({numberHeatMapChannels, mNetOutputSize.y, mNetOutputSize.x}); + heatMaps.reset({numberHeatMapChannels, heatMapSize[2], heatMapSize[3]}); // Copy memory const auto channelOffset = heatMaps.getVolume(1, 2); const auto volumeBodyParts = POSE_NUMBER_BODY_PARTS[(int)mPoseModel] * channelOffset; const auto volumePAFs = POSE_BODY_PART_PAIRS[(int)mPoseModel].size() * channelOffset; unsigned int totalOffset = 0u; + // Body parts if (heatMapTypesHas(mHeatMapTypes, HeatMapType::Parts)) { #ifdef USE_CUDA @@ -135,6 +139,7 @@ namespace op heatMaps[i] = fastTruncate(heatMaps[i]); totalOffset += (unsigned int)volumeBodyParts; } + // Background if (heatMapTypesHas(mHeatMapTypes, HeatMapType::Background)) { #ifdef USE_CUDA @@ -160,6 +165,7 @@ namespace op heatMapsPtr[i] = fastTruncate(heatMapsPtr[i]); totalOffset += (unsigned int)channelOffset; } + // PAFs if (heatMapTypesHas(mHeatMapTypes, HeatMapType::PAFs)) { #ifdef USE_CUDA @@ -216,6 +222,20 @@ namespace op } } + Array PoseExtractor::getPoseScores() const + { + try + { + checkThread(); + return mPoseScores; + } + catch (const std::exception& e) + { + error(e.what(), __LINE__, __FUNCTION__, __FILE__); + return Array{}; + } + } + float PoseExtractor::getScaleNetToOutput() const { try diff --git a/src/openpose/pose/poseExtractorCaffe.cpp b/src/openpose/pose/poseExtractorCaffe.cpp index fec86a60..34d21e6d 100644 --- a/src/openpose/pose/poseExtractorCaffe.cpp +++ b/src/openpose/pose/poseExtractorCaffe.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include namespace op @@ -17,11 +18,12 @@ namespace op struct PoseExtractorCaffe::ImplPoseExtractorCaffe { #ifdef USE_CAFFE - std::vector mNetInputSize4D; std::shared_ptr spNetCaffe; std::shared_ptr> spResizeAndMergeCaffe; std::shared_ptr> spNmsCaffe; std::shared_ptr> spBodyPartConnectorCaffe; + std::vector mNetInputSize4D; + std::vector mScaleInputToNetInputs; // Init with thread boost::shared_ptr> spCaffeNetOutputBlob; std::shared_ptr> spHeatMapsBlob; @@ -30,7 +32,6 @@ namespace op ImplPoseExtractorCaffe(const PoseModel poseModel, const int gpuId, const std::string& modelFolder, const bool enableGoogleLogging) : - mNetInputSize4D{0,0,0,0}, spNetCaffe{std::make_shared(modelFolder + POSE_PROTOTXT[(int)poseModel], modelFolder + POSE_TRAINED_MODEL[(int)poseModel], gpuId, enableGoogleLogging)}, @@ -56,9 +57,8 @@ namespace op try { // HeatMaps extractor blob and layer - UNUSED(scaleInputToNetInput); resizeAndMergeCaffe->Reshape({caffeNetOutputBlob.get()}, {heatMapsBlob.get()}, - POSE_CCN_DECREASE_FACTOR[(int)poseModel]); + POSE_CCN_DECREASE_FACTOR[(int)poseModel], 1.f/scaleInputToNetInput); // Pose extractor blob and layer nmsCaffe->Reshape({heatMapsBlob.get()}, {peaksBlob.get()}, POSE_MAX_PEAKS[(int)poseModel]); // Pose extractor blob and layer @@ -71,21 +71,6 @@ namespace op error(e.what(), __LINE__, __FUNCTION__, __FILE__); } } - - inline bool requiredReshapePoseExtractorCaffe(const std::vector& dimensionsA, - const std::vector& dimensionsB) - { - try - { - return (dimensionsA[0] != dimensionsB[0] || dimensionsA[1] != dimensionsB[1] - || dimensionsA[2] != dimensionsB[2] || dimensionsA[3] != dimensionsB[3]); - } - catch (const std::exception& e) - { - error(e.what(), __LINE__, __FUNCTION__, __FILE__); - return false; - } - } #endif PoseExtractorCaffe::PoseExtractorCaffe(const PoseModel poseModel, const std::string& modelFolder, @@ -158,17 +143,21 @@ namespace op error("Empty inputNetData.", __LINE__, __FUNCTION__, __FILE__); // 1. Caffe deep network - upImpl->spNetCaffe->forwardPass(inputNetData); // ~80ms + upImpl->spNetCaffe->forwardPass(inputNetData); // ~80ms // Reshape blobs if required - if (requiredReshapePoseExtractorCaffe(upImpl->mNetInputSize4D, inputNetData.getSize())) + // Note: In order to resize to input size to have same results as Matlab, uncomment the commented lines + if (!vectorsAreEqual(upImpl->mNetInputSize4D, inputNetData.getSize())) + // || !vectorsAreEqual(upImpl->mScaleInputToNetInputs, scaleInputToNetInputs)) { upImpl->mNetInputSize4D = inputNetData.getSize(); mNetOutputSize = Point{upImpl->mNetInputSize4D[3], upImpl->mNetInputSize4D[2]}; + // upImpl->mScaleInputToNetInputs = scaleInputToNetInputs; reshapePoseExtractorCaffe(upImpl->spResizeAndMergeCaffe, upImpl->spNmsCaffe, upImpl->spBodyPartConnectorCaffe, upImpl->spCaffeNetOutputBlob, upImpl->spHeatMapsBlob, upImpl->spPeaksBlob, upImpl->spPoseBlob, - scaleInputToNetInputs[0], mPoseModel); + 1.f, mPoseModel); + // scaleInputToNetInputs[0], mPoseModel); } // 2. Resize heat maps + merge different scales @@ -192,16 +181,18 @@ namespace op #endif // Get scale net to output (i.e. image input) + // Note: In order to resize to input size, (un)comment the following lines const auto scaleProducerToNetInput = resizeGetScaleFactor(inputDataSize, mNetOutputSize); const Point netSize{intRound(scaleProducerToNetInput*inputDataSize.x), intRound(scaleProducerToNetInput*inputDataSize.y)}; mScaleNetToOutput = {(float)resizeGetScaleFactor(netSize, inputDataSize)}; + // mScaleNetToOutput = 1.f; // 4. Connecting body parts + // Get scale net to output (i.e. image input) upImpl->spBodyPartConnectorCaffe->setScaleNetToOutput(mScaleNetToOutput); - // upImpl->spBodyPartConnectorCaffe->setScaleNetToOutput(1); upImpl->spBodyPartConnectorCaffe->setInterMinAboveThreshold( - (int)get(PoseProperty::ConnectInterMinAboveThreshold) + (float)get(PoseProperty::ConnectInterMinAboveThreshold) ); upImpl->spBodyPartConnectorCaffe->setInterThreshold((float)get(PoseProperty::ConnectInterThreshold)); upImpl->spBodyPartConnectorCaffe->setMinSubsetCnt((int)get(PoseProperty::ConnectMinSubsetCnt)); @@ -215,7 +206,7 @@ namespace op // #else upImpl->spBodyPartConnectorCaffe->Forward_cpu({upImpl->spHeatMapsBlob.get(), upImpl->spPeaksBlob.get()}, - mPoseKeypoints); + mPoseKeypoints, mPoseScores); // #endif #else UNUSED(inputNetData); diff --git a/src/openpose/pose/poseGpuRenderer.cpp b/src/openpose/pose/poseGpuRenderer.cpp index de7a46a4..3bf48c55 100644 --- a/src/openpose/pose/poseGpuRenderer.cpp +++ b/src/openpose/pose/poseGpuRenderer.cpp @@ -100,6 +100,9 @@ namespace op } else { + // If resized to input resolution: Replace scaleNetToOutput * scaleInputToOutput by + // scaleInputToOutput, and comment the security checks. + // Security checks if (scaleNetToOutput == -1.f) error("Non valid scaleNetToOutput.", __LINE__, __FUNCTION__, __FILE__); // Parameters diff --git a/src/openpose/utilities/openCv.cpp b/src/openpose/utilities/openCv.cpp index a4c8d585..31cdd522 100644 --- a/src/openpose/utilities/openCv.cpp +++ b/src/openpose/utilities/openCv.cpp @@ -3,7 +3,8 @@ namespace op { - void putTextOnCvMat(cv::Mat& cvMat, const std::string& textToDisplay, const Point& position, const cv::Scalar& color, const bool normalizeWidth) + void putTextOnCvMat(cv::Mat& cvMat, const std::string& textToDisplay, const Point& position, + const cv::Scalar& color, const bool normalizeWidth) { try { @@ -14,8 +15,11 @@ namespace op const auto shadowOffset = 2; int baseline = 0; const auto textSize = cv::getTextSize(textToDisplay, font, fontScale, fontThickness, &baseline); - const cv::Size finalPosition{position.x - (normalizeWidth ? textSize.width : 0), position.y + textSize.height/2}; - cv::putText(cvMat, textToDisplay, cv::Size{finalPosition.width + shadowOffset, finalPosition.height + shadowOffset}, font, fontScale, cv::Scalar{0,0,0}, fontThickness); + const cv::Size finalPosition{position.x - (normalizeWidth ? textSize.width : 0), + position.y + textSize.height/2}; + cv::putText(cvMat, textToDisplay, + cv::Size{finalPosition.width + shadowOffset, finalPosition.height + shadowOffset}, + font, fontScale, cv::Scalar{0,0,0}, fontThickness); cv::putText(cvMat, textToDisplay, finalPosition, font, fontScale, color, fontThickness); } catch (const std::exception& e) @@ -24,7 +28,8 @@ namespace op } } - void floatPtrToUCharCvMat(cv::Mat& uCharCvMat, const float* const floatPtrImage, const std::array resolutionSize) + void floatPtrToUCharCvMat(cv::Mat& uCharCvMat, const float* const floatPtrImage, + const std::array resolutionSize) { try { @@ -32,7 +37,8 @@ namespace op // float* (deep net format): C x H x W // cv::Mat (OpenCV format): H x W x C // Allocate cv::Mat if it was not initialized yet - if (uCharCvMat.empty() || uCharCvMat.rows != resolutionSize[1] || uCharCvMat.cols != resolutionSize[0] || uCharCvMat.type() != CV_8UC3) + if (uCharCvMat.empty() || uCharCvMat.rows != resolutionSize[1] + || uCharCvMat.cols != resolutionSize[0] || uCharCvMat.type() != CV_8UC3) uCharCvMat = cv::Mat(resolutionSize[1], resolutionSize[0], CV_8UC3); // Fill uCharCvMat from floatPtrImage auto* uCharPtrCvMat = (unsigned char*)(uCharCvMat.data); @@ -47,7 +53,9 @@ namespace op const auto floatPtrImageOffsetY = offsetChannelC + y*resolutionSize[0]; for (auto x = 0; x < resolutionSize[0]; x++) { - const auto value = uchar( fastTruncate(intRound(floatPtrImage[floatPtrImageOffsetY + x]), 0, 255) ); + const auto value = uchar( + fastTruncate(intRound(floatPtrImage[floatPtrImageOffsetY + x]), 0, 255) + ); uCharPtrCvMat[yOffset + x * resolutionSize[2] + c] = value; // *(uCharCvMat.ptr(y, x) + c) = value; // Slower but safer and cleaner equivalent } @@ -65,7 +73,8 @@ namespace op try { if (array.getNumberDimensions() != 3) - error("Only implemented for array.getNumberDimensions() == 3 so far.", __LINE__, __FUNCTION__, __FILE__); + error("Only implemented for array.getNumberDimensions() == 3 so far.", + __LINE__, __FUNCTION__, __FILE__); if (!array.empty()) { @@ -90,7 +99,7 @@ namespace op const auto offsetHeight = y * width; for (auto x = 0 ; x < width ; x++) { - const auto value = uchar( fastTruncate(intRound(arrayPtr[offsetHeight + x]), 0, 255) ); + const auto value = uchar( fastTruncate(intRound(arrayPtr[offsetHeight + x]), 0, 255) ); cvMatROIPtr[x] = (unsigned char)(value); } } @@ -124,13 +133,15 @@ namespace op const auto floatPtrImageOffsetY = (floatPtrImageOffsetC + y) * width; const auto originFramePtrOffsetY = y * width; for (auto x = 0; x < width; x++) - floatPtrImage[floatPtrImageOffsetY + x] = float(originFramePtr[(originFramePtrOffsetY + x) * channels + c]); + floatPtrImage[floatPtrImageOffsetY + x] = float(originFramePtr[(originFramePtrOffsetY + x) + * channels + c]); } } // Normalizing if desired // floatPtrImage wrapped as cv::Mat - // Empirically tested - OpenCV is more efficient normalizing a whole matrix/image (it uses AVX and other optimized instruction sets) - // In addition, the following if statement does not copy the pointer to a cv::Mat, just wrapps it + // Empirically tested - OpenCV is more efficient normalizing a whole matrix/image (it uses AVX and + // other optimized instruction sets). + // In addition, the following if statement does not copy the pointer to a cv::Mat, just wrapps it. if (normalize) { cv::Mat floatPtrImageCvWrapper(height, width, CV_32FC3, floatPtrImage); @@ -158,7 +169,8 @@ namespace op } } - cv::Mat resizeFixedAspectRatio(const cv::Mat& cvMat, const double scaleFactor, const Point& targetSize, const int borderMode, const cv::Scalar& borderValue) + cv::Mat resizeFixedAspectRatio(const cv::Mat& cvMat, const double scaleFactor, const Point& targetSize, + const int borderMode, const cv::Scalar& borderValue) { try { @@ -168,7 +180,8 @@ namespace op M.at(0,0) = scaleFactor; M.at(1,1) = scaleFactor; if (scaleFactor != 1. || cvTargetSize != cvMat.size()) - cv::warpAffine(cvMat, resultingCvMat, M, cvTargetSize, (scaleFactor < 1. ? cv::INTER_AREA : cv::INTER_CUBIC), borderMode, borderValue); + cv::warpAffine(cvMat, resultingCvMat, M, cvTargetSize, + (scaleFactor < 1. ? cv::INTER_AREA : cv::INTER_CUBIC), borderMode, borderValue); else resultingCvMat = cvMat.clone(); return resultingCvMat; diff --git a/windows/OpenPose/OpenPose.vcxproj b/windows/OpenPose/OpenPose.vcxproj index be59fe31..80bd6e86 100644 --- a/windows/OpenPose/OpenPose.vcxproj +++ b/windows/OpenPose/OpenPose.vcxproj @@ -235,6 +235,7 @@ + diff --git a/windows/OpenPose/OpenPose.vcxproj.filters b/windows/OpenPose/OpenPose.vcxproj.filters index ae3f93ef..e030f616 100644 --- a/windows/OpenPose/OpenPose.vcxproj.filters +++ b/windows/OpenPose/OpenPose.vcxproj.filters @@ -497,6 +497,9 @@ Header Files\utilities + + Header Files\utilities + Header Files\utilities diff --git a/windows/OpenPose3DReconstruction/OpenPose3DReconstruction.vcxproj b/windows/OpenPose3DReconstruction/OpenPose3DReconstruction.vcxproj index 32c34b77..8682f884 100644 --- a/windows/OpenPose3DReconstruction/OpenPose3DReconstruction.vcxproj +++ b/windows/OpenPose3DReconstruction/OpenPose3DReconstruction.vcxproj @@ -83,7 +83,7 @@ true true true - ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe\include;..\..\3rdparty\windows\caffe\include2;..\..\3rdparty\windows\caffe3rdparty\include;..\..\3rdparty\windows\caffe3rdparty\include\boost-1_61;$(CUDA_PATH_V8_0)\include;..\..\examples_beta\openpose3d\include;..\..\3rdparty\windows\freeglut\include;..\..\3rdparty\windows\spinnaker\include;%(AdditionalIncludeDirectories) + ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe3rdparty\include;..\..\examples_beta\openpose3d\include;..\..\3rdparty\windows\freeglut\include;..\..\3rdparty\windows\spinnaker\include;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;CMAKE_WINDOWS_BUILD;GLOG_NO_ABBREVIATED_SEVERITIES;GOOGLE_GLOG_DLL_DECL=__declspec(dllimport);GOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS=__declspec(dllimport);CMAKE_INTDIR="Release";NDEBUG $(IntDir)\obj\relDir\relDir\%(RelativeDir)\%(Filename)%(Extension).obj true @@ -94,7 +94,7 @@ true true $(CUDA_PATH_V8_0)\lib\x64\; - ..\..\3rdparty\windows\caffe\lib\caffe.lib;..\..\3rdparty\windows\caffe\lib\caffeproto.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_filesystem-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_system-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5_hl.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffezlib.lib;..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\caffe3rdparty\lib\glog.lib;..\..\3rdparty\windows\caffe3rdparty\lib\leveldb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\libopenblas.dll.a;..\..\3rdparty\windows\caffe3rdparty\lib\libprotobuf.lib;..\..\3rdparty\windows\caffe3rdparty\lib\lmdb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\snappy.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;cublas.lib;cublas_device.lib;cudart.lib;cudnn.lib;curand.lib;ntdll.lib;shlwapi.lib;..\x64\Release\OpenPose.lib;..\..\3rdparty\windows\freeglut\lib\freeglut.lib;..\..\3rdparty\windows\spinnaker\lib\Spinnaker_$(PlatformToolset).lib;%(AdditionalDependencies) + ..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;..\x64\Release\OpenPose.lib;..\..\3rdparty\windows\freeglut\lib\freeglut.lib;..\..\3rdparty\windows\spinnaker\lib\Spinnaker_$(PlatformToolset).lib;%(AdditionalDependencies) diff --git a/windows/OpenPoseDemo/OpenPoseDemo.vcxproj b/windows/OpenPoseDemo/OpenPoseDemo.vcxproj index d000292e..dc59ff60 100644 --- a/windows/OpenPoseDemo/OpenPoseDemo.vcxproj +++ b/windows/OpenPoseDemo/OpenPoseDemo.vcxproj @@ -69,7 +69,7 @@ true true true - ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe\include;..\..\3rdparty\windows\caffe\include2;..\..\3rdparty\windows\caffe3rdparty\include;..\..\3rdparty\windows\caffe3rdparty\include\boost-1_61;$(CUDA_PATH_V8_0)\include;%(AdditionalIncludeDirectories) + ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe3rdparty\include;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;CMAKE_WINDOWS_BUILD;GLOG_NO_ABBREVIATED_SEVERITIES;GOOGLE_GLOG_DLL_DECL=__declspec(dllimport);GOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS=__declspec(dllimport);CMAKE_INTDIR="Release";NDEBUG $(IntDir)\obj\relDir\relDir\%(RelativeDir)\%(Filename)%(Extension).obj true @@ -80,7 +80,7 @@ true true $(CUDA_PATH_V8_0)\lib\x64\; - ..\..\3rdparty\windows\caffe\lib\caffe.lib;..\..\3rdparty\windows\caffe\lib\caffeproto.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_filesystem-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_system-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5_hl.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffezlib.lib;..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\caffe3rdparty\lib\glog.lib;..\..\3rdparty\windows\caffe3rdparty\lib\leveldb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\libopenblas.dll.a;..\..\3rdparty\windows\caffe3rdparty\lib\libprotobuf.lib;..\..\3rdparty\windows\caffe3rdparty\lib\lmdb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\snappy.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;cublas.lib;cublas_device.lib;cudart.lib;cudnn.lib;curand.lib;ntdll.lib;shlwapi.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) + ..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) diff --git a/windows/TutorialAddModule/1_custom_post_processing.vcxproj b/windows/TutorialAddModule/1_custom_post_processing.vcxproj index 53674fd8..d42c83ba 100644 --- a/windows/TutorialAddModule/1_custom_post_processing.vcxproj +++ b/windows/TutorialAddModule/1_custom_post_processing.vcxproj @@ -77,7 +77,7 @@ true true true - ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe\include;..\..\3rdparty\windows\caffe\include2;..\..\3rdparty\windows\caffe3rdparty\include;..\..\3rdparty\windows\caffe3rdparty\include\boost-1_61;$(CUDA_PATH_V8_0)\include;%(AdditionalIncludeDirectories) + ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe3rdparty\include;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;CMAKE_WINDOWS_BUILD;GLOG_NO_ABBREVIATED_SEVERITIES;GOOGLE_GLOG_DLL_DECL=__declspec(dllimport);GOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS=__declspec(dllimport);CMAKE_INTDIR="Release";NDEBUG $(IntDir)\obj\relDir\relDir\%(RelativeDir)\%(Filename)%(Extension).obj true @@ -88,7 +88,7 @@ true true $(CUDA_PATH_V8_0)\lib\x64\; - ..\..\3rdparty\windows\caffe\lib\caffe.lib;..\..\3rdparty\windows\caffe\lib\caffeproto.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_filesystem-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_system-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5_hl.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffezlib.lib;..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\caffe3rdparty\lib\glog.lib;..\..\3rdparty\windows\caffe3rdparty\lib\leveldb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\libopenblas.dll.a;..\..\3rdparty\windows\caffe3rdparty\lib\libprotobuf.lib;..\..\3rdparty\windows\caffe3rdparty\lib\lmdb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\snappy.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;cublas.lib;cublas_device.lib;cudart.lib;cudnn.lib;curand.lib;ntdll.lib;shlwapi.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) + ..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) diff --git a/windows/TutorialPose/1_extract_from_image.vcxproj b/windows/TutorialPose/1_extract_from_image.vcxproj index fad11449..2e95f692 100644 --- a/windows/TutorialPose/1_extract_from_image.vcxproj +++ b/windows/TutorialPose/1_extract_from_image.vcxproj @@ -72,7 +72,7 @@ true true true - ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe\include;..\..\3rdparty\windows\caffe\include2;..\..\3rdparty\windows\caffe3rdparty\include;..\..\3rdparty\windows\caffe3rdparty\include\boost-1_61;$(CUDA_PATH_V8_0)\include;%(AdditionalIncludeDirectories) + ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe3rdparty\include;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;CMAKE_WINDOWS_BUILD;GLOG_NO_ABBREVIATED_SEVERITIES;GOOGLE_GLOG_DLL_DECL=__declspec(dllimport);GOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS=__declspec(dllimport);CMAKE_INTDIR="Release";NDEBUG $(IntDir)\obj\relDir\relDir\%(RelativeDir)\%(Filename)%(Extension).obj true @@ -83,7 +83,7 @@ true true $(CUDA_PATH_V8_0)\lib\x64\; - ..\..\3rdparty\windows\caffe\lib\caffe.lib;..\..\3rdparty\windows\caffe\lib\caffeproto.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_filesystem-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_system-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5_hl.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffezlib.lib;..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\caffe3rdparty\lib\glog.lib;..\..\3rdparty\windows\caffe3rdparty\lib\leveldb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\libopenblas.dll.a;..\..\3rdparty\windows\caffe3rdparty\lib\libprotobuf.lib;..\..\3rdparty\windows\caffe3rdparty\lib\lmdb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\snappy.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;cublas.lib;cublas_device.lib;cudart.lib;cudnn.lib;curand.lib;ntdll.lib;shlwapi.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) + ..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) diff --git a/windows/TutorialPose/2_extract_pose_or_heatmat_from_image.vcxproj b/windows/TutorialPose/2_extract_pose_or_heatmat_from_image.vcxproj index 68b2b147..ff3681c3 100644 --- a/windows/TutorialPose/2_extract_pose_or_heatmat_from_image.vcxproj +++ b/windows/TutorialPose/2_extract_pose_or_heatmat_from_image.vcxproj @@ -72,7 +72,7 @@ true true true - ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe\include;..\..\3rdparty\windows\caffe\include2;..\..\3rdparty\windows\caffe3rdparty\include;..\..\3rdparty\windows\caffe3rdparty\include\boost-1_61;$(CUDA_PATH_V8_0)\include;%(AdditionalIncludeDirectories) + ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe3rdparty\include;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;CMAKE_WINDOWS_BUILD;GLOG_NO_ABBREVIATED_SEVERITIES;GOOGLE_GLOG_DLL_DECL=__declspec(dllimport);GOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS=__declspec(dllimport);CMAKE_INTDIR="Release";NDEBUG $(IntDir)\obj\relDir\relDir\%(RelativeDir)\%(Filename)%(Extension).obj true @@ -83,7 +83,7 @@ true true $(CUDA_PATH_V8_0)\lib\x64\; - ..\..\3rdparty\windows\caffe\lib\caffe.lib;..\..\3rdparty\windows\caffe\lib\caffeproto.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_filesystem-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_system-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5_hl.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffezlib.lib;..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\caffe3rdparty\lib\glog.lib;..\..\3rdparty\windows\caffe3rdparty\lib\leveldb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\libopenblas.dll.a;..\..\3rdparty\windows\caffe3rdparty\lib\libprotobuf.lib;..\..\3rdparty\windows\caffe3rdparty\lib\lmdb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\snappy.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;cublas.lib;cublas_device.lib;cudart.lib;cudnn.lib;curand.lib;ntdll.lib;shlwapi.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) + ..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) diff --git a/windows/TutorialThread/1_openpose_read_and_display.vcxproj b/windows/TutorialThread/1_openpose_read_and_display.vcxproj index 6f16c336..27d2485f 100644 --- a/windows/TutorialThread/1_openpose_read_and_display.vcxproj +++ b/windows/TutorialThread/1_openpose_read_and_display.vcxproj @@ -72,7 +72,7 @@ true true true - ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe\include;..\..\3rdparty\windows\caffe\include2;..\..\3rdparty\windows\caffe3rdparty\include;..\..\3rdparty\windows\caffe3rdparty\include\boost-1_61;$(CUDA_PATH_V8_0)\include;%(AdditionalIncludeDirectories) + ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe3rdparty\include;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;CMAKE_WINDOWS_BUILD;GLOG_NO_ABBREVIATED_SEVERITIES;GOOGLE_GLOG_DLL_DECL=__declspec(dllimport);GOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS=__declspec(dllimport);CMAKE_INTDIR="Release";NDEBUG $(IntDir)\obj\relDir\relDir\%(RelativeDir)\%(Filename)%(Extension).obj true @@ -83,7 +83,7 @@ true true $(CUDA_PATH_V8_0)\lib\x64\; - ..\..\3rdparty\windows\caffe\lib\caffe.lib;..\..\3rdparty\windows\caffe\lib\caffeproto.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_filesystem-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_system-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5_hl.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffezlib.lib;..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\caffe3rdparty\lib\glog.lib;..\..\3rdparty\windows\caffe3rdparty\lib\leveldb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\libopenblas.dll.a;..\..\3rdparty\windows\caffe3rdparty\lib\libprotobuf.lib;..\..\3rdparty\windows\caffe3rdparty\lib\lmdb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\snappy.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;cublas.lib;cublas_device.lib;cudart.lib;cudnn.lib;curand.lib;ntdll.lib;shlwapi.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) + ..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) diff --git a/windows/TutorialThread/2_user_processing_function.vcxproj b/windows/TutorialThread/2_user_processing_function.vcxproj index 9acff301..b7cabf5b 100644 --- a/windows/TutorialThread/2_user_processing_function.vcxproj +++ b/windows/TutorialThread/2_user_processing_function.vcxproj @@ -72,7 +72,7 @@ true true true - ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe\include;..\..\3rdparty\windows\caffe\include2;..\..\3rdparty\windows\caffe3rdparty\include;..\..\3rdparty\windows\caffe3rdparty\include\boost-1_61;$(CUDA_PATH_V8_0)\include;%(AdditionalIncludeDirectories) + ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe3rdparty\include;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;CMAKE_WINDOWS_BUILD;GLOG_NO_ABBREVIATED_SEVERITIES;GOOGLE_GLOG_DLL_DECL=__declspec(dllimport);GOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS=__declspec(dllimport);CMAKE_INTDIR="Release";NDEBUG $(IntDir)\obj\relDir\relDir\%(RelativeDir)\%(Filename)%(Extension).obj true @@ -83,7 +83,7 @@ true true $(CUDA_PATH_V8_0)\lib\x64\; - ..\..\3rdparty\windows\caffe\lib\caffe.lib;..\..\3rdparty\windows\caffe\lib\caffeproto.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_filesystem-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_system-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5_hl.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffezlib.lib;..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\caffe3rdparty\lib\glog.lib;..\..\3rdparty\windows\caffe3rdparty\lib\leveldb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\libopenblas.dll.a;..\..\3rdparty\windows\caffe3rdparty\lib\libprotobuf.lib;..\..\3rdparty\windows\caffe3rdparty\lib\lmdb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\snappy.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;cublas.lib;cublas_device.lib;cudart.lib;cudnn.lib;curand.lib;ntdll.lib;shlwapi.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) + ..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) diff --git a/windows/TutorialThread/3_user_input_processing_and_output.vcxproj b/windows/TutorialThread/3_user_input_processing_and_output.vcxproj index fc457f66..57849d07 100644 --- a/windows/TutorialThread/3_user_input_processing_and_output.vcxproj +++ b/windows/TutorialThread/3_user_input_processing_and_output.vcxproj @@ -72,7 +72,7 @@ true true true - ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe\include;..\..\3rdparty\windows\caffe\include2;..\..\3rdparty\windows\caffe3rdparty\include;..\..\3rdparty\windows\caffe3rdparty\include\boost-1_61;$(CUDA_PATH_V8_0)\include;%(AdditionalIncludeDirectories) + ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe3rdparty\include;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;CMAKE_WINDOWS_BUILD;GLOG_NO_ABBREVIATED_SEVERITIES;GOOGLE_GLOG_DLL_DECL=__declspec(dllimport);GOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS=__declspec(dllimport);CMAKE_INTDIR="Release";NDEBUG $(IntDir)\obj\relDir\relDir\%(RelativeDir)\%(Filename)%(Extension).obj true @@ -83,7 +83,7 @@ true true $(CUDA_PATH_V8_0)\lib\x64\; - ..\..\3rdparty\windows\caffe\lib\caffe.lib;..\..\3rdparty\windows\caffe\lib\caffeproto.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_filesystem-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_system-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5_hl.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffezlib.lib;..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\caffe3rdparty\lib\glog.lib;..\..\3rdparty\windows\caffe3rdparty\lib\leveldb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\libopenblas.dll.a;..\..\3rdparty\windows\caffe3rdparty\lib\libprotobuf.lib;..\..\3rdparty\windows\caffe3rdparty\lib\lmdb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\snappy.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;cublas.lib;cublas_device.lib;cudart.lib;cudnn.lib;curand.lib;ntdll.lib;shlwapi.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) + ..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) diff --git a/windows/TutorialThread/4_user_input_processing_output_and_datum.vcxproj b/windows/TutorialThread/4_user_input_processing_output_and_datum.vcxproj index ec34543b..c8ebdb0d 100644 --- a/windows/TutorialThread/4_user_input_processing_output_and_datum.vcxproj +++ b/windows/TutorialThread/4_user_input_processing_output_and_datum.vcxproj @@ -72,7 +72,7 @@ true true true - ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe\include;..\..\3rdparty\windows\caffe\include2;..\..\3rdparty\windows\caffe3rdparty\include;..\..\3rdparty\windows\caffe3rdparty\include\boost-1_61;$(CUDA_PATH_V8_0)\include;%(AdditionalIncludeDirectories) + ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe3rdparty\include;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;CMAKE_WINDOWS_BUILD;GLOG_NO_ABBREVIATED_SEVERITIES;GOOGLE_GLOG_DLL_DECL=__declspec(dllimport);GOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS=__declspec(dllimport);CMAKE_INTDIR="Release";NDEBUG $(IntDir)\obj\relDir\relDir\%(RelativeDir)\%(Filename)%(Extension).obj true @@ -83,7 +83,7 @@ true true $(CUDA_PATH_V8_0)\lib\x64\; - ..\..\3rdparty\windows\caffe\lib\caffe.lib;..\..\3rdparty\windows\caffe\lib\caffeproto.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_filesystem-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_system-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5_hl.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffezlib.lib;..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\caffe3rdparty\lib\glog.lib;..\..\3rdparty\windows\caffe3rdparty\lib\leveldb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\libopenblas.dll.a;..\..\3rdparty\windows\caffe3rdparty\lib\libprotobuf.lib;..\..\3rdparty\windows\caffe3rdparty\lib\lmdb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\snappy.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;cublas.lib;cublas_device.lib;cudart.lib;cudnn.lib;curand.lib;ntdll.lib;shlwapi.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) + ..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) diff --git a/windows/TutorialWrapper/1_user_asynchronous_output.vcxproj b/windows/TutorialWrapper/1_user_asynchronous_output.vcxproj index d643d058..453d7062 100644 --- a/windows/TutorialWrapper/1_user_asynchronous_output.vcxproj +++ b/windows/TutorialWrapper/1_user_asynchronous_output.vcxproj @@ -72,7 +72,7 @@ true true true - ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe\include;..\..\3rdparty\windows\caffe\include2;..\..\3rdparty\windows\caffe3rdparty\include;..\..\3rdparty\windows\caffe3rdparty\include\boost-1_61;$(CUDA_PATH_V8_0)\include;%(AdditionalIncludeDirectories) + ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe3rdparty\include;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;CMAKE_WINDOWS_BUILD;GLOG_NO_ABBREVIATED_SEVERITIES;GOOGLE_GLOG_DLL_DECL=__declspec(dllimport);GOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS=__declspec(dllimport);CMAKE_INTDIR="Release";NDEBUG $(IntDir)\obj\relDir\relDir\%(RelativeDir)\%(Filename)%(Extension).obj true @@ -83,7 +83,7 @@ true true $(CUDA_PATH_V8_0)\lib\x64\; - ..\..\3rdparty\windows\caffe\lib\caffe.lib;..\..\3rdparty\windows\caffe\lib\caffeproto.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_filesystem-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_system-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5_hl.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffezlib.lib;..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\caffe3rdparty\lib\glog.lib;..\..\3rdparty\windows\caffe3rdparty\lib\leveldb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\libopenblas.dll.a;..\..\3rdparty\windows\caffe3rdparty\lib\libprotobuf.lib;..\..\3rdparty\windows\caffe3rdparty\lib\lmdb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\snappy.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;cublas.lib;cublas_device.lib;cudart.lib;cudnn.lib;curand.lib;ntdll.lib;shlwapi.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) + ..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) diff --git a/windows/TutorialWrapper/2_user_synchronous.vcxproj b/windows/TutorialWrapper/2_user_synchronous.vcxproj index 65309d68..26e0b0f7 100644 --- a/windows/TutorialWrapper/2_user_synchronous.vcxproj +++ b/windows/TutorialWrapper/2_user_synchronous.vcxproj @@ -72,7 +72,7 @@ true true true - ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe\include;..\..\3rdparty\windows\caffe\include2;..\..\3rdparty\windows\caffe3rdparty\include;..\..\3rdparty\windows\caffe3rdparty\include\boost-1_61;$(CUDA_PATH_V8_0)\include;%(AdditionalIncludeDirectories) + ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe3rdparty\include;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;CMAKE_WINDOWS_BUILD;GLOG_NO_ABBREVIATED_SEVERITIES;GOOGLE_GLOG_DLL_DECL=__declspec(dllimport);GOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS=__declspec(dllimport);CMAKE_INTDIR="Release";NDEBUG $(IntDir)\obj\relDir\relDir\%(RelativeDir)\%(Filename)%(Extension).obj true @@ -83,7 +83,7 @@ true true $(CUDA_PATH_V8_0)\lib\x64\; - ..\..\3rdparty\windows\caffe\lib\caffe.lib;..\..\3rdparty\windows\caffe\lib\caffeproto.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_filesystem-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_system-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5_hl.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffezlib.lib;..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\caffe3rdparty\lib\glog.lib;..\..\3rdparty\windows\caffe3rdparty\lib\leveldb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\libopenblas.dll.a;..\..\3rdparty\windows\caffe3rdparty\lib\libprotobuf.lib;..\..\3rdparty\windows\caffe3rdparty\lib\lmdb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\snappy.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;cublas.lib;cublas_device.lib;cudart.lib;cudnn.lib;curand.lib;ntdll.lib;shlwapi.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) + ..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) diff --git a/windows/TutorialWrapper/3_user_asynchronous.vcxproj b/windows/TutorialWrapper/3_user_asynchronous.vcxproj index 314ac113..8238a21c 100644 --- a/windows/TutorialWrapper/3_user_asynchronous.vcxproj +++ b/windows/TutorialWrapper/3_user_asynchronous.vcxproj @@ -72,7 +72,7 @@ true true true - ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe\include;..\..\3rdparty\windows\caffe\include2;..\..\3rdparty\windows\caffe3rdparty\include;..\..\3rdparty\windows\caffe3rdparty\include\boost-1_61;$(CUDA_PATH_V8_0)\include;%(AdditionalIncludeDirectories) + ..\..\include;..\..\3rdparty\windows\opencv\include;..\..\3rdparty\windows\caffe3rdparty\include;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;CMAKE_WINDOWS_BUILD;GLOG_NO_ABBREVIATED_SEVERITIES;GOOGLE_GLOG_DLL_DECL=__declspec(dllimport);GOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS=__declspec(dllimport);CMAKE_INTDIR="Release";NDEBUG $(IntDir)\obj\relDir\relDir\%(RelativeDir)\%(Filename)%(Extension).obj true @@ -83,7 +83,7 @@ true true $(CUDA_PATH_V8_0)\lib\x64\; - ..\..\3rdparty\windows\caffe\lib\caffe.lib;..\..\3rdparty\windows\caffe\lib\caffeproto.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_filesystem-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\boost_system-vc140-mt-1_61.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffehdf5_hl.lib;..\..\3rdparty\windows\caffe3rdparty\lib\caffezlib.lib;..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\caffe3rdparty\lib\glog.lib;..\..\3rdparty\windows\caffe3rdparty\lib\leveldb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\libopenblas.dll.a;..\..\3rdparty\windows\caffe3rdparty\lib\libprotobuf.lib;..\..\3rdparty\windows\caffe3rdparty\lib\lmdb.lib;..\..\3rdparty\windows\caffe3rdparty\lib\snappy.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;cublas.lib;cublas_device.lib;cudart.lib;cudnn.lib;curand.lib;ntdll.lib;shlwapi.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies) + ..\..\3rdparty\windows\caffe3rdparty\lib\gflags.lib;..\..\3rdparty\windows\opencv\x64\vc14\lib\opencv_world310.lib;..\x64\Release\OpenPose.lib;%(AdditionalDependencies)