Open zhao181 opened 6 years ago
Dear wywu, I have the same question, could you tell me how can I detect 68 landmarks from WFLW dataset?
Hi, thanks for your interest! Since we do not know the detail of the annotation process of the 68-landmarks of 300W, we do not have the explicit corresponding between 98pt and 68pt. Of course, we can find the possible defined landmark of every point of 300W in 98-landmark protocol. However, we have tried to train one model on the 68pt extracted from 98pt on WFLW and test on 300W, but got a very poor performance because of the gap of the definition of landmarks.
In description we have 10000 faces (7500 for training and 2500 for testing)
but I only see 6551
jpg files, so I assume that some images have multiple faces on them, is it correct?
@wywu Dear author, I think the 68-pt definition and 98-pt definition have many pts in common, so I don't think a model trained on the extracted 68-pt data would perform "very poor". I wonder what do you mean by "very poor"? And I'd like to know if I extract 68-pts from the predicted 98-pts, will the results be bad? Thanks in advance.
@mrgloom Some images contain more than one faces.
About dlib 68 pts model to wflw 98 pts model index mapping:
DLIB_68_PTS_MODEL_IDX = {
"jaw" : list(range(0, 17)),
"left_eyebrow" : list(range(17,22)),
"right_eyebrow" : list(range(22,27)),
"nose" : list(range(27,36)),
"left_eye" : list(range(36, 42)),
"right_eye" : list(range(42, 48)),
"left_eye_poly": list(range(36, 42)),
"right_eye_poly": list(range(42, 48)),
"mouth" : list(range(48,68)),
"eyes" : list(range(36, 42))+list(range(42, 48)),
"eyebrows" : list(range(17,22))+list(range(22,27)),
"eyes_and_eyebrows" : list(range(17,22))+list(range(22,27))+list(range(36, 42))+list(range(42, 48)),
}
WFLW_98_PTS_MODEL_IDX = {
"jaw" : list(range(0,33)),
"left_eyebrow" : list(range(33,42)),
"right_eyebrow" : list(range(42,51)),
"nose" : list(range(51, 60)),
"left_eye" : list(range(60, 68))+[96],
"right_eye" : list(range(68, 76))+[97],
"left_eye_poly": list(range(60, 68)),
"right_eye_poly": list(range(68, 76)),
"mouth" : list(range(76, 96)),
"eyes" : list(range(60, 68))+[96]+list(range(68, 76))+[97],
"eyebrows" : list(range(33,42))+list(range(42,51)),
"eyes_and_eyebrows" : list(range(33,42))+list(range(42,51))+list(range(60, 68))+[96]+list(range(68, 76))+[97],
}
DLIB_68_TO_WFLW_98_IDX_MAPPING = OrderedDict()
DLIB_68_TO_WFLW_98_IDX_MAPPING.update(dict(zip(range(0,17),range(0,34,2)))) # jaw | 17 pts
DLIB_68_TO_WFLW_98_IDX_MAPPING.update(dict(zip(range(17,22),range(33,38)))) # left upper eyebrow points | 5 pts
DLIB_68_TO_WFLW_98_IDX_MAPPING.update(dict(zip(range(22,27),range(42,47)))) # right upper eyebrow points | 5 pts
DLIB_68_TO_WFLW_98_IDX_MAPPING.update(dict(zip(range(27,36),range(51,60)))) # nose points | 9 pts
DLIB_68_TO_WFLW_98_IDX_MAPPING.update({36:60}) # left eye points | 6 pts
DLIB_68_TO_WFLW_98_IDX_MAPPING.update({37:61})
DLIB_68_TO_WFLW_98_IDX_MAPPING.update({38:63})
DLIB_68_TO_WFLW_98_IDX_MAPPING.update({39:64})
DLIB_68_TO_WFLW_98_IDX_MAPPING.update({40:65})
DLIB_68_TO_WFLW_98_IDX_MAPPING.update({41:67})
DLIB_68_TO_WFLW_98_IDX_MAPPING.update({42:68}) # right eye | 6 pts
DLIB_68_TO_WFLW_98_IDX_MAPPING.update({43:69})
DLIB_68_TO_WFLW_98_IDX_MAPPING.update({44:71})
DLIB_68_TO_WFLW_98_IDX_MAPPING.update({45:72})
DLIB_68_TO_WFLW_98_IDX_MAPPING.update({46:73})
DLIB_68_TO_WFLW_98_IDX_MAPPING.update({47:75})
DLIB_68_TO_WFLW_98_IDX_MAPPING.update(dict(zip(range(48,68),range(76,96)))) # mouth points | 20 pts
WFLW_98_TO_DLIB_68_IDX_MAPPING = {v:k for k,v in DLIB_68_TO_WFLW_98_IDX_MAPPING.items()}
Dear author, The WFLW offers 98 landmarks. Are the 68 landmark in 300W a subset of the 98 landmarks here?Can you offer the corresponding relations? Thanks a lot.