From be9fe124e3194bdc259b51832bc589d8984eacd1 Mon Sep 17 00:00:00 2001 From: Laughing <61612323+Laughing-q@users.noreply.github.com> Date: Thu, 15 Aug 2024 03:32:37 +0800 Subject: [PATCH] Remove unnecessary assignments (#15582) --- ultralytics/data/augment.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ultralytics/data/augment.py b/ultralytics/data/augment.py index cf715e81..c6a03b47 100644 --- a/ultralytics/data/augment.py +++ b/ultralytics/data/augment.py @@ -539,7 +539,6 @@ class Mosaic(BaseMixTransform): assert 0 <= p <= 1.0, f"The probability should be in range [0, 1], but got {p}." assert n in {4, 9}, "grid must be equal to 4 or 9." super().__init__(dataset=dataset, p=p) - self.dataset = dataset self.imgsz = imgsz self.border = (-imgsz // 2, -imgsz // 2) # width, height self.n = n @@ -1692,7 +1691,6 @@ class CopyPaste: instances.convert_bbox(format="xyxy") instances.denormalize(w, h) if self.p and len(instances.segments): - n = len(instances) _, w, _ = im.shape # height, width, channels im_new = np.zeros(im.shape, np.uint8)