From ef1eff883012efcd88a5ac13120ffb1457fcee8f Mon Sep 17 00:00:00 2001 From: Laughing <61612323+Laughing-q@users.noreply.github.com> Date: Sun, 28 May 2023 22:21:59 +0800 Subject: [PATCH] Fix numpy FP64 bug in augmentation (#2841) Co-authored-by: Glenn Jocher --- 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 b7aea5b..f8476ba 100644 --- a/ultralytics/yolo/data/augment.py +++ b/ultralytics/yolo/data/augment.py @@ -683,7 +683,7 @@ class Albumentations: if len(new['class_labels']) > 0: # skip update if no bbox in new im labels['img'] = new['image'] labels['cls'] = np.array(new['class_labels']) - bboxes = np.array(new['bboxes']) + bboxes = np.array(new['bboxes'], dtype=np.float32) labels['instances'].update(bboxes=bboxes) return labels