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()