There is a bug in face detection and alignment
zhanglonghao1992 opened this issue · comments
ZLH commented
get_src_landmarks(x0, x1, y0, y1, pnts)
This function requires a parameter face idx. Otherwise all faces in an image use the landmark of face0.
def get_src_landmarks(x0, x1, y0, y1, pnts, idx):
"""
x0, x1, y0, y1: (smoothed) bbox coord.
pnts: landmarks predicted by MTCNN
"""
src_landmarks = [(int(pnts[i+5][idx]-x0),
int(pnts[i][idx]-y0)) for i in range(5)]
return src_landmarks