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

Method forward

util/smplx/smplx/body_models.py:1227–1400  ·  view source on GitHub ↗

Forward pass for the SMPLX model. Parameters ---------- global_orient: torch.tensor, optional, shape Bx3 If given, ignore the member variable and use it as the global rotation of the body. Useful if someone wishes to predicts this with an

(self,
                betas: Optional[Tensor] = None,
                global_orient: Optional[Tensor] = None,
                body_pose: Optional[Tensor] = None,
                left_hand_pose: Optional[Tensor] = None,
                right_hand_pose: Optional[Tensor] = None,
                transl: Optional[Tensor] = None,
                expression: Optional[Tensor] = None,
                jaw_pose: Optional[Tensor] = None,
                leye_pose: Optional[Tensor] = None,
                reye_pose: Optional[Tensor] = None,
                return_verts: bool = True,
                return_full_pose: bool = False,
                **kwargs)

Source from the content-addressed store, hash-verified

1225 )
1226
1227 def forward(self,
1228 betas: Optional[Tensor] = None,
1229 global_orient: Optional[Tensor] = None,
1230 body_pose: Optional[Tensor] = None,
1231 left_hand_pose: Optional[Tensor] = None,
1232 right_hand_pose: Optional[Tensor] = None,
1233 transl: Optional[Tensor] = None,
1234 expression: Optional[Tensor] = None,
1235 jaw_pose: Optional[Tensor] = None,
1236 leye_pose: Optional[Tensor] = None,
1237 reye_pose: Optional[Tensor] = None,
1238 return_verts: bool = True,
1239 return_full_pose: bool = False,
1240 **kwargs) -> SMPLXOutput:
1241 """Forward pass for the SMPLX model.
1242
1243 Parameters
1244 ----------
1245 global_orient: torch.tensor, optional, shape Bx3
1246 If given, ignore the member variable and use it as the global
1247 rotation of the body. Useful if someone wishes to predicts this
1248 with an external model. (default=None)
1249 betas: torch.tensor, optional, shape Bx10
1250 If given, ignore the member variable `betas` and use it
1251 instead. For example, it can used if shape parameters
1252 `betas` are predicted from some external model.
1253 (default=None)
1254 expression: torch.tensor, optional, shape Bx10
1255 If given, ignore the member variable `expression` and use it
1256 instead. For example, it can used if expression parameters
1257 `expression` are predicted from some external model.
1258 body_pose: torch.tensor, optional, shape Bx(J*3)
1259 If given, ignore the member variable `body_pose` and use it
1260 instead. For example, it can used if someone predicts the
1261 pose of the body joints are predicted from some external model.
1262 It should be a tensor that contains joint rotations in
1263 axis-angle format. (default=None)
1264 left_hand_pose: torch.tensor, optional, shape BxP
1265 If given, ignore the member variable `left_hand_pose` and
1266 use this instead. It should either contain PCA coefficients or
1267 joint rotations in axis-angle format.
1268 right_hand_pose: torch.tensor, optional, shape BxP
1269 If given, ignore the member variable `right_hand_pose` and
1270 use this instead. It should either contain PCA coefficients or
1271 joint rotations in axis-angle format.
1272 jaw_pose: torch.tensor, optional, shape Bx3x3
1273 If given, ignore the member variable `jaw_pose` and
1274 use this instead. It should either joint rotations in
1275 axis-angle format.
1276 transl: torch.tensor, optional, shape Bx3
1277 If given, ignore the member variable `transl` and use it
1278 instead. For example, it can used if the translation
1279 `transl` is predicted from some external model.
1280 (default=None)
1281 return_verts: bool, optional
1282 Return the vertices. (default=True)
1283 return_full_pose: bool, optional
1284 Returns the full pose vector (default=False)

Callers

nothing calls this directly

Calls 4

lbsFunction · 0.90
vertices2landmarksFunction · 0.90
SMPLXOutputClass · 0.85

Tested by

no test coverage detected