173 lines
8.3 KiB
Python
173 lines
8.3 KiB
Python
# Copyright 2023 The MediaPipe Authors.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
package(default_visibility = [
|
|
"//mediapipe/tasks:internal",
|
|
])
|
|
|
|
licenses(["notice"])
|
|
|
|
cc_library(
|
|
name = "pose_landmarker",
|
|
srcs = ["pose_landmarker.cc"],
|
|
hdrs = ["pose_landmarker.h"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":pose_landmarker_graph",
|
|
":pose_landmarker_result",
|
|
"//mediapipe/framework/api2:builder",
|
|
"//mediapipe/framework/api2:port",
|
|
"//mediapipe/framework/formats:image",
|
|
"//mediapipe/framework/formats:landmark_cc_proto",
|
|
"//mediapipe/framework/formats:rect_cc_proto",
|
|
"//mediapipe/tasks/cc:common",
|
|
"//mediapipe/tasks/cc/core:base_options",
|
|
"//mediapipe/tasks/cc/core:base_task_api",
|
|
"//mediapipe/tasks/cc/core:model_resources",
|
|
"//mediapipe/tasks/cc/core:task_runner",
|
|
"//mediapipe/tasks/cc/core:utils",
|
|
"//mediapipe/tasks/cc/core/proto:inference_subgraph_cc_proto",
|
|
"//mediapipe/tasks/cc/vision/core:base_vision_task_api",
|
|
"//mediapipe/tasks/cc/vision/core:image_processing_options",
|
|
"//mediapipe/tasks/cc/vision/core:running_mode",
|
|
"//mediapipe/tasks/cc/vision/core:vision_task_api_factory",
|
|
"//mediapipe/tasks/cc/vision/pose_detector/proto:pose_detector_graph_options_cc_proto",
|
|
"//mediapipe/tasks/cc/vision/pose_landmarker/proto:pose_landmarker_graph_options_cc_proto",
|
|
"//mediapipe/tasks/cc/vision/pose_landmarker/proto:pose_landmarks_detector_graph_options_cc_proto",
|
|
"@com_google_absl//absl/status:statusor",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "pose_landmarks_detector_graph",
|
|
srcs = ["pose_landmarks_detector_graph.cc"],
|
|
deps = [
|
|
"//mediapipe/calculators/core:begin_loop_calculator",
|
|
"//mediapipe/calculators/core:concatenate_vector_calculator",
|
|
"//mediapipe/calculators/core:constant_side_packet_calculator",
|
|
"//mediapipe/calculators/core:constant_side_packet_calculator_cc_proto",
|
|
"//mediapipe/calculators/core:end_loop_calculator",
|
|
"//mediapipe/calculators/core:gate_calculator",
|
|
"//mediapipe/calculators/core:side_packet_to_stream_calculator",
|
|
"//mediapipe/calculators/core:split_proto_list_calculator",
|
|
"//mediapipe/calculators/core:split_vector_calculator",
|
|
"//mediapipe/calculators/core:split_vector_calculator_cc_proto",
|
|
"//mediapipe/calculators/image:warp_affine_calculator",
|
|
"//mediapipe/calculators/image:warp_affine_calculator_cc_proto",
|
|
"//mediapipe/calculators/tensor:image_to_tensor_calculator_cc_proto",
|
|
"//mediapipe/calculators/tensor:inference_calculator",
|
|
"//mediapipe/calculators/tensor:tensors_to_floats_calculator",
|
|
"//mediapipe/calculators/tensor:tensors_to_landmarks_calculator",
|
|
"//mediapipe/calculators/tensor:tensors_to_landmarks_calculator_cc_proto",
|
|
"//mediapipe/calculators/tensor:tensors_to_segmentation_calculator",
|
|
"//mediapipe/calculators/tensor:tensors_to_segmentation_calculator_cc_proto",
|
|
"//mediapipe/calculators/util:alignment_points_to_rects_calculator",
|
|
"//mediapipe/calculators/util:detections_to_rects_calculator",
|
|
"//mediapipe/calculators/util:detections_to_rects_calculator_cc_proto",
|
|
"//mediapipe/calculators/util:inverse_matrix_calculator",
|
|
"//mediapipe/calculators/util:landmark_letterbox_removal_calculator",
|
|
"//mediapipe/calculators/util:landmark_projection_calculator",
|
|
"//mediapipe/calculators/util:landmarks_to_detection_calculator",
|
|
"//mediapipe/calculators/util:rect_transformation_calculator",
|
|
"//mediapipe/calculators/util:rect_transformation_calculator_cc_proto",
|
|
"//mediapipe/calculators/util:refine_landmarks_from_heatmap_calculator",
|
|
"//mediapipe/calculators/util:refine_landmarks_from_heatmap_calculator_cc_proto",
|
|
"//mediapipe/calculators/util:thresholding_calculator",
|
|
"//mediapipe/calculators/util:thresholding_calculator_cc_proto",
|
|
"//mediapipe/calculators/util:visibility_copy_calculator",
|
|
"//mediapipe/calculators/util:visibility_copy_calculator_cc_proto",
|
|
"//mediapipe/calculators/util:world_landmark_projection_calculator",
|
|
"//mediapipe/framework:subgraph",
|
|
"//mediapipe/framework/api2:builder",
|
|
"//mediapipe/framework/api2:port",
|
|
"//mediapipe/framework/api2/stream:get_vector_item",
|
|
"//mediapipe/framework/api2/stream:image_size",
|
|
"//mediapipe/framework/api2/stream:smoothing",
|
|
"//mediapipe/framework/formats:image",
|
|
"//mediapipe/framework/formats:landmark_cc_proto",
|
|
"//mediapipe/framework/formats:rect_cc_proto",
|
|
"//mediapipe/gpu:gpu_origin_cc_proto",
|
|
"//mediapipe/tasks/cc:common",
|
|
"//mediapipe/tasks/cc/components/processors:image_preprocessing_graph",
|
|
"//mediapipe/tasks/cc/core:model_resources",
|
|
"//mediapipe/tasks/cc/core:model_task_graph",
|
|
"//mediapipe/tasks/cc/vision/pose_landmarker/proto:pose_landmarks_detector_graph_options_cc_proto",
|
|
"//mediapipe/tasks/cc/vision/utils:image_tensor_specs",
|
|
"//mediapipe/util:graph_builder_utils",
|
|
"@com_google_absl//absl/status",
|
|
"@com_google_absl//absl/status:statusor",
|
|
],
|
|
alwayslink = 1,
|
|
)
|
|
|
|
cc_library(
|
|
name = "pose_landmarker_graph",
|
|
srcs = ["pose_landmarker_graph.cc"],
|
|
deps = [
|
|
":pose_landmarks_detector_graph",
|
|
"//mediapipe/calculators/core:clip_vector_size_calculator",
|
|
"//mediapipe/calculators/core:clip_vector_size_calculator_cc_proto",
|
|
"//mediapipe/calculators/core:gate_calculator",
|
|
"//mediapipe/calculators/core:gate_calculator_cc_proto",
|
|
"//mediapipe/calculators/core:pass_through_calculator",
|
|
"//mediapipe/calculators/core:previous_loopback_calculator",
|
|
"//mediapipe/calculators/image:image_properties_calculator",
|
|
"//mediapipe/calculators/util:association_calculator_cc_proto",
|
|
"//mediapipe/calculators/util:association_norm_rect_calculator",
|
|
"//mediapipe/calculators/util:collection_has_min_size_calculator",
|
|
"//mediapipe/calculators/util:collection_has_min_size_calculator_cc_proto",
|
|
"//mediapipe/framework/api2:builder",
|
|
"//mediapipe/framework/api2:port",
|
|
"//mediapipe/framework/formats:detection_cc_proto",
|
|
"//mediapipe/framework/formats:image",
|
|
"//mediapipe/framework/formats:landmark_cc_proto",
|
|
"//mediapipe/framework/formats:rect_cc_proto",
|
|
"//mediapipe/framework/port:status",
|
|
"//mediapipe/tasks/cc/components/utils:gate",
|
|
"//mediapipe/tasks/cc/core:model_asset_bundle_resources",
|
|
"//mediapipe/tasks/cc/core:model_resources_cache",
|
|
"//mediapipe/tasks/cc/core:model_task_graph",
|
|
"//mediapipe/tasks/cc/metadata/utils:zip_utils",
|
|
"//mediapipe/tasks/cc/vision/pose_detector:pose_detector_graph",
|
|
"//mediapipe/tasks/cc/vision/pose_detector/proto:pose_detector_graph_options_cc_proto",
|
|
"//mediapipe/tasks/cc/vision/pose_landmarker/proto:pose_landmarker_graph_options_cc_proto",
|
|
"//mediapipe/tasks/cc/vision/pose_landmarker/proto:pose_landmarks_detector_graph_options_cc_proto",
|
|
"//mediapipe/util:graph_builder_utils",
|
|
"@com_google_absl//absl/status",
|
|
],
|
|
alwayslink = 1,
|
|
)
|
|
|
|
cc_library(
|
|
name = "pose_landmarker_result",
|
|
srcs = ["pose_landmarker_result.cc"],
|
|
hdrs = ["pose_landmarker_result.h"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//mediapipe/framework/formats:image",
|
|
"//mediapipe/framework/formats:landmark_cc_proto",
|
|
"//mediapipe/tasks/cc/components/containers:landmark",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "pose_landmarks_connections",
|
|
hdrs = ["pose_landmarks_connections.h"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "pose_landmark",
|
|
hdrs = ["pose_landmark.h"],
|
|
)
|