MCPcopy Index your code
hub / github.com/microsoft/Cream / Solarization

Class Solarization

EfficientViT/classification/data/threeaugment.py:43–54  ·  view source on GitHub ↗

Apply Solarization to the PIL image.

Source from the content-addressed store, hash-verified

41 return img
42
43class Solarization(object):
44 """
45 Apply Solarization to the PIL image.
46 """
47 def __init__(self, p=0.2):
48 self.p = p
49
50 def __call__(self, img):
51 if random.random() < self.p:
52 return ImageOps.solarize(img)
53 else:
54 return img
55
56class gray_scale(object):
57 """

Callers 1

new_data_aug_generatorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected