From 8c0a7440df459336b56b47dfbbf6d66a8d9f48e6 Mon Sep 17 00:00:00 2001 From: Laughing <61612323+Laughing-q@users.noreply.github.com> Date: Tue, 4 Jul 2023 16:09:17 +0800 Subject: [PATCH] [RTDETR]fix mosaic<1.0 (#3518) --- ultralytics/yolo/data/augment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ultralytics/yolo/data/augment.py b/ultralytics/yolo/data/augment.py index 42688c9..42197a6 100644 --- a/ultralytics/yolo/data/augment.py +++ b/ultralytics/yolo/data/augment.py @@ -427,7 +427,7 @@ class RandomPerspective: """ if self.pre_transform and 'mosaic_border' not in labels: labels = self.pre_transform(labels) - labels.pop('ratio_pad') # do not need ratio pad + labels.pop('ratio_pad', None) # do not need ratio pad img = labels['img'] cls = labels['cls']