diff --git a/mediapipe/framework/formats/BUILD b/mediapipe/framework/formats/BUILD index 28160a332..bd0aa7f47 100644 --- a/mediapipe/framework/formats/BUILD +++ b/mediapipe/framework/formats/BUILD @@ -81,7 +81,6 @@ mediapipe_proto_library( mediapipe_proto_library( name = "location_data_proto", srcs = ["location_data.proto"], - portable_deps = ["//mediapipe/framework/formats/annotation:rasterization_cc_proto"], deps = ["//mediapipe/framework/formats/annotation:rasterization_proto"], ) diff --git a/mediapipe/framework/formats/annotation/locus.proto b/mediapipe/framework/formats/annotation/locus.proto index 040ffec85..a94dcf7e3 100644 --- a/mediapipe/framework/formats/annotation/locus.proto +++ b/mediapipe/framework/formats/annotation/locus.proto @@ -69,7 +69,7 @@ message Locus { // Required if locus_type = REGION, Specifies a region using a scanline // encoding - optional Rasterization region = 4; + optional mediapipe.Rasterization region = 4; // Required if locus_type = VIDEO_TUBE. Specifies the component loci of the // tube. diff --git a/mediapipe/framework/formats/annotation/rasterization.proto b/mediapipe/framework/formats/annotation/rasterization.proto index 38414dff3..9b2aa7c32 100644 --- a/mediapipe/framework/formats/annotation/rasterization.proto +++ b/mediapipe/framework/formats/annotation/rasterization.proto @@ -18,6 +18,7 @@ package mediapipe; option java_package = "com.google.mediapipe.formats.annotation.proto"; option java_outer_classname = "RasterizationProto"; +option cc_enable_arenas = true; // A Region can be represented in each frame as a set of scanlines // (compressed RLE, similar to rasterization of polygons). diff --git a/mediapipe/framework/formats/location.cc b/mediapipe/framework/formats/location.cc index aed72a27f..205edf191 100644 --- a/mediapipe/framework/formats/location.cc +++ b/mediapipe/framework/formats/location.cc @@ -35,7 +35,7 @@ namespace mediapipe { namespace { -// Extracts from the BinaryMask, stored as Rasterization in +// Extracts from the BinaryMask, stored as mediapipe.Rasterization in // the location_data, the tightest bounding box, that contains all pixels // encoded in the rasterizations. Rectangle_i MaskToRectangle(const LocationData& location_data) { diff --git a/mediapipe/framework/formats/location_data.proto b/mediapipe/framework/formats/location_data.proto index 3edd54208..2f00fe348 100644 --- a/mediapipe/framework/formats/location_data.proto +++ b/mediapipe/framework/formats/location_data.proto @@ -75,7 +75,7 @@ message LocationData { optional int32 width = 1; optional int32 height = 2; // A rasterization-like format for storing the mask. - optional Rasterization rasterization = 3; + optional mediapipe.Rasterization rasterization = 3; } optional BinaryMask mask = 4; diff --git a/mediapipe/framework/tool/mediapipe_proto.bzl b/mediapipe/framework/tool/mediapipe_proto.bzl index 01888c0d0..7ed87aba9 100644 --- a/mediapipe/framework/tool/mediapipe_proto.bzl +++ b/mediapipe/framework/tool/mediapipe_proto.bzl @@ -33,6 +33,7 @@ def replace_deps(deps, old, new, drop_google_protobuf = True): deps = [dep for dep in deps if not dep.startswith("@com_google_protobuf//")] deps = [replace_suffix(dep, "any_proto", "cc_wkt_protos") for dep in deps] + deps = [dep for dep in deps if not dep.endswith("_annotations")] deps = [replace_suffix(dep, old, new) for dep in deps] return deps