diff --git a/README.md b/README.md index e5b36769fffd12e4abd26d7484eda218bd032fb0..e32442e914fc940d9165457009edeb3a95bccc4b 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,9 @@ ## Latest Features -- Sep 2017: **CMake** installer and **IP camera** support! -- Jul 2017: [**Windows portable demo**](doc/installation.md#installation---demo)! +- Mar 2017: Improved [**3-D keypoint reconstruction module**](doc/3d_reconstruction_demo.md) (from multiple camera views)! +- Sep 2017: [**CMake**](doc/installation.md) installer and **IP camera** support! +- Jul 2017: [**Windows portable binaries and demo**](https://github.com/CMU-Perceptual-Computing-Lab/openpose/releases)! - Jul 2017: **Hands** released! - Jun 2017: **Face** released! For further details, check [all released features](doc/released_features.md) and [release notes](doc/release_notes.md). @@ -51,6 +52,11 @@ For further details, check [all released features](doc/released_features.md) and ## Results +### 3-D Reconstruction Module +

+ +

+ ### Body Estimation

diff --git a/doc/released_features.md b/doc/released_features.md index c2cffd7f112ce125fd65b54d403ed4a6bb102b4f..501760b239318a24e6c29856b30636f297d584a0 100644 --- a/doc/released_features.md +++ b/doc/released_features.md @@ -1,8 +1,9 @@ OpenPose Library - Latest Released Features ==================================== -- Sep 2017: **CMake** installer and **IP camera** support! -- Jul 2017: [**Windows portable demo**](doc/installation.md#installation---demo)! +- Mar 2017: Improved [**3-D keypoint reconstruction module**](doc/3d_reconstruction_demo.md) (from multiple camera views)! +- Sep 2017: [**CMake**](doc/installation.md) installer and **IP camera** support! +- Jul 2017: [**Windows portable binaries and demo**](https://github.com/CMU-Perceptual-Computing-Lab/openpose/releases)! - Jul 2017: **Hands** released! - Jun 2017: **Face** released! - May 2017: **Windows** version! diff --git a/examples/openpose/openpose.cpp b/examples/openpose/openpose.cpp index d5eff0b20f790c91bdf4ce501e6d7f42d6a7e666..f1516d71107d25e15d55593824466ddd88e0c8c5 100755 --- a/examples/openpose/openpose.cpp +++ b/examples/openpose/openpose.cpp @@ -257,6 +257,8 @@ int openPoseDemo() const auto heatMapTypes = op::flagsToHeatMaps(FLAGS_heatmaps_add_parts, FLAGS_heatmaps_add_bkg, FLAGS_heatmaps_add_PAFs); const auto heatMapScale = op::flagsToHeatMapScaleMode(FLAGS_heatmaps_scale); + // >1 camera view? + const auto multipleView = (FLAGS_3d || FLAGS_3d_views > 1 || FLAGS_flir_camera); // Enabling Google Logging const bool enableGoogleLogging = true; // Logging @@ -269,7 +271,7 @@ int openPoseDemo() const op::WrapperStructPose wrapperStructPose{!FLAGS_body_disable, netInputSize, outputSize, keypointScale, FLAGS_num_gpu, FLAGS_num_gpu_start, FLAGS_scale_number, (float)FLAGS_scale_gap, - op::flagsToRenderMode(FLAGS_render_pose, FLAGS_3d), + op::flagsToRenderMode(FLAGS_render_pose, multipleView), poseModel, !FLAGS_disable_blending, (float)FLAGS_alpha_pose, (float)FLAGS_alpha_heatmap, FLAGS_part_to_show, FLAGS_model_folder, heatMapTypes, heatMapScale, FLAGS_part_candidates, @@ -277,13 +279,13 @@ int openPoseDemo() enableGoogleLogging, FLAGS_3d, FLAGS_identification}; // Face configuration (use op::WrapperStructFace{} to disable it) const op::WrapperStructFace wrapperStructFace{FLAGS_face, faceNetInputSize, - op::flagsToRenderMode(FLAGS_face_render, FLAGS_3d, FLAGS_render_pose), + op::flagsToRenderMode(FLAGS_face_render, multipleView, FLAGS_render_pose), (float)FLAGS_face_alpha_pose, (float)FLAGS_face_alpha_heatmap, (float)FLAGS_face_render_threshold}; // Hand configuration (use op::WrapperStructHand{} to disable it) const op::WrapperStructHand wrapperStructHand{FLAGS_hand, handNetInputSize, FLAGS_hand_scale_number, (float)FLAGS_hand_scale_range, FLAGS_hand_tracking, - op::flagsToRenderMode(FLAGS_hand_render, FLAGS_3d, FLAGS_render_pose), + op::flagsToRenderMode(FLAGS_hand_render, multipleView, FLAGS_render_pose), (float)FLAGS_hand_alpha_pose, (float)FLAGS_hand_alpha_heatmap, (float)FLAGS_hand_render_threshold}; // Producer (use default to disable any input) diff --git a/examples/tutorial_add_module/1_custom_post_processing.cpp b/examples/tutorial_add_module/1_custom_post_processing.cpp index 2d937d8243556c8ca225a85a40e72f634e74d960..632f0d9659a1f66a8cee3ccb616fcb46761a53ff 100644 --- a/examples/tutorial_add_module/1_custom_post_processing.cpp +++ b/examples/tutorial_add_module/1_custom_post_processing.cpp @@ -259,6 +259,8 @@ int openPoseTutorialWrapper4() const auto heatMapTypes = op::flagsToHeatMaps(FLAGS_heatmaps_add_parts, FLAGS_heatmaps_add_bkg, FLAGS_heatmaps_add_PAFs); const auto heatMapScale = op::flagsToHeatMapScaleMode(FLAGS_heatmaps_scale); + // >1 camera view? + const auto multipleView = (FLAGS_3d || FLAGS_3d_views > 1 || FLAGS_flir_camera); // Enabling Google Logging const bool enableGoogleLogging = true; // Logging @@ -270,7 +272,8 @@ int openPoseTutorialWrapper4() // Pose configuration (use WrapperStructPose{} for default and recommended configuration) const op::WrapperStructPose wrapperStructPose{!FLAGS_body_disable, netInputSize, outputSize, keypointScale, FLAGS_num_gpu, FLAGS_num_gpu_start, FLAGS_scale_number, - (float)FLAGS_scale_gap, op::flagsToRenderMode(FLAGS_render_pose, FLAGS_3d), + (float)FLAGS_scale_gap, + op::flagsToRenderMode(FLAGS_render_pose, multipleView), poseModel, !FLAGS_disable_blending, (float)FLAGS_alpha_pose, (float)FLAGS_alpha_heatmap, FLAGS_part_to_show, FLAGS_model_folder, heatMapTypes, heatMapScale, FLAGS_part_candidates, @@ -278,13 +281,13 @@ int openPoseTutorialWrapper4() enableGoogleLogging, FLAGS_3d}; // Face configuration (use op::WrapperStructFace{} to disable it) const op::WrapperStructFace wrapperStructFace{FLAGS_face, faceNetInputSize, - op::flagsToRenderMode(FLAGS_face_render, FLAGS_3d, FLAGS_render_pose), + op::flagsToRenderMode(FLAGS_face_render, multipleView, FLAGS_render_pose), (float)FLAGS_face_alpha_pose, (float)FLAGS_face_alpha_heatmap, (float)FLAGS_face_render_threshold}; // Hand configuration (use op::WrapperStructHand{} to disable it) const op::WrapperStructHand wrapperStructHand{FLAGS_hand, handNetInputSize, FLAGS_hand_scale_number, (float)FLAGS_hand_scale_range, FLAGS_hand_tracking, - op::flagsToRenderMode(FLAGS_hand_render, FLAGS_3d, FLAGS_render_pose), + op::flagsToRenderMode(FLAGS_hand_render, multipleView, FLAGS_render_pose), (float)FLAGS_hand_alpha_pose, (float)FLAGS_hand_alpha_heatmap, (float)FLAGS_hand_render_threshold}; // Producer (use default to disable any input) diff --git a/examples/tutorial_wrapper/1_user_asynchronous_output.cpp b/examples/tutorial_wrapper/1_user_asynchronous_output.cpp index 7d274336ed6d072c0f131ccf27f9828236251b3f..555365de611a959106c0c9eddbc802b1b61baa3e 100644 --- a/examples/tutorial_wrapper/1_user_asynchronous_output.cpp +++ b/examples/tutorial_wrapper/1_user_asynchronous_output.cpp @@ -334,6 +334,8 @@ int openPoseTutorialWrapper1() const auto heatMapTypes = op::flagsToHeatMaps(FLAGS_heatmaps_add_parts, FLAGS_heatmaps_add_bkg, FLAGS_heatmaps_add_PAFs); const auto heatMapScale = op::flagsToHeatMapScaleMode(FLAGS_heatmaps_scale); + // >1 camera view? + const auto multipleView = (FLAGS_3d || FLAGS_3d_views > 1 || FLAGS_flir_camera); // Enabling Google Logging const bool enableGoogleLogging = true; // Logging @@ -345,7 +347,8 @@ int openPoseTutorialWrapper1() // Pose configuration (use WrapperStructPose{} for default and recommended configuration) const op::WrapperStructPose wrapperStructPose{!FLAGS_body_disable, netInputSize, outputSize, keypointScale, FLAGS_num_gpu, FLAGS_num_gpu_start, FLAGS_scale_number, - (float)FLAGS_scale_gap, op::flagsToRenderMode(FLAGS_render_pose, FLAGS_3d), + (float)FLAGS_scale_gap, + op::flagsToRenderMode(FLAGS_render_pose, multipleView), poseModel, !FLAGS_disable_blending, (float)FLAGS_alpha_pose, (float)FLAGS_alpha_heatmap, FLAGS_part_to_show, FLAGS_model_folder, heatMapTypes, heatMapScale, FLAGS_part_candidates, @@ -353,13 +356,13 @@ int openPoseTutorialWrapper1() enableGoogleLogging, FLAGS_3d}; // Face configuration (use op::WrapperStructFace{} to disable it) const op::WrapperStructFace wrapperStructFace{FLAGS_face, faceNetInputSize, - op::flagsToRenderMode(FLAGS_face_render, FLAGS_3d, FLAGS_render_pose), + op::flagsToRenderMode(FLAGS_face_render, multipleView, FLAGS_render_pose), (float)FLAGS_face_alpha_pose, (float)FLAGS_face_alpha_heatmap, (float)FLAGS_face_render_threshold}; // Hand configuration (use op::WrapperStructHand{} to disable it) const op::WrapperStructHand wrapperStructHand{FLAGS_hand, handNetInputSize, FLAGS_hand_scale_number, (float)FLAGS_hand_scale_range, FLAGS_hand_tracking, - op::flagsToRenderMode(FLAGS_hand_render, FLAGS_3d, FLAGS_render_pose), + op::flagsToRenderMode(FLAGS_hand_render, multipleView, FLAGS_render_pose), (float)FLAGS_hand_alpha_pose, (float)FLAGS_hand_alpha_heatmap, (float)FLAGS_hand_render_threshold}; // Producer (use default to disable any input) diff --git a/examples/tutorial_wrapper/2_user_synchronous.cpp b/examples/tutorial_wrapper/2_user_synchronous.cpp index 46f320a051bd7960c359f905373dcdb02d5b876b..8293e76bf4f00a4401364a78e7f52a29c59f95e6 100644 --- a/examples/tutorial_wrapper/2_user_synchronous.cpp +++ b/examples/tutorial_wrapper/2_user_synchronous.cpp @@ -125,6 +125,10 @@ DEFINE_bool(3d, false, "Running OpenPose 3-D re " 2) Performing 3-D reconstruction from the multiple views. 3) Displaying 3-D reconstruction" " results. Note that it will only display 1 person. If multiple people is present, it will" " fail."); +DEFINE_int32(3d_views, 1, "Complementary option to `--image_dir` or `--video`. OpenPose will read as many images per" + " iteration, allowing tasks such as stereo camera processing (`--3d`). Note that" + " `--camera_parameters_folder` must be set. OpenPose must find as many `xml` files in the" + " parameter folder as this number indicates."); // OpenPose Rendering DEFINE_int32(part_to_show, 0, "Prediction channel to visualize (default: 0). 0 for all the body parts, 1-18 for each body" " part heat map, 19 for the background heat map, 20 for all the body part heat maps" @@ -404,6 +408,8 @@ int openPoseTutorialWrapper2() const auto heatMapTypes = op::flagsToHeatMaps(FLAGS_heatmaps_add_parts, FLAGS_heatmaps_add_bkg, FLAGS_heatmaps_add_PAFs); const auto heatMapScale = op::flagsToHeatMapScaleMode(FLAGS_heatmaps_scale); + // >1 camera view? + const auto multipleView = (FLAGS_3d || FLAGS_3d_views > 1); // Enabling Google Logging const bool enableGoogleLogging = true; // Logging @@ -431,7 +437,8 @@ int openPoseTutorialWrapper2() op::log("Configuring OpenPose wrapper.", op::Priority::Low, __LINE__, __FUNCTION__, __FILE__); const op::WrapperStructPose wrapperStructPose{!FLAGS_body_disable, netInputSize, outputSize, keypointScale, FLAGS_num_gpu, FLAGS_num_gpu_start, FLAGS_scale_number, - (float)FLAGS_scale_gap, op::flagsToRenderMode(FLAGS_render_pose, FLAGS_3d), + (float)FLAGS_scale_gap, + op::flagsToRenderMode(FLAGS_render_pose, multipleView), poseModel, !FLAGS_disable_blending, (float)FLAGS_alpha_pose, (float)FLAGS_alpha_heatmap, FLAGS_part_to_show, FLAGS_model_folder, heatMapTypes, heatMapScale, FLAGS_part_candidates, @@ -439,13 +446,13 @@ int openPoseTutorialWrapper2() enableGoogleLogging, FLAGS_3d}; // Face configuration (use op::WrapperStructFace{} to disable it) const op::WrapperStructFace wrapperStructFace{FLAGS_face, faceNetInputSize, - op::flagsToRenderMode(FLAGS_face_render, FLAGS_3d, FLAGS_render_pose), + op::flagsToRenderMode(FLAGS_face_render, multipleView, FLAGS_render_pose), (float)FLAGS_face_alpha_pose, (float)FLAGS_face_alpha_heatmap, (float)FLAGS_face_render_threshold}; // Hand configuration (use op::WrapperStructHand{} to disable it) const op::WrapperStructHand wrapperStructHand{FLAGS_hand, handNetInputSize, FLAGS_hand_scale_number, (float)FLAGS_hand_scale_range, FLAGS_hand_tracking, - op::flagsToRenderMode(FLAGS_hand_render, FLAGS_3d, FLAGS_render_pose), + op::flagsToRenderMode(FLAGS_hand_render, multipleView, FLAGS_render_pose), (float)FLAGS_hand_alpha_pose, (float)FLAGS_hand_alpha_heatmap, (float)FLAGS_hand_render_threshold}; // Consumer (comment or use default argument to disable any output) diff --git a/examples/tutorial_wrapper/3_user_asynchronous.cpp b/examples/tutorial_wrapper/3_user_asynchronous.cpp index 985bc744ae178907fb31278f30264c4105fa78c7..53f8971f6a4d4a20b55ead13eb65153a3012ece9 100644 --- a/examples/tutorial_wrapper/3_user_asynchronous.cpp +++ b/examples/tutorial_wrapper/3_user_asynchronous.cpp @@ -125,6 +125,10 @@ DEFINE_bool(3d, false, "Running OpenPose 3-D re " 2) Performing 3-D reconstruction from the multiple views. 3) Displaying 3-D reconstruction" " results. Note that it will only display 1 person. If multiple people is present, it will" " fail."); +DEFINE_int32(3d_views, 1, "Complementary option to `--image_dir` or `--video`. OpenPose will read as many images per" + " iteration, allowing tasks such as stereo camera processing (`--3d`). Note that" + " `--camera_parameters_folder` must be set. OpenPose must find as many `xml` files in the" + " parameter folder as this number indicates."); // OpenPose Rendering DEFINE_int32(part_to_show, 0, "Prediction channel to visualize (default: 0). 0 for all the body parts, 1-18 for each body" " part heat map, 19 for the background heat map, 20 for all the body part heat maps" @@ -362,6 +366,8 @@ int openPoseTutorialWrapper3() const auto heatMapTypes = op::flagsToHeatMaps(FLAGS_heatmaps_add_parts, FLAGS_heatmaps_add_bkg, FLAGS_heatmaps_add_PAFs); const auto heatMapScale = op::flagsToHeatMapScaleMode(FLAGS_heatmaps_scale); + // >1 camera view? + const auto multipleView = (FLAGS_3d || FLAGS_3d_views > 1); // Enabling Google Logging const bool enableGoogleLogging = true; // Logging @@ -372,7 +378,8 @@ int openPoseTutorialWrapper3() // Pose configuration (use WrapperStructPose{} for default and recommended configuration) const op::WrapperStructPose wrapperStructPose{!FLAGS_body_disable, netInputSize, outputSize, keypointScale, FLAGS_num_gpu, FLAGS_num_gpu_start, FLAGS_scale_number, - (float)FLAGS_scale_gap, op::flagsToRenderMode(FLAGS_render_pose, FLAGS_3d), + (float)FLAGS_scale_gap, + op::flagsToRenderMode(FLAGS_render_pose, multipleView), poseModel, !FLAGS_disable_blending, (float)FLAGS_alpha_pose, (float)FLAGS_alpha_heatmap, FLAGS_part_to_show, FLAGS_model_folder, heatMapTypes, heatMapScale, FLAGS_part_candidates, @@ -380,13 +387,13 @@ int openPoseTutorialWrapper3() enableGoogleLogging, FLAGS_3d}; // Face configuration (use op::WrapperStructFace{} to disable it) const op::WrapperStructFace wrapperStructFace{FLAGS_face, faceNetInputSize, - op::flagsToRenderMode(FLAGS_face_render, FLAGS_3d, FLAGS_render_pose), + op::flagsToRenderMode(FLAGS_face_render, multipleView, FLAGS_render_pose), (float)FLAGS_face_alpha_pose, (float)FLAGS_face_alpha_heatmap, (float)FLAGS_face_render_threshold}; // Hand configuration (use op::WrapperStructHand{} to disable it) const op::WrapperStructHand wrapperStructHand{FLAGS_hand, handNetInputSize, FLAGS_hand_scale_number, (float)FLAGS_hand_scale_range, FLAGS_hand_tracking, - op::flagsToRenderMode(FLAGS_hand_render, FLAGS_3d, FLAGS_render_pose), + op::flagsToRenderMode(FLAGS_hand_render, multipleView, FLAGS_render_pose), (float)FLAGS_hand_alpha_pose, (float)FLAGS_hand_alpha_heatmap, (float)FLAGS_hand_render_threshold}; // Consumer (comment or use default argument to disable any output)