MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / Cutout

Function Cutout

PATH/core/data/transforms/pedattr_transforms.py:189–195  ·  view source on GitHub ↗
(img, v)

Source from the content-addressed store, hash-verified

187
188
189def Cutout(img, v): # [0, 60] => percentage: [0, 0.2]
190 assert 0.0 <= v <= 0.2
191 if v <= 0.:
192 return img
193
194 v = v * img.size[0]
195 return CutoutAbs(img, v)
196
197
198def CutoutAbs(img, v): # [0, 60] => percentage: [0, 0.2]

Callers

nothing calls this directly

Calls 1

CutoutAbsFunction · 0.85

Tested by

no test coverage detected