From af27b75e95b072a44d316bc5caeaa8432ad67c29 Mon Sep 17 00:00:00 2001 From: WongGawa Date: Fri, 18 Oct 2024 11:00:11 +0800 Subject: [PATCH] fix difference bewtween high version albumentations --- mindyolo/data/albumentations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mindyolo/data/albumentations.py b/mindyolo/data/albumentations.py index 2b1b049..9456cf8 100644 --- a/mindyolo/data/albumentations.py +++ b/mindyolo/data/albumentations.py @@ -55,8 +55,8 @@ def __call__(self, sample, p=1.0, **kwargs): new = self.transform(image=im, bboxes=bboxes, class_labels=cls) # transformed sample['img'] = new['image'] - sample['bboxes'] = np.array(new['bboxes']).reshape(-1, 1) - sample['cls'] = np.array(new['class_labels']) + sample['bboxes'] = np.array(new['bboxes']) + sample['cls'] = np.array(new['class_labels']).reshape(-1, 1) sample['bbox_format'] = "xywhn" return sample