From 1702bc6a362b093a1a585eaea76c194398e97ee7 Mon Sep 17 00:00:00 2001 From: Gines Hidalgo Date: Sat, 4 Apr 2020 16:06:02 -0400 Subject: [PATCH] OpenCV updated to 4.2 --- 3rdparty/windows/getOpenCV.bat | 2 +- CMakeLists.txt | 4 ++-- README.md | 13 +++++-------- doc/installation_deprecated.md | 2 +- doc/prerequisites.md | 2 +- scripts/tests/pose_accuracy_coco_test_dev.sh | 16 ++++++++++++++-- scripts/tests/pose_accuracy_coco_val.sh | 14 +++++++++----- 7 files changed, 33 insertions(+), 20 deletions(-) diff --git a/3rdparty/windows/getOpenCV.bat b/3rdparty/windows/getOpenCV.bat index e42db8c4..47d88c71 100644 --- a/3rdparty/windows/getOpenCV.bat +++ b/3rdparty/windows/getOpenCV.bat @@ -7,7 +7,7 @@ SET WGET_EXE=wget\wget.exe :: Download temporary zip echo ----- Downloading OpenCV ----- SET OPENCV_FOLDER=opencv\ -SET ZIP_NAME=opencv_411_v14_15_2019_09_24.zip +SET ZIP_NAME=opencv_420_v14_15_2020_04_04.zip SET ZIP_FULL_PATH=%OPENCV_FOLDER%%ZIP_NAME% %WGET_EXE% -c http://posefs1.perception.cs.cmu.edu/OpenPose/3rdparty/windows/%ZIP_NAME% -P %OPENCV_FOLDER% echo: diff --git a/CMakeLists.txt b/CMakeLists.txt index c5dd4274..255d9815 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -554,7 +554,7 @@ if (WIN32) set(OP_WIN_DIR "${CMAKE_SOURCE_DIR}/3rdparty/windows") # Download required zip files - download_zip("opencv_411_v14_15_2019_09_24.zip" ${OP_WIN_URL} ${FIND_LIB_PREFIX} cf080121a8189ecb7f53ac9b0fef36c6) + download_zip("opencv_420_v14_15_2020_04_04.zip" ${OP_WIN_URL} ${FIND_LIB_PREFIX} 59da628c17fe0f4755d22ff86dbb8c06) # download_zip("caffe3rdparty_2019_03_12.zip" ${OP_WIN_URL} ${FIND_LIB_PREFIX} 34c49be6a2418fd1670b46fc455eebc0) download_zip("caffe3rdparty_15_2019_03_14.zip" ${OP_WIN_URL} ${FIND_LIB_PREFIX} 9fcc6bdf4765db699d1a279c8d6b830b) if (${GPU_MODE} MATCHES "OPENCL") @@ -572,7 +572,7 @@ if (WIN32) # set(VS_VERSION "14") set(VS_VERSION "15") # Note: VS2017 code seems to simply works in VS2015 - find_library(OpenCV_LIBS opencv_world411 HINTS ${FIND_LIB_PREFIX}/opencv/x64/vc${VS_VERSION}/lib) + find_library(OpenCV_LIBS opencv_world420 HINTS ${FIND_LIB_PREFIX}/opencv/x64/vc${VS_VERSION}/lib) find_library(GFLAGS_LIBRARY_RELEASE gflags HINTS ${FIND_LIB_PREFIX}/caffe3rdparty/lib) find_library(GFLAGS_LIBRARY_DEBUG gflagsd HINTS ${FIND_LIB_PREFIX}/caffe3rdparty/lib) find_library(GLOG_LIBRARY_RELEASE glog HINTS ${FIND_LIB_PREFIX}/caffe3rdparty/lib) diff --git a/README.md b/README.md index 382326bd..9b9bfb0c 100644 --- a/README.md +++ b/README.md @@ -184,14 +184,9 @@ Just comment on GitHub or make a pull request and we will answer as soon as poss ## Citation -Please cite these papers in your publications if it helps your research. The body-foot model and any additional functionality (calibration, 3-D reconstruction, etc.) use `[Cao et al. 2018]`; the hand and face keypoint detectors use `[Cao et al. 2018]` and `[Simon et al. 2017]` (the face detector was trained using the same procedure than for hands); and the old (deprecated) body-only model uses `[Cao et al. 2017]`. +Please cite these papers in your publications if it helps your research. For standard OpenPose, cite `[Cao et al. 2018]`. If you also use the hand and face keypoint detectors, then cite `[Cao et al. 2018]` and `[Simon et al. 2017]` (the face detector was trained using the same procedure than the hand detector). - @inproceedings{cao2018openpose, - author = {Zhe Cao and Gines Hidalgo and Tomas Simon and Shih-En Wei and Yaser Sheikh}, - booktitle = {arXiv preprint arXiv:1812.08008}, - title = {Open{P}ose: realtime multi-person 2{D} pose estimation using {P}art {A}ffinity {F}ields}, - year = {2018} - } + @article{8765346, author={Z. {Cao} and G. {Hidalgo Martinez} and T. {Simon} and S. {Wei} and Y. A. {Sheikh}}, journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, title={OpenPose: Realtime Multi-Person 2D Pose Estimation using Part Affinity Fields}, year={2019}, volume={}, number={}, pages={1-1},} @inproceedings{simon2017hand, author = {Tomas Simon and Hanbyul Joo and Iain Matthews and Yaser Sheikh}, @@ -216,7 +211,9 @@ Please cite these papers in your publications if it helps your research. The bod Links to the papers: -- [OpenPose: Realtime Multi-Person 2D Pose Estimation using Part Affinity Fields](https://arxiv.org/abs/1812.08008) +- OpenPose: Realtime Multi-Person 2D Pose Estimation using Part Affinity Fields: + - [IEEE TPAMI](https://ieeexplore.ieee.org/document/8765346) + - [ArXiv](https://arxiv.org/abs/1812.08008) - [Hand Keypoint Detection in Single Images using Multiview Bootstrapping](https://arxiv.org/abs/1704.07809) - [Realtime Multi-Person 2D Pose Estimation using Part Affinity Fields](https://arxiv.org/abs/1611.08050) - [Convolutional Pose Machines](https://arxiv.org/abs/1602.00134) diff --git a/doc/installation_deprecated.md b/doc/installation_deprecated.md index 0bec903d..15a5c58e 100644 --- a/doc/installation_deprecated.md +++ b/doc/installation_deprecated.md @@ -141,7 +141,7 @@ Note: This installer will not incorporate any new features, we recommend to use - Dependencies: - [Caffe](http://posefs1.perception.cs.cmu.edu/OpenPose/3rdparty/windows/caffe_15_2019_05_16.zip): Unzip as `3rdparty/windows/caffe/`. - [Caffe dependencies](http://posefs1.perception.cs.cmu.edu/OpenPose/3rdparty/windows/caffe3rdparty_15_2019_03_14.zip): Unzip as `3rdparty/windows/caffe3rdparty/`. - - [OpenCV 4.1.1](http://posefs1.perception.cs.cmu.edu/OpenPose/3rdparty/windows/opencv_411_v14_15_2019_09_24.zip): Unzip as `3rdparty/windows/opencv/`. + - [OpenCV 4.1.1](http://posefs1.perception.cs.cmu.edu/OpenPose/3rdparty/windows/opencv_420_v14_15_2020_04_04.zip): Unzip as `3rdparty/windows/opencv/`. 2. Open the Visual Studio project sln file by double-cliking on `{openpose_path}\windows\OpenPose.sln`. 3. In order to verify OpenPose is working, try compiling and executing the demo: 1. Right click on `OpenPoseDemo` --> `Set as StartUp Project`. diff --git a/doc/prerequisites.md b/doc/prerequisites.md index 087df11f..003c216d 100644 --- a/doc/prerequisites.md +++ b/doc/prerequisites.md @@ -108,7 +108,7 @@ NOTE: These instructions are only required when compiling OpenPose brom source. - [CPU Caffe](http://posefs1.perception.cs.cmu.edu/OpenPose/3rdparty/windows/caffe_cpu_2018_05_27.zip): Unzip as `3rdparty/windows/caffe_cpu/`. - [OpenCL Caffe](http://posefs1.perception.cs.cmu.edu/OpenPose/3rdparty/windows/caffe_opencl_2018_02_13.zip): Unzip as `3rdparty/windows/caffe_opencl/`. - [Caffe dependencies](http://posefs1.perception.cs.cmu.edu/OpenPose/3rdparty/windows/caffe3rdparty_15_2019_03_14.zip): Unzip as `3rdparty/windows/caffe3rdparty/`. - - [OpenCV 4.1.1](http://posefs1.perception.cs.cmu.edu/OpenPose/3rdparty/windows/opencv_411_v14_15_2019_09_24.zip): Unzip as `3rdparty/windows/opencv/`. + - [OpenCV 4.1.1](http://posefs1.perception.cs.cmu.edu/OpenPose/3rdparty/windows/opencv_420_v14_15_2020_04_04.zip): Unzip as `3rdparty/windows/opencv/`. 6. **Eigen prerequisite** (optional, only required for some specific extra functionality, such as extrinsic camera calibration): - Enable the `WITH_EIGEN` flag when running CMake, and set it to `BUILD`. - CMake will automatically download Eigen. diff --git a/scripts/tests/pose_accuracy_coco_test_dev.sh b/scripts/tests/pose_accuracy_coco_test_dev.sh index c8daded6..26150bda 100755 --- a/scripts/tests/pose_accuracy_coco_test_dev.sh +++ b/scripts/tests/pose_accuracy_coco_test_dev.sh @@ -15,10 +15,22 @@ JSON_FOLDER=../evaluation/coco_val_jsons/ # JSON_FOLDER=/media/posefs3b/Users/gines/openpose_train/training_results/2_23_51/best_702k/ OP_BIN=./build/examples/openpose/openpose.bin +# # 1 scale +# $OP_BIN --image_dir $IMAGE_FOLDER --display 0 --render_pose 0 --cli_verbose 0.2 --write_coco_json ${JSON_FOLDER}1_test_max.json \ +# --scale_number 1 --scale_gap 0.25 --maximize_positives --model_pose BODY_25B +# zip ${JSON_FOLDER}1_test_max.zip ${JSON_FOLDER}1_test_max.json + # 4 scales # $OP_BIN --image_dir $IMAGE_FOLDER --display 0 --render_pose 0 --cli_verbose 0.2 --write_coco_json ${JSON_FOLDER}1_4_test.json \ # --scale_number 4 --scale_gap 0.25 --net_resolution "1312x736" $OP_BIN --image_dir $IMAGE_FOLDER --display 0 --render_pose 0 --cli_verbose 0.2 --write_coco_json ${JSON_FOLDER}1_4_test_max.json \ --scale_number 4 --scale_gap 0.25 --net_resolution "1312x736" --maximize_positives - # \ - # --model_pose BODY_23 --model_folder ${JSON_FOLDER} +zip ${JSON_FOLDER}1_4_test_max.zip ${JSON_FOLDER}1_4_test_max.json + + + +# Additional settings: +# 1. For maximum accuracy: +# --write_coco_json ${JSON_FOLDER}1_4_max.json --maximize_positives +# 2. For custom models: +# --model_pose BODY_25B/BODY_23 --model_folder ${JSON_FOLDER} diff --git a/scripts/tests/pose_accuracy_coco_val.sh b/scripts/tests/pose_accuracy_coco_val.sh index 80db88d4..d5a1ead4 100755 --- a/scripts/tests/pose_accuracy_coco_val.sh +++ b/scripts/tests/pose_accuracy_coco_val.sh @@ -25,9 +25,13 @@ $OP_BIN --image_dir $IMAGE_FOLDER --display 0 --render_pose 0 --cli_verbose 0.2 $OP_BIN --image_dir $IMAGE_FOOT_FOLDER --display 0 --render_pose 0 --cli_verbose 0.2 --write_coco_json ${JSON_FOLDER}1.json --write_coco_json_variants 2 # # 4 scales -# $OP_BIN --image_dir $IMAGE_FOLDER --display 0 --render_pose 0 --cli_verbose 0.2 --write_coco_json ${JSON_FOLDER}1_4.json --write_coco_json_variants 3 \ +# $OP_BIN --image_dir $IMAGE_FOLDER --display 0 --render_pose 0 --cli_verbose 0.2 --write_coco_json ${JSON_FOLDER}1_4.json --write_coco_json_variants 1 \ # --scale_number 4 --scale_gap 0.25 --net_resolution "1312x736" -# $OP_BIN --image_dir $IMAGE_FOLDER --display 0 --render_pose 0 --cli_verbose 0.2 --write_coco_json ${JSON_FOLDER}1_4_max.json --write_coco_json_variants 3 \ -# --scale_number 4 --scale_gap 0.25 --net_resolution "1312x736" --maximize_positives -# # \ -# # --model_pose BODY_23 --model_folder ${JSON_FOLDER} + + + +# Additional settings: +# 1. For maximum accuracy: +# --write_coco_json ${JSON_FOLDER}1_4_max.json --maximize_positives +# 2. For custom models: +# --model_pose BODY_25B/BODY_23 --model_folder ${JSON_FOLDER} -- GitLab