MCPcopy Create free account
hub / github.com/TorchSSL/TorchSSL / ShearX

Function ShearX

datasets/augmentation/randaugment.py:65–69  ·  view source on GitHub ↗
(img, v)

Source from the content-addressed store, hash-verified

63
64
65def ShearX(img, v): # [-0.3, 0.3]
66 #assert -0.3 <= v <= 0.3
67 #if random.random() > 0.5:
68 # v = -v
69 return img.transform(img.size, PIL.Image.AFFINE, (1, v, 0, 0, 1, 0))
70
71
72def ShearY(img, v): # [-0.3, 0.3]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected