DECA
DECA copied to clipboard
Is it possible to use our own 68pts landmarks to reconstruct?
I realised that landmark generation is not very accurate, especially the lip corners Is there a way to tweak landmark generation or maybe we can use custom generated 68pts landmarks as in txt or csv file?

just try to modify the code in decalib/datasets/detectors.py
class FAN(object):
def __init__(self):
import face_alignment
self.model = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, flip_input=False)
def run(self, image):
'''
image: 0-255, uint8, rgb, [h, w, 3]
return: detected box list
'''
out = self.model.get_landmarks(image)
if out is None:
return [0], 'kpt68'
else:
kpt = out[0].squeeze()
left = np.min(kpt[:,0]); right = np.max(kpt[:,0]);
top = np.min(kpt[:,1]); bottom = np.max(kpt[:,1])
bbox = [left,top, right, bottom]
return bbox, 'kpt68'