From 052ebb8610c9f550c988b246c8525a79e0cfeca7 Mon Sep 17 00:00:00 2001 From: Laughing-q <1185102784@qq.com> Date: Thu, 19 Sep 2024 17:28:09 +0800 Subject: [PATCH] revert augment.py --- ultralytics/data/augment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ultralytics/data/augment.py b/ultralytics/data/augment.py index f8c659e255..cbd022da3e 100644 --- a/ultralytics/data/augment.py +++ b/ultralytics/data/augment.py @@ -870,7 +870,7 @@ class CopyPaste(BaseMixTransform): def __call__(self, labels): """Applies pre-processing transforms and copy_paste transforms to labels data.""" - if len(labels["instances"].segments) == 0 or random.uniform(0, 1) > 0.5: + if len(labels["instances"].segments) == 0 or self.p == 0: return labels # Get index of one or three other images indexes = self.get_indexes()