generated from Hazel/python-project
feat: blacking out image
This commit is contained in:
parent
b88f9c22a3
commit
88180d035c
@ -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] = []
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user