face-alignment icon indicating copy to clipboard operation
face-alignment copied to clipboard

how to get face landmarks from a batch?

Open zenoxux opened this issue 3 years ago • 1 comments

could anyone tell me how to get face landmarks from a batch? the api 'get_landmarks_from_batch' seems not to work, the code shows that it still get landmarks from image one by one. could anyone help me? thanks in advance.

zenoxux avatar May 30 '22 21:05 zenoxux

according to face_alignment.detection.sfd.detect.py, we can see they did some treate like normalization img_batch = img_batch - torch.tensor([104.0, 117.0, 123.0], device=device).view(1, 3, 1, 1) attention, they minus [104, 117, 123], but our tensor must be normalized between [-1, 1]. i guess the range of tensors they input is [0, 255], so you can restore the value range of your tensors to 0 to 255

Panghema avatar Dec 14 '23 08:12 Panghema