Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OpenGVLab/HumanBench
/ ShearX
Function
ShearX
PATH/core/data/transforms/pedattr_transforms.py:82–86 ·
view source on GitHub ↗
(img, v)
Source
from the content-addressed store, hash-verified
80
return
img
81
82
def
ShearX(img, v):
# [-0.3, 0.3]
83
assert -0.3 <= v <= 0.3
84
if
random.random() > 0.5:
85
v = -v
86
return
img.transform(img.size, PIL.Image.AFFINE, (1, v, 0, 0, 1, 0))
87
88
89
def
ShearY(img, v):
# [-0.3, 0.3]
Callers
nothing calls this directly
Calls
1
transform
Method · 0.45
Tested by
no test coverage detected