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,
neck_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,
pose2rot: bool = True,
**kwargs)
| 2057 | **kwargs) |
| 2058 | |
| 2059 | def forward(self, |
| 2060 | betas: Optional[Tensor] = None, |
| 2061 | global_orient: Optional[Tensor] = None, |
| 2062 | neck_pose: Optional[Tensor] = None, |
| 2063 | transl: Optional[Tensor] = None, |
| 2064 | expression: Optional[Tensor] = None, |
| 2065 | jaw_pose: Optional[Tensor] = None, |
| 2066 | leye_pose: Optional[Tensor] = None, |
| 2067 | reye_pose: Optional[Tensor] = None, |
| 2068 | return_verts: bool = True, |
| 2069 | return_full_pose: bool = False, |
| 2070 | pose2rot: bool = True, |
| 2071 | **kwargs) -> FLAMEOutput: |
| 2072 | """Forward pass for the SMPLX model. |
| 2073 | |
| 2074 | Parameters |
| 2075 | ---------- |
| 2076 | global_orient: torch.tensor, optional, shape Bx3 |
| 2077 | If given, ignore the member variable and use it as the global |
| 2078 | rotation of the body. Useful if someone wishes to predicts this |
| 2079 | with an external model. (default=None) |
| 2080 | betas: torch.tensor, optional, shape Bx10 |
| 2081 | If given, ignore the member variable `betas` and use it |
| 2082 | instead. For example, it can used if shape parameters |
| 2083 | `betas` are predicted from some external model. |
| 2084 | (default=None) |
| 2085 | expression: torch.tensor, optional, shape Bx10 |
| 2086 | If given, ignore the member variable `expression` and use it |
| 2087 | instead. For example, it can used if expression parameters |
| 2088 | `expression` are predicted from some external model. |
| 2089 | jaw_pose: torch.tensor, optional, shape Bx3 |
| 2090 | If given, ignore the member variable `jaw_pose` and |
| 2091 | use this instead. It should either joint rotations in |
| 2092 | axis-angle format. |
| 2093 | jaw_pose: torch.tensor, optional, shape Bx3 |
| 2094 | If given, ignore the member variable `jaw_pose` and |
| 2095 | use this instead. It should either joint rotations in |
| 2096 | axis-angle format. |
| 2097 | transl: torch.tensor, optional, shape Bx3 |
| 2098 | If given, ignore the member variable `transl` and use it |
| 2099 | instead. For example, it can used if the translation |
| 2100 | `transl` is predicted from some external model. |
| 2101 | (default=None) |
| 2102 | return_verts: bool, optional |
| 2103 | Return the vertices. (default=True) |
| 2104 | return_full_pose: bool, optional |
| 2105 | Returns the full axis-angle pose vector (default=False) |
| 2106 | |
| 2107 | Returns |
| 2108 | ------- |
| 2109 | output: ModelOutput |
| 2110 | A named tuple of type `ModelOutput` |
| 2111 | """ |
| 2112 | device, dtype = self.shapedirs.device, self.shapedirs.dtype |
| 2113 | if global_orient is None: |
| 2114 | batch_size = 1 |
| 2115 | global_orient = torch.zeros(3, device=device, dtype=dtype).view( |
| 2116 | 1, 1, 3).expand(batch_size, -1, -1).contiguous() |
nothing calls this directly
no test coverage detected