MCPcopy Create free account
hub / github.com/MotrixLab/ADHMR / get_aug_config

Function get_aug_config

ADHMR/lib/utils/preprocessing.py:92–105  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90
91
92def get_aug_config():
93 scale_factor = 0.25
94 rot_factor = 30
95 color_factor = 0.2
96
97 scale = np.clip(np.random.randn(), -1.0, 1.0) * scale_factor + 1.0
98 rot = np.clip(np.random.randn(), -2.0,
99 2.0) * rot_factor if random.random() <= 0.6 else 0
100 c_up = 1.0 + color_factor
101 c_low = 1.0 - color_factor
102 color_scale = np.array([random.uniform(c_low, c_up), random.uniform(c_low, c_up), random.uniform(c_low, c_up)])
103 do_flip = random.random() <= 0.5
104
105 return scale, rot, color_scale, do_flip
106
107
108def augmentation(img, bbox, data_split):

Callers 1

augmentationFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected