Return correctly formatted ratio_pad in RTDETRDataset (#22525)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Mohammed Yasin 2025-10-30 22:46:59 +08:00 committed by GitHub
parent 82d3b50996
commit c833939b4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -89,7 +89,7 @@ class RTDETRDataset(YOLODataset):
transforms = v8_transforms(self, self.imgsz, hyp, stretch=True)
else:
# transforms = Compose([LetterBox(new_shape=(self.imgsz, self.imgsz), auto=False, scale_fill=True)])
transforms = Compose([])
transforms = Compose([lambda x: {**x, **{"ratio_pad": [x["ratio_pad"], [0, 0]]}}])
transforms.append(
Format(
bbox_format="xywh",