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

Method __call__

PATH/core/augmentation_pos.py:154–169  ·  view source on GitHub ↗

Perform data augmentation with half-body transform.

(self, results)

Source from the content-addressed store, hash-verified

152 return center, scale
153
154 def __call__(self, results):
155 """Perform data augmentation with half-body transform."""
156 joints_3d = results['joints_3d']
157 joints_3d_visible = results['joints_3d_visible']
158
159 if (np.sum(joints_3d_visible[:, 0]) > self.num_joints_half_body
160 and np.random.rand() < self.prob_half_body):
161
162 c_half_body, s_half_body = self.half_body_transform(
163 results['ann_info'], joints_3d, joints_3d_visible)
164
165 if c_half_body is not None and s_half_body is not None:
166 results['center'] = c_half_body
167 results['scale'] = s_half_body
168
169 return results
170
171class TopDownGetRandomScaleRotation:
172 """Data augmentation with random scaling & rotating.

Callers

nothing calls this directly

Calls 1

half_body_transformMethod · 0.95

Tested by

no test coverage detected