mirror of
https://github.com/gosticks/openpose.git
synced 2026-08-12 20:30:20 +00:00
Changes for Python and Unity binds
This commit is contained in:
@@ -71,12 +71,12 @@ int tutorialApiCpp3()
|
||||
if (!FLAGS_write_keypoint.empty())
|
||||
op::log("Flag `write_keypoint` is deprecated and will eventually be removed."
|
||||
" Please, use `write_json` instead.", op::Priority::Max);
|
||||
// keypointScale
|
||||
const auto keypointScale = op::flagsToScaleMode(FLAGS_keypoint_scale);
|
||||
// keypointScaleMode
|
||||
const auto keypointScaleMode = op::flagsToScaleMode(FLAGS_keypoint_scale);
|
||||
// heatmaps to add
|
||||
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);
|
||||
const auto heatMapScaleMode = op::flagsToHeatMapScaleMode(FLAGS_heatmaps_scale);
|
||||
// >1 camera view?
|
||||
const auto multipleView = (FLAGS_3d || FLAGS_3d_views > 1);
|
||||
// Enabling Google Logging
|
||||
@@ -87,10 +87,10 @@ int tutorialApiCpp3()
|
||||
op::Wrapper opWrapper{op::ThreadManagerMode::Asynchronous};
|
||||
// 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_body_disable, netInputSize, outputSize, keypointScaleMode, FLAGS_num_gpu, FLAGS_num_gpu_start,
|
||||
FLAGS_scale_number, (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,
|
||||
FLAGS_part_to_show, FLAGS_model_folder, heatMapTypes, heatMapScaleMode, FLAGS_part_candidates,
|
||||
(float)FLAGS_render_threshold, FLAGS_number_people_max, FLAGS_maximize_positives, FLAGS_fps_max,
|
||||
FLAGS_prototxt_path, FLAGS_caffemodel_path, enableGoogleLogging};
|
||||
opWrapper.configure(wrapperStructPose);
|
||||
|
||||
@@ -206,12 +206,12 @@ int tutorialApiCpp4()
|
||||
if (!FLAGS_write_keypoint.empty())
|
||||
op::log("Flag `write_keypoint` is deprecated and will eventually be removed."
|
||||
" Please, use `write_json` instead.", op::Priority::Max);
|
||||
// keypointScale
|
||||
const auto keypointScale = op::flagsToScaleMode(FLAGS_keypoint_scale);
|
||||
// keypointScaleMode
|
||||
const auto keypointScaleMode = op::flagsToScaleMode(FLAGS_keypoint_scale);
|
||||
// heatmaps to add
|
||||
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);
|
||||
const auto heatMapScaleMode = op::flagsToHeatMapScaleMode(FLAGS_heatmaps_scale);
|
||||
// >1 camera view?
|
||||
const auto multipleView = (FLAGS_3d || FLAGS_3d_views > 1);
|
||||
// Enabling Google Logging
|
||||
@@ -222,10 +222,10 @@ int tutorialApiCpp4()
|
||||
op::WrapperT<UserDatum> opWrapperT{op::ThreadManagerMode::Asynchronous};
|
||||
// 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_body_disable, netInputSize, outputSize, keypointScaleMode, FLAGS_num_gpu, FLAGS_num_gpu_start,
|
||||
FLAGS_scale_number, (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,
|
||||
FLAGS_part_to_show, FLAGS_model_folder, heatMapTypes, heatMapScaleMode, FLAGS_part_candidates,
|
||||
(float)FLAGS_render_threshold, FLAGS_number_people_max, FLAGS_maximize_positives, FLAGS_fps_max,
|
||||
FLAGS_prototxt_path, FLAGS_caffemodel_path, enableGoogleLogging};
|
||||
opWrapperT.configure(wrapperStructPose);
|
||||
|
||||
@@ -148,12 +148,12 @@ int tutorialApiCpp5()
|
||||
if (!FLAGS_write_keypoint.empty())
|
||||
op::log("Flag `write_keypoint` is deprecated and will eventually be removed."
|
||||
" Please, use `write_json` instead.", op::Priority::Max);
|
||||
// keypointScale
|
||||
const auto keypointScale = op::flagsToScaleMode(FLAGS_keypoint_scale);
|
||||
// keypointScaleMode
|
||||
const auto keypointScaleMode = op::flagsToScaleMode(FLAGS_keypoint_scale);
|
||||
// heatmaps to add
|
||||
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);
|
||||
const auto heatMapScaleMode = op::flagsToHeatMapScaleMode(FLAGS_heatmaps_scale);
|
||||
// >1 camera view?
|
||||
const auto multipleView = (FLAGS_3d || FLAGS_3d_views > 1 || FLAGS_flir_camera);
|
||||
// Enabling Google Logging
|
||||
@@ -164,10 +164,10 @@ int tutorialApiCpp5()
|
||||
op::WrapperT<UserDatum> opWrapperT{op::ThreadManagerMode::AsynchronousOut};
|
||||
// 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_body_disable, netInputSize, outputSize, keypointScaleMode, FLAGS_num_gpu, FLAGS_num_gpu_start,
|
||||
FLAGS_scale_number, (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,
|
||||
FLAGS_part_to_show, FLAGS_model_folder, heatMapTypes, heatMapScaleMode, FLAGS_part_candidates,
|
||||
(float)FLAGS_render_threshold, FLAGS_number_people_max, FLAGS_maximize_positives, FLAGS_fps_max,
|
||||
FLAGS_prototxt_path, FLAGS_caffemodel_path, enableGoogleLogging};
|
||||
opWrapperT.configure(wrapperStructPose);
|
||||
|
||||
@@ -108,12 +108,12 @@ int tutorialApiCpp6()
|
||||
if (!FLAGS_write_keypoint.empty())
|
||||
op::log("Flag `write_keypoint` is deprecated and will eventually be removed."
|
||||
" Please, use `write_json` instead.", op::Priority::Max);
|
||||
// keypointScale
|
||||
const auto keypointScale = op::flagsToScaleMode(FLAGS_keypoint_scale);
|
||||
// keypointScaleMode
|
||||
const auto keypointScaleMode = op::flagsToScaleMode(FLAGS_keypoint_scale);
|
||||
// heatmaps to add
|
||||
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);
|
||||
const auto heatMapScaleMode = op::flagsToHeatMapScaleMode(FLAGS_heatmaps_scale);
|
||||
// >1 camera view?
|
||||
const auto multipleView = (FLAGS_3d || FLAGS_3d_views > 1 || FLAGS_flir_camera);
|
||||
// Enabling Google Logging
|
||||
@@ -132,10 +132,10 @@ int tutorialApiCpp6()
|
||||
|
||||
// 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_body_disable, netInputSize, outputSize, keypointScaleMode, FLAGS_num_gpu, FLAGS_num_gpu_start,
|
||||
FLAGS_scale_number, (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,
|
||||
FLAGS_part_to_show, FLAGS_model_folder, heatMapTypes, heatMapScaleMode, FLAGS_part_candidates,
|
||||
(float)FLAGS_render_threshold, FLAGS_number_people_max, FLAGS_maximize_positives, FLAGS_fps_max,
|
||||
FLAGS_prototxt_path, FLAGS_caffemodel_path, enableGoogleLogging};
|
||||
opWrapperT.configure(wrapperStructPose);
|
||||
|
||||
@@ -143,12 +143,12 @@ int tutorialApiCpp7()
|
||||
if (!FLAGS_write_keypoint.empty())
|
||||
op::log("Flag `write_keypoint` is deprecated and will eventually be removed."
|
||||
" Please, use `write_json` instead.", op::Priority::Max);
|
||||
// keypointScale
|
||||
const auto keypointScale = op::flagsToScaleMode(FLAGS_keypoint_scale);
|
||||
// keypointScaleMode
|
||||
const auto keypointScaleMode = op::flagsToScaleMode(FLAGS_keypoint_scale);
|
||||
// heatmaps to add
|
||||
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);
|
||||
const auto heatMapScaleMode = op::flagsToHeatMapScaleMode(FLAGS_heatmaps_scale);
|
||||
// >1 camera view?
|
||||
// const auto multipleView = (FLAGS_3d || FLAGS_3d_views > 1 || FLAGS_flir_camera);
|
||||
const auto multipleView = false;
|
||||
@@ -168,10 +168,10 @@ int tutorialApiCpp7()
|
||||
|
||||
// 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_body_disable, netInputSize, outputSize, keypointScaleMode, FLAGS_num_gpu, FLAGS_num_gpu_start,
|
||||
FLAGS_scale_number, (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,
|
||||
FLAGS_part_to_show, FLAGS_model_folder, heatMapTypes, heatMapScaleMode, FLAGS_part_candidates,
|
||||
(float)FLAGS_render_threshold, FLAGS_number_people_max, FLAGS_maximize_positives, FLAGS_fps_max,
|
||||
FLAGS_prototxt_path, FLAGS_caffemodel_path, enableGoogleLogging};
|
||||
opWrapperT.configure(wrapperStructPose);
|
||||
|
||||
@@ -156,12 +156,12 @@ int tutorialApiCpp8()
|
||||
if (!FLAGS_write_keypoint.empty())
|
||||
op::log("Flag `write_keypoint` is deprecated and will eventually be removed."
|
||||
" Please, use `write_json` instead.", op::Priority::Max);
|
||||
// keypointScale
|
||||
const auto keypointScale = op::flagsToScaleMode(FLAGS_keypoint_scale);
|
||||
// keypointScaleMode
|
||||
const auto keypointScaleMode = op::flagsToScaleMode(FLAGS_keypoint_scale);
|
||||
// heatmaps to add
|
||||
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);
|
||||
const auto heatMapScaleMode = op::flagsToHeatMapScaleMode(FLAGS_heatmaps_scale);
|
||||
// >1 camera view?
|
||||
const auto multipleView = (FLAGS_3d || FLAGS_3d_views > 1 || FLAGS_flir_camera);
|
||||
// Enabling Google Logging
|
||||
@@ -180,10 +180,10 @@ int tutorialApiCpp8()
|
||||
|
||||
// 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_body_disable, netInputSize, outputSize, keypointScaleMode, FLAGS_num_gpu, FLAGS_num_gpu_start,
|
||||
FLAGS_scale_number, (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,
|
||||
FLAGS_part_to_show, FLAGS_model_folder, heatMapTypes, heatMapScaleMode, FLAGS_part_candidates,
|
||||
(float)FLAGS_render_threshold, FLAGS_number_people_max, FLAGS_maximize_positives, FLAGS_fps_max,
|
||||
FLAGS_prototxt_path, FLAGS_caffemodel_path, enableGoogleLogging};
|
||||
opWrapperT.configure(wrapperStructPose);
|
||||
|
||||
@@ -245,12 +245,12 @@ int tutorialApiCpp9()
|
||||
if (!FLAGS_write_keypoint.empty())
|
||||
op::log("Flag `write_keypoint` is deprecated and will eventually be removed."
|
||||
" Please, use `write_json` instead.", op::Priority::Max);
|
||||
// keypointScale
|
||||
const auto keypointScale = op::flagsToScaleMode(FLAGS_keypoint_scale);
|
||||
// keypointScaleMode
|
||||
const auto keypointScaleMode = op::flagsToScaleMode(FLAGS_keypoint_scale);
|
||||
// heatmaps to add
|
||||
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);
|
||||
const auto heatMapScaleMode = op::flagsToHeatMapScaleMode(FLAGS_heatmaps_scale);
|
||||
// >1 camera view?
|
||||
const auto multipleView = (FLAGS_3d || FLAGS_3d_views > 1);
|
||||
// Enabling Google Logging
|
||||
@@ -279,10 +279,10 @@ int tutorialApiCpp9()
|
||||
|
||||
// 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_body_disable, netInputSize, outputSize, keypointScaleMode, FLAGS_num_gpu, FLAGS_num_gpu_start,
|
||||
FLAGS_scale_number, (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,
|
||||
FLAGS_part_to_show, FLAGS_model_folder, heatMapTypes, heatMapScaleMode, FLAGS_part_candidates,
|
||||
(float)FLAGS_render_threshold, FLAGS_number_people_max, FLAGS_maximize_positives, FLAGS_fps_max,
|
||||
FLAGS_prototxt_path, FLAGS_caffemodel_path, enableGoogleLogging};
|
||||
opWrapperT.configure(wrapperStructPose);
|
||||
|
||||
@@ -23,7 +23,7 @@ foreach(EXAMPLE_FILE ${EXAMPLE_FILES})
|
||||
|
||||
message(STATUS "Adding Example ${EXE_NAME}")
|
||||
add_executable(${EXE_NAME} ${EXAMPLE_FILE})
|
||||
target_link_libraries(${EXE_NAME} openpose_src ${examples_3rdparty_libraries})
|
||||
target_link_libraries(${EXE_NAME} openpose ${examples_3rdparty_libraries})
|
||||
|
||||
if (WIN32)
|
||||
set_property(TARGET ${EXE_NAME} PROPERTY FOLDER "Examples/Tutorial/C++ API")
|
||||
|
||||
Reference in New Issue
Block a user