MCPcopy Create free account
hub / github.com/Sense-GVT/DeCLIP / GaussianBlur

Class GaussianBlur

prototype/data/transforms.py:82–91  ·  view source on GitHub ↗

Gaussian blur augmentation in SimCLR https://arxiv.org/abs/2002.05709

Source from the content-addressed store, hash-verified

80 return images
81
82class 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
94class Cutout(object):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected