From 0a8dbc7576fd5381eefe98bf7e645f9f7b01ad04 Mon Sep 17 00:00:00 2001 From: kinaryml Date: Mon, 10 Oct 2022 13:58:37 -0700 Subject: [PATCH] Added remaining parameters to initialize the Rect data class --- mediapipe/tasks/python/components/containers/rect.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mediapipe/tasks/python/components/containers/rect.py b/mediapipe/tasks/python/components/containers/rect.py index e74be1b0..aadb404d 100644 --- a/mediapipe/tasks/python/components/containers/rect.py +++ b/mediapipe/tasks/python/components/containers/rect.py @@ -109,6 +109,8 @@ class NormalizedRect: y_center=self.y_center, width=self.width, height=self.height, + rotation=self.rotation, + rect_id=self.rect_id ) @classmethod @@ -119,7 +121,10 @@ class NormalizedRect: x_center=pb2_obj.x_center, y_center=pb2_obj.y_center, width=pb2_obj.width, - height=pb2_obj.height) + height=pb2_obj.height, + rotation=pb2_obj.rotation, + rect_id=pb2_obj.rect_id + ) def __eq__(self, other: Any) -> bool: """Checks if this object is equal to the given object.