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

Method forward

util/smplx/smplx/body_models.py:1904–2043  ·  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,
                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)

Source from the content-addressed store, hash-verified

1902 return '\n'.join(msg)
1903
1904 def forward(self,
1905 betas: Optional[Tensor] = None,
1906 global_orient: Optional[Tensor] = None,
1907 neck_pose: Optional[Tensor] = None,
1908 transl: Optional[Tensor] = None,
1909 expression: Optional[Tensor] = None,
1910 jaw_pose: Optional[Tensor] = None,
1911 leye_pose: Optional[Tensor] = None,
1912 reye_pose: Optional[Tensor] = None,
1913 return_verts: bool = True,
1914 return_full_pose: bool = False,
1915 pose2rot: bool = True,
1916 **kwargs) -> FLAMEOutput:
1917 """Forward pass for the SMPLX model.
1918
1919 Parameters
1920 ----------
1921 global_orient: torch.tensor, optional, shape Bx3
1922 If given, ignore the member variable and use it as the global
1923 rotation of the body. Useful if someone wishes to predicts this
1924 with an external model. (default=None)
1925 betas: torch.tensor, optional, shape Bx10
1926 If given, ignore the member variable `betas` and use it
1927 instead. For example, it can used if shape parameters
1928 `betas` are predicted from some external model.
1929 (default=None)
1930 expression: torch.tensor, optional, shape Bx10
1931 If given, ignore the member variable `expression` and use it
1932 instead. For example, it can used if expression parameters
1933 `expression` are predicted from some external model.
1934 jaw_pose: torch.tensor, optional, shape Bx3
1935 If given, ignore the member variable `jaw_pose` and
1936 use this instead. It should either joint rotations in
1937 axis-angle format.
1938 jaw_pose: torch.tensor, optional, shape Bx3
1939 If given, ignore the member variable `jaw_pose` and
1940 use this instead. It should either joint rotations in
1941 axis-angle format.
1942 transl: torch.tensor, optional, shape Bx3
1943 If given, ignore the member variable `transl` and use it
1944 instead. For example, it can used if the translation
1945 `transl` is predicted from some external model.
1946 (default=None)
1947 return_verts: bool, optional
1948 Return the vertices. (default=True)
1949 return_full_pose: bool, optional
1950 Returns the full axis-angle pose vector (default=False)
1951
1952 Returns
1953 -------
1954 output: ModelOutput
1955 A named tuple of type `ModelOutput`
1956 """
1957
1958 # If no shape and pose parameters are passed along, then use the
1959 # ones from the module
1960 global_orient = (global_orient
1961 if global_orient is not None else self.global_orient)

Callers

nothing calls this directly

Calls 4

lbsFunction · 0.90
vertices2landmarksFunction · 0.90
FLAMEOutputClass · 0.85

Tested by

no test coverage detected