MCPcopy
hub / github.com/hustvl/Vim / Solarization

Class Solarization

vim/augment.py:50–61  ·  view source on GitHub ↗

Apply Solarization to the PIL image.

Source from the content-addressed store, hash-verified

48 return img
49
50class Solarization(object):
51 """
52 Apply Solarization to the PIL image.
53 """
54 def __init__(self, p=0.2):
55 self.p = p
56
57 def __call__(self, img):
58 if random.random() < self.p:
59 return ImageOps.solarize(img)
60 else:
61 return img
62
63class gray_scale(object):
64 """

Callers 1

new_data_aug_generatorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected