Gaussian blur augmentation in SimCLR https://arxiv.org/abs/2002.05709
| 80 | return images |
| 81 | |
| 82 | class GaussianBlur(object): |
| 83 | """Gaussian blur augmentation in SimCLR https://arxiv.org/abs/2002.05709""" |
| 84 | |
| 85 | def __init__(self, sigma=[.1, 2.]): |
| 86 | self.sigma = sigma |
| 87 | |
| 88 | def __call__(self, x): |
| 89 | sigma = random.uniform(self.sigma[0], self.sigma[1]) |
| 90 | x = x.filter(ImageFilter.GaussianBlur(radius=sigma)) |
| 91 | return x |
| 92 | |
| 93 | |
| 94 | class Cutout(object): |
no outgoing calls
no test coverage detected