Deep3DFaceReconstruction icon indicating copy to clipboard operation
Deep3DFaceReconstruction copied to clipboard

2d alignment seems bad

Open phypan11 opened this issue 6 years ago • 4 comments

When I plot landmarks_2d on an image in input folder, it produces bad result. Why is this happening?

vd005 vd092 vd034

phypan11 avatar May 22 '19 07:05 phypan11

Hi, landmarks may have a 1-pixel shift in 224*224 output image due to coordinates inconsistency between python and matlab (starts from 0 or 1). Besides, our model may not perform well if the photo is taken at a near-range distance like the first example. In addition, our model cannot handle the case if eyes are closed. Thanks.

YuDeng avatar May 22 '19 08:05 YuDeng

Actually I have a silly question. How do you compute the landmark coordinates on source image, as the predicted landmarks are conputed from cropped image.

watermoon123 avatar Sep 29 '20 07:09 watermoon123

Actually I have a silly question. How do you compute the landmark coordinates on source image, as the predicted landmarks are conputed from cropped image.

Do you solve this problem now? I have the same question.

xinxxx0124 avatar Jan 26 '21 12:01 xinxxx0124

@watermoon123 @xinxxx0124 I rewrote the demo a bit such that I could obtain the "cropped img" and "68 landmarks" in a jupyter notebook.

Then I did

for x,y in landmark:
        cv2.circle(mask, (x,int(224-y)), 2, (255,0,0))

Originally the landmarks seemed upside down for me but this did the job. The 224 is the size of the cropped image.

image image

acmlau avatar Mar 08 '23 15:03 acmlau