MCPcopy
hub / github.com/OpenTalker/SadTalker / transform

Method transform

src/face3d/models/bfm.py:230–240  ·  view source on GitHub ↗

Return: face_shape -- torch.tensor, size (B, N, 3) pts @ rot + trans Parameters: face_shape -- torch.tensor, size (B, N, 3) rot -- torch.tensor, size (B, 3, 3) trans -- torch.tensor, size (B, 3)

(self, face_shape, rot, trans)

Source from the content-addressed store, hash-verified

228
229
230 def transform(self, face_shape, rot, trans):
231 """
232 Return:
233 face_shape -- torch.tensor, size (B, N, 3) pts @ rot + trans
234
235 Parameters:
236 face_shape -- torch.tensor, size (B, N, 3)
237 rot -- torch.tensor, size (B, 3, 3)
238 trans -- torch.tensor, size (B, 3)
239 """
240 return face_shape @ rot + trans.unsqueeze(1)
241
242
243 def get_landmarks(self, face_proj):

Callers 5

compute_for_renderMethod · 0.95
apply_img_affineFunction · 0.80
__getitem__Method · 0.80
__getitem__Method · 0.80
calculate_rocFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected