MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / vertices2joints

Function vertices2joints

util/smplx/smplx/lbs.py:242–259  ·  view source on GitHub ↗

Calculates the 3D joint locations from the vertices. Parameters ---------- J_regressor : torch.tensor JxV The regressor array that is used to calculate the joints from the position of the vertices vertices : torch.tensor BxVx3 The tensor of mesh vertices

(J_regressor: Tensor, vertices: Tensor)

Source from the content-addressed store, hash-verified

240
241
242def vertices2joints(J_regressor: Tensor, vertices: Tensor) -> Tensor:
243 """Calculates the 3D joint locations from the vertices.
244
245 Parameters
246 ----------
247 J_regressor : torch.tensor JxV
248 The regressor array that is used to calculate the joints from the
249 position of the vertices
250 vertices : torch.tensor BxVx3
251 The tensor of mesh vertices
252
253 Returns
254 -------
255 torch.tensor BxJx3
256 The location of the joints
257 """
258
259 return torch.einsum('bik,ji->bjk', [vertices, J_regressor])
260
261
262def blend_shapes(betas: Tensor, shape_disps: Tensor) -> Tensor:

Callers 5

forwardMethod · 0.90
forwardMethod · 0.90
forwardMethod · 0.90
forwardMethod · 0.90
lbsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected