albumentations icon indicating copy to clipboard operation
albumentations copied to clipboard

How to invert transformed bounding boxes

Open dulre opened this issue 1 year ago • 0 comments

📚 Documentation

Hi, can someone help me with this problem? I have the following set of transformations that I apply some input images to obtain the transformed images and relative transformed bounding boxes. Now the problem is that I want to invert these operations to obtain the original bounding boxes. The documentation does not specify how to invert these operations.

test_transforms = A.Compose( [ A.LongestMaxSize(max_size=IMAGE_SIZE), A.PadIfNeeded( min_height=IMAGE_SIZE, min_width=IMAGE_SIZE, border_mode=cv2.BORDER_CONSTANT ), A.Normalize(mean=[0, 0, 0], std=[1, 1, 1], max_pixel_value=255), ], bbox_params=A.BboxParams(format="yolo", min_visibility=0.4, label_fields=[]), )

dulre avatar May 13 '23 15:05 dulre