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

Class FLAME

util/smplx/smplx/body_models.py:1683–2043  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1681
1682
1683class FLAME(SMPL):
1684 NUM_JOINTS = 5
1685 SHAPE_SPACE_DIM = 300
1686 EXPRESSION_SPACE_DIM = 100
1687 NECK_IDX = 0
1688
1689 def __init__(self,
1690 model_path: str,
1691 data_struct=None,
1692 num_expression_coeffs=10,
1693 create_expression: bool = True,
1694 expression: Optional[Tensor] = None,
1695 create_neck_pose: bool = True,
1696 neck_pose: Optional[Tensor] = None,
1697 create_jaw_pose: bool = True,
1698 jaw_pose: Optional[Tensor] = None,
1699 create_leye_pose: bool = True,
1700 leye_pose: Optional[Tensor] = None,
1701 create_reye_pose=True,
1702 reye_pose: Optional[Tensor] = None,
1703 use_face_contour=False,
1704 batch_size: int = 1,
1705 gender: str = 'neutral',
1706 dtype: torch.dtype = torch.float32,
1707 ext='pkl',
1708 **kwargs) -> None:
1709 """FLAME model constructor.
1710
1711 Parameters
1712 ----------
1713 model_path: str
1714 The path to the folder or to the file where the model
1715 parameters are stored
1716 num_expression_coeffs: int, optional
1717 Number of expression components to use
1718 (default = 10).
1719 create_expression: bool, optional
1720 Flag for creating a member variable for the expression space
1721 (default = True).
1722 expression: torch.tensor, optional, Bx10
1723 The default value for the expression member variable.
1724 (default = None)
1725 create_neck_pose: bool, optional
1726 Flag for creating a member variable for the neck pose.
1727 (default = False)
1728 neck_pose: torch.tensor, optional, Bx3
1729 The default value for the neck pose variable.
1730 (default = None)
1731 create_jaw_pose: bool, optional
1732 Flag for creating a member variable for the jaw pose.
1733 (default = False)
1734 jaw_pose: torch.tensor, optional, Bx3
1735 The default value for the jaw pose variable.
1736 (default = None)
1737 create_leye_pose: bool, optional
1738 Flag for creating a member variable for the left eye pose.
1739 (default = False)
1740 leye_pose: torch.tensor, optional, Bx10

Callers 1

createFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected