updates
This commit is contained in:
parent
7de6584a34
commit
ccb971aa3c
|
@ -657,9 +657,11 @@ def cutout(image, labels):
|
||||||
image[ymin:ymax, xmin:xmax] = mask_color
|
image[ymin:ymax, xmin:xmax] = mask_color
|
||||||
|
|
||||||
# return unobscured labels
|
# return unobscured labels
|
||||||
box = np.array([xmin, ymin, xmax, ymax], dtype=np.float32)
|
if len(labels):
|
||||||
ioa = bbox_ioa(box, labels[:, 1:5]) # intersection over area
|
box = np.array([xmin, ymin, xmax, ymax], dtype=np.float32)
|
||||||
return labels[ioa < 0.90] # > 90% obscured labels removed
|
ioa = bbox_ioa(box, labels[:, 1:5]) # intersection over area
|
||||||
|
labels = labels[ioa < 0.90] # remove >90% obscured labels
|
||||||
|
return labels
|
||||||
|
|
||||||
|
|
||||||
def convert_images2bmp():
|
def convert_images2bmp():
|
||||||
|
|
Loading…
Reference in New Issue