feat: blacking out image

This commit is contained in:
Hazel 2025-04-24 11:26:17 +02:00
parent b88f9c22a3
commit 88180d035c
2 changed files with 2 additions and 5 deletions

View File

@ -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] = []

View File

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