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

Method __init__

PATH/core/augmentation.py:13–19  ·  view source on GitHub ↗
(self, crop_size, final_size, crop_center_y_offset, scale_aug, trans_aug)

Source from the content-addressed store, hash-verified

11
12class FaceAugmentation(object):
13 def __init__(self, crop_size, final_size, crop_center_y_offset, scale_aug, trans_aug):
14 self.crop_size = crop_size
15 self.final_size = final_size
16 self.crop_center_y_offset = crop_center_y_offset
17 self.scale_aug = scale_aug
18 self.trans_aug = trans_aug
19 self.flip = flip
20 def __call__(self, img):
21 ## transform
22 scale_diff_h = (np.random.rand()*2-1)*self.scale_aug

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected