MCPcopy Create free account
hub / github.com/lingeringlight/START / horizontal_flip

Class horizontal_flip

augment.py:79–91  ·  view source on GitHub ↗

Apply Solarization to the PIL image.

Source from the content-addressed store, hash-verified

77
78
79class horizontal_flip(object):
80 """
81 Apply Solarization to the PIL image.
82 """
83 def __init__(self, p=0.2,activate_pred=False):
84 self.p = p
85 self.transf = transforms.RandomHorizontalFlip(p=1.0)
86
87 def __call__(self, img):
88 if random.random() < self.p:
89 return self.transf(img)
90 else:
91 return img
92
93
94

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…