Internal change

PiperOrigin-RevId: 489842199
This commit is contained in:
MediaPipe Team 2022-11-20 14:24:21 -08:00 committed by Copybara-Service
parent a367753eda
commit 6cf464636b
16 changed files with 278 additions and 233 deletions

View File

@ -21,3 +21,10 @@ package_group(
"//mediapipe/tasks/...", "//mediapipe/tasks/...",
], ],
) )
package_group(
name = "users",
includes = [
":internal",
],
)

View File

@ -16,6 +16,35 @@ package(default_visibility = ["//mediapipe/tasks:internal"])
licenses(["notice"]) licenses(["notice"])
# Docs for Mediapipe Tasks Audio Classifier
# https://developers.google.com/mediapipe/solutions/audio/audio_classifier
cc_library(
name = "audio_classifier",
srcs = ["audio_classifier.cc"],
hdrs = ["audio_classifier.h"],
visibility = [
"//mediapipe/tasks:users",
],
deps = [
":audio_classifier_graph",
"//mediapipe/framework/api2:builder",
"//mediapipe/framework/formats:matrix",
"//mediapipe/tasks/cc/audio/audio_classifier/proto:audio_classifier_graph_options_cc_proto",
"//mediapipe/tasks/cc/audio/core:audio_task_api_factory",
"//mediapipe/tasks/cc/audio/core:base_audio_task_api",
"//mediapipe/tasks/cc/audio/core:running_mode",
"//mediapipe/tasks/cc/components/containers:classification_result",
"//mediapipe/tasks/cc/components/containers/proto:classifications_cc_proto",
"//mediapipe/tasks/cc/components/processors:classifier_options",
"//mediapipe/tasks/cc/components/processors/proto:classifier_options_cc_proto",
"//mediapipe/tasks/cc/core:base_options",
"//mediapipe/tasks/cc/core:task_runner",
"//mediapipe/tasks/cc/core/proto:inference_subgraph_cc_proto",
"@com_google_absl//absl/status:statusor",
"@org_tensorflow//tensorflow/lite/core/api:op_resolver",
],
)
cc_library( cc_library(
name = "audio_classifier_graph", name = "audio_classifier_graph",
srcs = ["audio_classifier_graph.cc"], srcs = ["audio_classifier_graph.cc"],
@ -52,28 +81,4 @@ cc_library(
alwayslink = 1, alwayslink = 1,
) )
cc_library(
name = "audio_classifier",
srcs = ["audio_classifier.cc"],
hdrs = ["audio_classifier.h"],
deps = [
":audio_classifier_graph",
"//mediapipe/framework/api2:builder",
"//mediapipe/framework/formats:matrix",
"//mediapipe/tasks/cc/audio/audio_classifier/proto:audio_classifier_graph_options_cc_proto",
"//mediapipe/tasks/cc/audio/core:audio_task_api_factory",
"//mediapipe/tasks/cc/audio/core:base_audio_task_api",
"//mediapipe/tasks/cc/audio/core:running_mode",
"//mediapipe/tasks/cc/components/containers:classification_result",
"//mediapipe/tasks/cc/components/containers/proto:classifications_cc_proto",
"//mediapipe/tasks/cc/components/processors:classifier_options",
"//mediapipe/tasks/cc/components/processors/proto:classifier_options_cc_proto",
"//mediapipe/tasks/cc/core:base_options",
"//mediapipe/tasks/cc/core:task_runner",
"//mediapipe/tasks/cc/core/proto:inference_subgraph_cc_proto",
"@com_google_absl//absl/status:statusor",
"@org_tensorflow//tensorflow/lite/core/api:op_resolver",
],
)
# TODO: mediapipe/tasks/cc/audio/utils:test_utils does not compile in the OSS build # TODO: mediapipe/tasks/cc/audio/utils:test_utils does not compile in the OSS build

View File

@ -16,6 +16,36 @@ package(default_visibility = ["//mediapipe/tasks:internal"])
licenses(["notice"]) licenses(["notice"])
# Docs for Mediapipe Tasks Audio Embedder
# https://developers.google.com/mediapipe/solutions/audio/audio_embedder
cc_library(
name = "audio_embedder",
srcs = ["audio_embedder.cc"],
hdrs = ["audio_embedder.h"],
visibility = [
"//mediapipe/tasks:users",
],
deps = [
":audio_embedder_graph",
"//mediapipe/framework/api2:builder",
"//mediapipe/framework/formats:matrix",
"//mediapipe/tasks/cc/audio/audio_embedder/proto:audio_embedder_graph_options_cc_proto",
"//mediapipe/tasks/cc/audio/core:audio_task_api_factory",
"//mediapipe/tasks/cc/audio/core:base_audio_task_api",
"//mediapipe/tasks/cc/audio/core:running_mode",
"//mediapipe/tasks/cc/components/containers:embedding_result",
"//mediapipe/tasks/cc/components/containers/proto:embeddings_cc_proto",
"//mediapipe/tasks/cc/components/processors:embedder_options",
"//mediapipe/tasks/cc/components/processors/proto:embedder_options_cc_proto",
"//mediapipe/tasks/cc/components/utils:cosine_similarity",
"//mediapipe/tasks/cc/core:base_options",
"//mediapipe/tasks/cc/core:task_runner",
"//mediapipe/tasks/cc/core/proto:inference_subgraph_cc_proto",
"@com_google_absl//absl/status:statusor",
"@org_tensorflow//tensorflow/lite/core/api:op_resolver",
],
)
cc_library( cc_library(
name = "audio_embedder_graph", name = "audio_embedder_graph",
srcs = ["audio_embedder_graph.cc"], srcs = ["audio_embedder_graph.cc"],
@ -51,29 +81,4 @@ cc_library(
alwayslink = 1, alwayslink = 1,
) )
cc_library(
name = "audio_embedder",
srcs = ["audio_embedder.cc"],
hdrs = ["audio_embedder.h"],
deps = [
":audio_embedder_graph",
"//mediapipe/framework/api2:builder",
"//mediapipe/framework/formats:matrix",
"//mediapipe/tasks/cc/audio/audio_embedder/proto:audio_embedder_graph_options_cc_proto",
"//mediapipe/tasks/cc/audio/core:audio_task_api_factory",
"//mediapipe/tasks/cc/audio/core:base_audio_task_api",
"//mediapipe/tasks/cc/audio/core:running_mode",
"//mediapipe/tasks/cc/components/containers:embedding_result",
"//mediapipe/tasks/cc/components/containers/proto:embeddings_cc_proto",
"//mediapipe/tasks/cc/components/processors:embedder_options",
"//mediapipe/tasks/cc/components/processors/proto:embedder_options_cc_proto",
"//mediapipe/tasks/cc/components/utils:cosine_similarity",
"//mediapipe/tasks/cc/core:base_options",
"//mediapipe/tasks/cc/core:task_runner",
"//mediapipe/tasks/cc/core/proto:inference_subgraph_cc_proto",
"@com_google_absl//absl/status:statusor",
"@org_tensorflow//tensorflow/lite/core/api:op_resolver",
],
)
# TODO: mediapipe/tasks/cc/audio/utils:test_utils does not compile in the OSS build # TODO: mediapipe/tasks/cc/audio/utils:test_utils does not compile in the OSS build

View File

@ -19,6 +19,7 @@ package(default_visibility = ["//mediapipe/tasks:internal"])
cc_library( cc_library(
name = "running_mode", name = "running_mode",
hdrs = ["running_mode.h"], hdrs = ["running_mode.h"],
visibility = ["//visibility:public"],
) )
cc_library( cc_library(

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
package(default_visibility = ["//mediapipe/tasks:internal"]) package(default_visibility = ["//visibility:public"])
licenses(["notice"]) licenses(["notice"])

View File

@ -20,6 +20,7 @@ cc_library(
name = "classifier_options", name = "classifier_options",
srcs = ["classifier_options.cc"], srcs = ["classifier_options.cc"],
hdrs = ["classifier_options.h"], hdrs = ["classifier_options.h"],
visibility = ["//visibility:public"],
deps = ["//mediapipe/tasks/cc/components/processors/proto:classifier_options_cc_proto"], deps = ["//mediapipe/tasks/cc/components/processors/proto:classifier_options_cc_proto"],
) )
@ -67,6 +68,7 @@ cc_library(
name = "embedder_options", name = "embedder_options",
srcs = ["embedder_options.cc"], srcs = ["embedder_options.cc"],
hdrs = ["embedder_options.h"], hdrs = ["embedder_options.h"],
visibility = ["//visibility:public"],
deps = ["//mediapipe/tasks/cc/components/processors/proto:embedder_options_cc_proto"], deps = ["//mediapipe/tasks/cc/components/processors/proto:embedder_options_cc_proto"],
) )

View File

@ -22,9 +22,7 @@ cc_library(
name = "base_options", name = "base_options",
srcs = ["base_options.cc"], srcs = ["base_options.cc"],
hdrs = ["base_options.h"], hdrs = ["base_options.h"],
visibility = [ visibility = ["//visibility:public"],
"//mediapipe/tasks:internal",
],
deps = [ deps = [
":mediapipe_builtin_op_resolver", ":mediapipe_builtin_op_resolver",
"//mediapipe/calculators/tensor:inference_calculator_cc_proto", "//mediapipe/calculators/tensor:inference_calculator_cc_proto",

View File

@ -16,6 +16,33 @@ package(default_visibility = ["//mediapipe/tasks:internal"])
licenses(["notice"]) licenses(["notice"])
# Docs for Mediapipe Tasks Text Classifier
# https://developers.google.com/mediapipe/solutions/text/text_classifier
cc_library(
name = "text_classifier",
srcs = ["text_classifier.cc"],
hdrs = ["text_classifier.h"],
visibility = ["//visibility:public"],
deps = [
":text_classifier_graph",
"//mediapipe/framework:packet",
"//mediapipe/framework/api2:builder",
"//mediapipe/tasks/cc/components/containers:category",
"//mediapipe/tasks/cc/components/containers:classification_result",
"//mediapipe/tasks/cc/components/containers/proto:classifications_cc_proto",
"//mediapipe/tasks/cc/components/processors:classifier_options",
"//mediapipe/tasks/cc/components/processors/proto:classifier_options_cc_proto",
"//mediapipe/tasks/cc/core:base_options",
"//mediapipe/tasks/cc/core:base_task_api",
"//mediapipe/tasks/cc/core:task_api_factory",
"//mediapipe/tasks/cc/text/text_classifier/proto:text_classifier_graph_options_cc_proto",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@org_tensorflow//tensorflow/lite/core/api:op_resolver",
],
)
cc_library( cc_library(
name = "text_classifier_graph", name = "text_classifier_graph",
srcs = ["text_classifier_graph.cc"], srcs = ["text_classifier_graph.cc"],
@ -41,30 +68,6 @@ cc_library(
alwayslink = 1, alwayslink = 1,
) )
cc_library(
name = "text_classifier",
srcs = ["text_classifier.cc"],
hdrs = ["text_classifier.h"],
deps = [
":text_classifier_graph",
"//mediapipe/framework:packet",
"//mediapipe/framework/api2:builder",
"//mediapipe/tasks/cc/components/containers:category",
"//mediapipe/tasks/cc/components/containers:classification_result",
"//mediapipe/tasks/cc/components/containers/proto:classifications_cc_proto",
"//mediapipe/tasks/cc/components/processors:classifier_options",
"//mediapipe/tasks/cc/components/processors/proto:classifier_options_cc_proto",
"//mediapipe/tasks/cc/core:base_options",
"//mediapipe/tasks/cc/core:base_task_api",
"//mediapipe/tasks/cc/core:task_api_factory",
"//mediapipe/tasks/cc/text/text_classifier/proto:text_classifier_graph_options_cc_proto",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@org_tensorflow//tensorflow/lite/core/api:op_resolver",
],
)
cc_test( cc_test(
name = "text_classifier_test", name = "text_classifier_test",
srcs = ["text_classifier_test.cc"], srcs = ["text_classifier_test.cc"],

View File

@ -16,10 +16,13 @@ package(default_visibility = ["//mediapipe/tasks:internal"])
licenses(["notice"]) licenses(["notice"])
# Docs for Mediapipe Tasks Text Embedder
# https://developers.google.com/mediapipe/solutions/text/text_embedder
cc_library( cc_library(
name = "text_embedder", name = "text_embedder",
srcs = ["text_embedder.cc"], srcs = ["text_embedder.cc"],
hdrs = ["text_embedder.h"], hdrs = ["text_embedder.h"],
visibility = ["//visibility:public"],
deps = [ deps = [
":text_embedder_graph", ":text_embedder_graph",
"//mediapipe/calculators/tensor:inference_calculator_cc_proto", "//mediapipe/calculators/tensor:inference_calculator_cc_proto",

View File

@ -19,11 +19,13 @@ package(default_visibility = ["//mediapipe/tasks:internal"])
cc_library( cc_library(
name = "running_mode", name = "running_mode",
hdrs = ["running_mode.h"], hdrs = ["running_mode.h"],
visibility = ["//visibility:public"],
) )
cc_library( cc_library(
name = "image_processing_options", name = "image_processing_options",
hdrs = ["image_processing_options.h"], hdrs = ["image_processing_options.h"],
visibility = ["//visibility:public"],
deps = [ deps = [
"//mediapipe/tasks/cc/components/containers:rect", "//mediapipe/tasks/cc/components/containers:rect",
], ],

View File

@ -18,6 +18,52 @@ package(default_visibility = [
licenses(["notice"]) licenses(["notice"])
# Docs for Mediapipe Tasks Gesture Recognizer
# https://developers.google.com/mediapipe/solutions/vision/gesture_recognizer
cc_library(
name = "gesture_recognizer",
srcs = ["gesture_recognizer.cc"],
hdrs = ["gesture_recognizer.h"],
visibility = ["//visibility:public"],
deps = [
":gesture_recognizer_graph",
":gesture_recognizer_result",
":hand_gesture_recognizer_graph",
"//mediapipe/framework:packet",
"//mediapipe/framework/api2:builder",
"//mediapipe/framework/api2:port",
"//mediapipe/framework/formats:classification_cc_proto",
"//mediapipe/framework/formats:image",
"//mediapipe/framework/formats:landmark_cc_proto",
"//mediapipe/framework/formats:rect_cc_proto",
"//mediapipe/tasks/cc:common",
"//mediapipe/tasks/cc/components:image_preprocessing",
"//mediapipe/tasks/cc/components/processors:classifier_options",
"//mediapipe/tasks/cc/components/processors/proto:classifier_options_cc_proto",
"//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/gesture_recognizer/proto:gesture_classifier_graph_options_cc_proto",
"//mediapipe/tasks/cc/vision/gesture_recognizer/proto:gesture_recognizer_graph_options_cc_proto",
"//mediapipe/tasks/cc/vision/gesture_recognizer/proto:hand_gesture_recognizer_graph_options_cc_proto",
"//mediapipe/tasks/cc/vision/hand_detector/proto:hand_detector_graph_options_cc_proto",
"//mediapipe/tasks/cc/vision/hand_landmarker/proto:hand_landmarker_graph_options_cc_proto",
"//mediapipe/tasks/cc/vision/hand_landmarker/proto:hand_landmarks_detector_graph_options_cc_proto",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@org_tensorflow//tensorflow/lite/core/api:op_resolver",
"@org_tensorflow//tensorflow/lite/kernels:builtin_ops",
],
)
cc_library( cc_library(
name = "handedness_util", name = "handedness_util",
srcs = ["handedness_util.cc"], srcs = ["handedness_util.cc"],
@ -127,51 +173,9 @@ cc_library(
cc_library( cc_library(
name = "gesture_recognizer_result", name = "gesture_recognizer_result",
hdrs = ["gesture_recognizer_result.h"], hdrs = ["gesture_recognizer_result.h"],
visibility = ["//visibility:public"],
deps = [ deps = [
"//mediapipe/framework/formats:classification_cc_proto", "//mediapipe/framework/formats:classification_cc_proto",
"//mediapipe/framework/formats:landmark_cc_proto", "//mediapipe/framework/formats:landmark_cc_proto",
], ],
) )
cc_library(
name = "gesture_recognizer",
srcs = ["gesture_recognizer.cc"],
hdrs = ["gesture_recognizer.h"],
deps = [
":gesture_recognizer_graph",
":gesture_recognizer_result",
":hand_gesture_recognizer_graph",
"//mediapipe/framework:packet",
"//mediapipe/framework/api2:builder",
"//mediapipe/framework/api2:port",
"//mediapipe/framework/formats:classification_cc_proto",
"//mediapipe/framework/formats:image",
"//mediapipe/framework/formats:landmark_cc_proto",
"//mediapipe/framework/formats:rect_cc_proto",
"//mediapipe/tasks/cc:common",
"//mediapipe/tasks/cc/components:image_preprocessing",
"//mediapipe/tasks/cc/components/processors:classifier_options",
"//mediapipe/tasks/cc/components/processors/proto:classifier_options_cc_proto",
"//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/gesture_recognizer/proto:gesture_classifier_graph_options_cc_proto",
"//mediapipe/tasks/cc/vision/gesture_recognizer/proto:gesture_recognizer_graph_options_cc_proto",
"//mediapipe/tasks/cc/vision/gesture_recognizer/proto:hand_gesture_recognizer_graph_options_cc_proto",
"//mediapipe/tasks/cc/vision/hand_detector/proto:hand_detector_graph_options_cc_proto",
"//mediapipe/tasks/cc/vision/hand_landmarker/proto:hand_landmarker_graph_options_cc_proto",
"//mediapipe/tasks/cc/vision/hand_landmarker/proto:hand_landmarks_detector_graph_options_cc_proto",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@org_tensorflow//tensorflow/lite/core/api:op_resolver",
"@org_tensorflow//tensorflow/lite/kernels:builtin_ops",
],
)

View File

@ -18,6 +18,43 @@ package(default_visibility = [
licenses(["notice"]) licenses(["notice"])
# Docs for Mediapipe Tasks Hand Landmarker
# https://developers.google.com/mediapipe/solutions/vision/hand_landmarker
cc_library(
name = "hand_landmarker",
srcs = ["hand_landmarker.cc"],
hdrs = ["hand_landmarker.h"],
visibility = ["//visibility:public"],
deps = [
":hand_landmarker_graph",
":hand_landmarker_result",
"//mediapipe/framework/api2:builder",
"//mediapipe/framework/api2:port",
"//mediapipe/framework/formats:classification_cc_proto",
"//mediapipe/framework/formats:image",
"//mediapipe/framework/formats:landmark_cc_proto",
"//mediapipe/framework/formats:rect_cc_proto",
"//mediapipe/tasks/cc:common",
"//mediapipe/tasks/cc/components:image_preprocessing",
"//mediapipe/tasks/cc/components/processors:classifier_options",
"//mediapipe/tasks/cc/components/processors/proto:classifier_options_cc_proto",
"//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/hand_detector/proto:hand_detector_graph_options_cc_proto",
"//mediapipe/tasks/cc/vision/hand_landmarker/proto:hand_landmarker_graph_options_cc_proto",
"//mediapipe/tasks/cc/vision/hand_landmarker/proto:hand_landmarks_detector_graph_options_cc_proto",
"@com_google_absl//absl/status:statusor",
],
)
cc_library( cc_library(
name = "hand_landmarks_detector_graph", name = "hand_landmarks_detector_graph",
srcs = ["hand_landmarks_detector_graph.cc"], srcs = ["hand_landmarks_detector_graph.cc"],
@ -113,44 +150,11 @@ cc_library(
cc_library( cc_library(
name = "hand_landmarker_result", name = "hand_landmarker_result",
hdrs = ["hand_landmarker_result.h"], hdrs = ["hand_landmarker_result.h"],
visibility = ["//visibility:public"],
deps = [ deps = [
"//mediapipe/framework/formats:classification_cc_proto", "//mediapipe/framework/formats:classification_cc_proto",
"//mediapipe/framework/formats:landmark_cc_proto", "//mediapipe/framework/formats:landmark_cc_proto",
], ],
) )
cc_library(
name = "hand_landmarker",
srcs = ["hand_landmarker.cc"],
hdrs = ["hand_landmarker.h"],
deps = [
":hand_landmarker_graph",
":hand_landmarker_result",
"//mediapipe/framework/api2:builder",
"//mediapipe/framework/api2:port",
"//mediapipe/framework/formats:classification_cc_proto",
"//mediapipe/framework/formats:image",
"//mediapipe/framework/formats:landmark_cc_proto",
"//mediapipe/framework/formats:rect_cc_proto",
"//mediapipe/tasks/cc:common",
"//mediapipe/tasks/cc/components:image_preprocessing",
"//mediapipe/tasks/cc/components/processors:classifier_options",
"//mediapipe/tasks/cc/components/processors/proto:classifier_options_cc_proto",
"//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/hand_detector/proto:hand_detector_graph_options_cc_proto",
"//mediapipe/tasks/cc/vision/hand_landmarker/proto:hand_landmarker_graph_options_cc_proto",
"//mediapipe/tasks/cc/vision/hand_landmarker/proto:hand_landmarks_detector_graph_options_cc_proto",
"@com_google_absl//absl/status:statusor",
],
)
# TODO: Enable this test # TODO: Enable this test

View File

@ -16,33 +16,13 @@ package(default_visibility = ["//mediapipe/tasks:internal"])
licenses(["notice"]) licenses(["notice"])
cc_library( # Docs for Mediapipe Tasks Image Classifier
name = "image_classifier_graph", # https://developers.google.com/mediapipe/solutions/vision/image_classifier
srcs = ["image_classifier_graph.cc"],
deps = [
"//mediapipe/calculators/tensor:inference_calculator",
"//mediapipe/framework:calculator_framework",
"//mediapipe/framework/api2:builder",
"//mediapipe/framework/api2:port",
"//mediapipe/framework/formats:image",
"//mediapipe/framework/formats:rect_cc_proto",
"//mediapipe/tasks/cc/components:image_preprocessing",
"//mediapipe/tasks/cc/components:image_preprocessing_options_cc_proto",
"//mediapipe/tasks/cc/components/containers/proto:classifications_cc_proto",
"//mediapipe/tasks/cc/components/processors:classification_postprocessing_graph",
"//mediapipe/tasks/cc/components/processors/proto:classification_postprocessing_graph_options_cc_proto",
"//mediapipe/tasks/cc/core:model_resources",
"//mediapipe/tasks/cc/core:model_task_graph",
"//mediapipe/tasks/cc/vision/image_classifier/proto:image_classifier_graph_options_cc_proto",
"@com_google_absl//absl/status:statusor",
],
alwayslink = 1,
)
cc_library( cc_library(
name = "image_classifier", name = "image_classifier",
srcs = ["image_classifier.cc"], srcs = ["image_classifier.cc"],
hdrs = ["image_classifier.h"], hdrs = ["image_classifier.h"],
visibility = ["//visibility:public"],
deps = [ deps = [
":image_classifier_graph", ":image_classifier_graph",
"//mediapipe/framework:packet", "//mediapipe/framework:packet",
@ -69,4 +49,27 @@ cc_library(
], ],
) )
cc_library(
name = "image_classifier_graph",
srcs = ["image_classifier_graph.cc"],
deps = [
"//mediapipe/calculators/tensor:inference_calculator",
"//mediapipe/framework:calculator_framework",
"//mediapipe/framework/api2:builder",
"//mediapipe/framework/api2:port",
"//mediapipe/framework/formats:image",
"//mediapipe/framework/formats:rect_cc_proto",
"//mediapipe/tasks/cc/components:image_preprocessing",
"//mediapipe/tasks/cc/components:image_preprocessing_options_cc_proto",
"//mediapipe/tasks/cc/components/containers/proto:classifications_cc_proto",
"//mediapipe/tasks/cc/components/processors:classification_postprocessing_graph",
"//mediapipe/tasks/cc/components/processors/proto:classification_postprocessing_graph_options_cc_proto",
"//mediapipe/tasks/cc/core:model_resources",
"//mediapipe/tasks/cc/core:model_task_graph",
"//mediapipe/tasks/cc/vision/image_classifier/proto:image_classifier_graph_options_cc_proto",
"@com_google_absl//absl/status:statusor",
],
alwayslink = 1,
)
# TODO: This test fails in OSS # TODO: This test fails in OSS

View File

@ -16,33 +16,13 @@ package(default_visibility = ["//mediapipe/tasks:internal"])
licenses(["notice"]) licenses(["notice"])
cc_library( # Docs for Mediapipe Tasks Image Embedder
name = "image_embedder_graph", # https://developers.google.com/mediapipe/solutions/vision/image_embedder
srcs = ["image_embedder_graph.cc"],
deps = [
"//mediapipe/calculators/tensor:inference_calculator",
"//mediapipe/framework:calculator_framework",
"//mediapipe/framework/api2:builder",
"//mediapipe/framework/api2:port",
"//mediapipe/framework/formats:image",
"//mediapipe/framework/formats:rect_cc_proto",
"//mediapipe/tasks/cc/components:image_preprocessing",
"//mediapipe/tasks/cc/components:image_preprocessing_options_cc_proto",
"//mediapipe/tasks/cc/components/calculators:tensors_to_embeddings_calculator",
"//mediapipe/tasks/cc/components/containers/proto:embeddings_cc_proto",
"//mediapipe/tasks/cc/components/processors:embedding_postprocessing_graph",
"//mediapipe/tasks/cc/components/processors/proto:embedding_postprocessing_graph_options_cc_proto",
"//mediapipe/tasks/cc/core:model_task_graph",
"//mediapipe/tasks/cc/vision/image_embedder/proto:image_embedder_graph_options_cc_proto",
"@com_google_absl//absl/status:statusor",
],
alwayslink = 1,
)
cc_library( cc_library(
name = "image_embedder", name = "image_embedder",
srcs = ["image_embedder.cc"], srcs = ["image_embedder.cc"],
hdrs = ["image_embedder.h"], hdrs = ["image_embedder.h"],
visibility = ["//visibility:public"],
deps = [ deps = [
":image_embedder_graph", ":image_embedder_graph",
"//mediapipe/framework/api2:builder", "//mediapipe/framework/api2:builder",
@ -67,4 +47,27 @@ cc_library(
], ],
) )
cc_library(
name = "image_embedder_graph",
srcs = ["image_embedder_graph.cc"],
deps = [
"//mediapipe/calculators/tensor:inference_calculator",
"//mediapipe/framework:calculator_framework",
"//mediapipe/framework/api2:builder",
"//mediapipe/framework/api2:port",
"//mediapipe/framework/formats:image",
"//mediapipe/framework/formats:rect_cc_proto",
"//mediapipe/tasks/cc/components:image_preprocessing",
"//mediapipe/tasks/cc/components:image_preprocessing_options_cc_proto",
"//mediapipe/tasks/cc/components/calculators:tensors_to_embeddings_calculator",
"//mediapipe/tasks/cc/components/containers/proto:embeddings_cc_proto",
"//mediapipe/tasks/cc/components/processors:embedding_postprocessing_graph",
"//mediapipe/tasks/cc/components/processors/proto:embedding_postprocessing_graph_options_cc_proto",
"//mediapipe/tasks/cc/core:model_task_graph",
"//mediapipe/tasks/cc/vision/image_embedder/proto:image_embedder_graph_options_cc_proto",
"@com_google_absl//absl/status:statusor",
],
alwayslink = 1,
)
# TODO: This test fails in OSS # TODO: This test fails in OSS

View File

@ -16,13 +16,13 @@ package(default_visibility = ["//mediapipe/tasks:internal"])
licenses(["notice"]) licenses(["notice"])
# Docs for Mediapipe Tasks Image Segmenter
# https://developers.google.com/mediapipe/solutions/vision/image_segmenter
cc_library( cc_library(
name = "image_segmenter", name = "image_segmenter",
srcs = ["image_segmenter.cc"], srcs = ["image_segmenter.cc"],
hdrs = ["image_segmenter.h"], hdrs = ["image_segmenter.h"],
visibility = [ visibility = ["//visibility:public"],
"//mediapipe/tasks:internal",
],
deps = [ deps = [
":image_segmenter_graph", ":image_segmenter_graph",
"//mediapipe/framework/api2:builder", "//mediapipe/framework/api2:builder",

View File

@ -16,6 +16,41 @@ package(default_visibility = ["//mediapipe/tasks:internal"])
licenses(["notice"]) licenses(["notice"])
# Docs for Mediapipe Tasks Object Detector
# https://developers.google.com/mediapipe/solutions/vision/object_detector
cc_library(
name = "object_detector",
srcs = ["object_detector.cc"],
hdrs = ["object_detector.h"],
visibility = [
"//mediapipe/tasks:users",
],
deps = [
":object_detector_graph",
"//mediapipe/calculators/core:concatenate_vector_calculator",
"//mediapipe/calculators/core:split_vector_calculator",
"//mediapipe/framework/api2:builder",
"//mediapipe/framework/formats:detection_cc_proto",
"//mediapipe/framework/formats:image",
"//mediapipe/framework/formats:rect_cc_proto",
"//mediapipe/tasks/cc:common",
"//mediapipe/tasks/cc/components/calculators:score_calibration_calculator",
"//mediapipe/tasks/cc/core:base_options",
"//mediapipe/tasks/cc/core:utils",
"//mediapipe/tasks/cc/core/proto:base_options_cc_proto",
"//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/object_detector/proto:object_detector_options_cc_proto",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@org_tensorflow//tensorflow/lite/core/api:op_resolver",
],
)
cc_library( cc_library(
name = "object_detector_graph", name = "object_detector_graph",
srcs = ["object_detector_graph.cc"], srcs = ["object_detector_graph.cc"],
@ -56,34 +91,4 @@ cc_library(
alwayslink = 1, alwayslink = 1,
) )
cc_library(
name = "object_detector",
srcs = ["object_detector.cc"],
hdrs = ["object_detector.h"],
deps = [
":object_detector_graph",
"//mediapipe/calculators/core:concatenate_vector_calculator",
"//mediapipe/calculators/core:split_vector_calculator",
"//mediapipe/framework/api2:builder",
"//mediapipe/framework/formats:detection_cc_proto",
"//mediapipe/framework/formats:image",
"//mediapipe/framework/formats:rect_cc_proto",
"//mediapipe/tasks/cc:common",
"//mediapipe/tasks/cc/components/calculators:score_calibration_calculator",
"//mediapipe/tasks/cc/core:base_options",
"//mediapipe/tasks/cc/core:utils",
"//mediapipe/tasks/cc/core/proto:base_options_cc_proto",
"//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/object_detector/proto:object_detector_options_cc_proto",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@org_tensorflow//tensorflow/lite/core/api:op_resolver",
],
)
# TODO: This test fails in OSS # TODO: This test fails in OSS