From 1e77725a15ff416929d3efd385809e34ad38530a Mon Sep 17 00:00:00 2001 From: Jiuqiang Tang Date: Tue, 28 Mar 2023 14:59:26 -0700 Subject: [PATCH] Add necessary java lite proto source code to mediapipe tasks aar for the face landmarker task. PiperOrigin-RevId: 520143851 --- .../calculators/geometry_pipeline_calculator.proto | 3 +++ .../face_geometry/proto/face_geometry_graph_options.proto | 3 +++ .../tasks/cc/vision/face_geometry/proto/mesh_3d.proto | 2 +- .../com/google/mediapipe/tasks/mediapipe_tasks_aar.bzl | 8 ++++++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/mediapipe/tasks/cc/vision/face_geometry/calculators/geometry_pipeline_calculator.proto b/mediapipe/tasks/cc/vision/face_geometry/calculators/geometry_pipeline_calculator.proto index a748cdf8b..e9a78f55d 100644 --- a/mediapipe/tasks/cc/vision/face_geometry/calculators/geometry_pipeline_calculator.proto +++ b/mediapipe/tasks/cc/vision/face_geometry/calculators/geometry_pipeline_calculator.proto @@ -19,6 +19,9 @@ package mediapipe.tasks.vision.face_geometry; import "mediapipe/framework/calculator_options.proto"; import "mediapipe/tasks/cc/core/proto/external_file.proto"; +option java_package = "com.google.mediapipe.tasks.vision.facegeometry.calculators.proto"; +option java_outer_classname = "FaceGeometryPipelineCalculatorOptionsProto"; + message FaceGeometryPipelineCalculatorOptions { extend mediapipe.CalculatorOptions { optional FaceGeometryPipelineCalculatorOptions ext = 512499200; diff --git a/mediapipe/tasks/cc/vision/face_geometry/proto/face_geometry_graph_options.proto b/mediapipe/tasks/cc/vision/face_geometry/proto/face_geometry_graph_options.proto index 03831d1dc..88272b37f 100644 --- a/mediapipe/tasks/cc/vision/face_geometry/proto/face_geometry_graph_options.proto +++ b/mediapipe/tasks/cc/vision/face_geometry/proto/face_geometry_graph_options.proto @@ -19,6 +19,9 @@ package mediapipe.tasks.vision.face_geometry.proto; import "mediapipe/framework/calculator_options.proto"; import "mediapipe/tasks/cc/vision/face_geometry/calculators/geometry_pipeline_calculator.proto"; +option java_package = "com.google.mediapipe.tasks.vision.facegeometry.proto"; +option java_outer_classname = "FaceGeometryGraphOptionsProto"; + message FaceGeometryGraphOptions { extend mediapipe.CalculatorOptions { optional FaceGeometryGraphOptions ext = 515723506; diff --git a/mediapipe/tasks/cc/vision/face_geometry/proto/mesh_3d.proto b/mediapipe/tasks/cc/vision/face_geometry/proto/mesh_3d.proto index 1131ae7ed..bb21ee7d3 100644 --- a/mediapipe/tasks/cc/vision/face_geometry/proto/mesh_3d.proto +++ b/mediapipe/tasks/cc/vision/face_geometry/proto/mesh_3d.proto @@ -17,7 +17,7 @@ syntax = "proto2"; package mediapipe.tasks.vision.face_geometry.proto; option java_package = "com.google.mediapipe.tasks.vision.facegeometry.proto"; -option java_outer_classname = "Mesh3dProto"; +option java_outer_classname = "Mesh3DProto"; message Mesh3d { enum VertexType { diff --git a/mediapipe/tasks/java/com/google/mediapipe/tasks/mediapipe_tasks_aar.bzl b/mediapipe/tasks/java/com/google/mediapipe/tasks/mediapipe_tasks_aar.bzl index 5f8fa7ba8..1f6146014 100644 --- a/mediapipe/tasks/java/com/google/mediapipe/tasks/mediapipe_tasks_aar.bzl +++ b/mediapipe/tasks/java/com/google/mediapipe/tasks/mediapipe_tasks_aar.bzl @@ -35,7 +35,10 @@ _AUDIO_TASKS_JAVA_PROTO_LITE_TARGETS = [ _VISION_TASKS_JAVA_PROTO_LITE_TARGETS = [ "//mediapipe/tasks/cc/vision/face_detector/proto:face_detector_graph_options_java_proto_lite", + "//mediapipe/tasks/cc/vision/face_geometry/proto:face_geometry_graph_options_java_proto_lite", "//mediapipe/tasks/cc/vision/face_geometry/proto:face_geometry_java_proto_lite", + "//mediapipe/tasks/cc/vision/face_geometry/proto:mesh_3d_java_proto_lite", + "//mediapipe/tasks/cc/vision/face_landmarker/proto:face_blendshapes_graph_options_java_proto_lite", "//mediapipe/tasks/cc/vision/face_landmarker/proto:face_landmarker_graph_options_java_proto_lite", "//mediapipe/tasks/cc/vision/face_landmarker/proto:face_landmarks_detector_graph_options_java_proto_lite", "//mediapipe/tasks/cc/vision/gesture_recognizer/proto:gesture_classifier_graph_options_java_proto_lite", @@ -113,6 +116,11 @@ def mediapipe_tasks_core_aar(name, srcs, manifest): src_out = "com/google/mediapipe/tasks/TensorsToSegmentationCalculatorOptionsProto.java", )) + mediapipe_tasks_java_proto_srcs.append(mediapipe_java_proto_src_extractor( + target = "//mediapipe/tasks/cc/vision/face_geometry/calculators:geometry_pipeline_calculator_java_proto_lite", + src_out = "com/google/mediapipe/tasks/vision/facegeometry/calculators/proto/FaceGeometryPipelineCalculatorOptionsProto.java", + )) + android_library( name = name, srcs = srcs + [