MCPcopy Create free account
hub / github.com/MotrixLab/insactor / convert

Function convert

data/humanml3d_converter.py:197–209  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

195
196
197def convert(x):
198 x = np.array(x)
199 if x.shape[0] == 3:
200 x = x[[0, 2, 1]]
201 x[1] *= -1
202 return x
203 if x.shape[0] == 1:
204 x = euler_to_quaternion(np.array([0, -1 * x[0], 0]))
205 return x
206 else:
207 x = x[[0, 1, 3, 2]]
208 x[2] *= -1
209 return x
210
211
212def interpolate(y, dt, target_dt, gt=None):

Callers

nothing calls this directly

Calls 1

euler_to_quaternionFunction · 0.85

Tested by

no test coverage detected