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 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