From 98ce8e6235f900e34d91984c22c340a929a99425 Mon Sep 17 00:00:00 2001 From: Mohammad Javad Darvishi <38682913+MohammadJavadD@users.noreply.github.com> Date: Wed, 25 Nov 2020 15:52:36 -0500 Subject: [PATCH 1/2] Update augmentations.py Adding prob to address issue #20: prob = https://github.com/ildoonet/pytorch-randaugment/issues/20#issue-714039374 --- RandAugment/augmentations.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RandAugment/augmentations.py b/RandAugment/augmentations.py index 2cf63f4..583af89 100755 --- a/RandAugment/augmentations.py +++ b/RandAugment/augmentations.py @@ -259,6 +259,7 @@ def __call__(self, img): ops = random.choices(self.augment_list, k=self.n) for op, minval, maxval in ops: val = (float(self.m) / 30) * float(maxval - minval) + minval - img = op(img, val) + prob = np.random.uniform(low=0.2, high=0.8) # Range (0.2, 0.8) from RandAug imp (https://github.com/tensorflow/tpu/blob/5144289ba9c9e5b1e55cc118b69fe62dd868657c/models/official/efficientnet/autoaugment.py#L701) + if random.random() < prob: img = op(img, val) return img From db928532d1a55e7a15b68cb1f47bb0b8920796ef Mon Sep 17 00:00:00 2001 From: Mohammad Javad Darvishi <38682913+MohammadJavadD@users.noreply.github.com> Date: Fri, 2 Jul 2021 15:32:54 -0400 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f8e1687..ff7ff06 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Models can be trained with RandAugment for the dataset of interest with no need ## Install ```bash -$ pip install git+https://github.com/ildoonet/pytorch-randaugment +$ pip install git+https://github.com/mohammadjavadd/pytorch-randaugment ``` ## Usage