return annotations

Now you can combine the image and annotation transformations to use on a batch of examples:

transforming a batch
def transform_aug_ann(examples):
     image_ids = examples["image_id"]
     images, bboxes, area, categories = [], [], [], []
     for image, objects in zip(examples["image"], examples["objects"]):
         image = np.array(image.convert("RGB"))[:, :, ::-1]
         out = transform(image=image, bboxes=objects["bbox"], category=objects["category"])