MCPcopy Create free account
hub / github.com/TMElyralab/MuseTalk / __init__

Method __init__

scripts/preprocess.py:34–45  ·  view source on GitHub ↗

Initialize the AnalyzeFace class with the given device, config file, and checkpoint file. Parameters: device (Union[str, torch.device]): The device to run the models on ('cuda' or 'cpu'). config_file (str): Path to the mmpose model configuration file. checkp

(self, device: Union[str, torch.device], config_file: str, checkpoint_file: str)

Source from the content-addressed store, hash-verified

32
33class AnalyzeFace:
34 def __init__(self, device: Union[str, torch.device], config_file: str, checkpoint_file: str):
35 """
36 Initialize the AnalyzeFace class with the given device, config file, and checkpoint file.
37
38 Parameters:
39 device (Union[str, torch.device]): The device to run the models on ('cuda' or 'cpu').
40 config_file (str): Path to the mmpose model configuration file.
41 checkpoint_file (str): Path to the mmpose model checkpoint file.
42 """
43 self.device = device
44 self.dwpose = init_model(config_file, checkpoint_file, device=self.device)
45 self.facedet = FaceAlignment(LandmarksType._2D, flip_input=False, device=self.device)
46
47 def __call__(self, im: np.ndarray) -> Tuple[List[np.ndarray], np.ndarray]:
48 """

Callers

nothing calls this directly

Calls 1

FaceAlignmentClass · 0.90

Tested by

no test coverage detected