Args: aug (ImageAugmentor): an augmentor. prob (float): the probability to apply the augmentor.
(self, aug, prob)
| 21 | """ |
| 22 | |
| 23 | def __init__(self, aug, prob): |
| 24 | """ |
| 25 | Args: |
| 26 | aug (ImageAugmentor): an augmentor. |
| 27 | prob (float): the probability to apply the augmentor. |
| 28 | """ |
| 29 | self._init(locals()) |
| 30 | super(RandomApplyAug, self).__init__() |
| 31 | |
| 32 | def get_transform(self, img): |
| 33 | p = self.rng.rand() |