From 88180d035c369a14b07cf12f19f3fdb6cf708fb2 Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Thu, 24 Apr 2025 11:26:17 +0200 Subject: [PATCH] feat: blacking out image --- secure_pixelation/data_classes.py | 2 +- secure_pixelation/get_bounding_boxes.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/secure_pixelation/data_classes.py b/secure_pixelation/data_classes.py index a285e80..e0166f9 100644 --- a/secure_pixelation/data_classes.py +++ b/secure_pixelation/data_classes.py @@ -45,7 +45,7 @@ class RawImage: return cv2.imread(str(self.file)) @property - def bounding_boxes(self) -> List[Tuple[Tuple[int, int], Tuple[int, int]]]: + def bounding_boxes(self) -> List[List[int]]: _key = "bounding_boxes" if _key not in self.meta_data: self.meta_data[_key] = [] diff --git a/secure_pixelation/get_bounding_boxes.py b/secure_pixelation/get_bounding_boxes.py index 4644f2d..89e493f 100644 --- a/secure_pixelation/get_bounding_boxes.py +++ b/secure_pixelation/get_bounding_boxes.py @@ -18,8 +18,5 @@ def select_bounding_boxes(to_detect: str): fromCenter=False ) - raw_image.bounding_boxes.extend([ - ((box[0], box[1]), (box[0] + box[2], box[1] + box[3])) - for box in bounding_boxes - ]) + raw_image.bounding_boxes.extend(bounding_boxes.tolist()) raw_image.write_meta()