Open assafzam opened 4 years ago
Is there a way to use Pad (For example iaa.PadToSquare) with pad mode wrap or reflect that will duplicate also the boxes. for example:
iaa.PadToSquare
wrap
reflect
image = imageio.imread('example.jpg') bbs = BoundingBoxesOnImage([ BoundingBox(x1=300, y1= 100, x2=600, y2=400), BoundingBox(x1=720, y1= 150, x2=800, y2=230), ], shape=image.shape) image_before = bbs.draw_on_image(image, size=2) ia.imshow(image_before)
seq = iaa.Sequential([ iaa.PadToSquare(position='right-top', pad_mode='wrap'), ]) image_aug, bbs_aug = seq(image=image, bounding_boxes=bbs) image_after = bbs_aug.draw_on_image(image_aug, size=2, color=[0, 0, 255]) ia.imshow(image_after)
and the boxes are missing in the newly duplicated parts of the image.
Thanks a lot.
Is there a way to use Pad (For example
iaa.PadToSquare
) with pad modewrap
orreflect
that will duplicate also the boxes. for example:and the boxes are missing in the newly duplicated parts of the image.
Thanks a lot.