Deep3dPortrait icon indicating copy to clipboard operation
Deep3dPortrait copied to clipboard

How to use my own pictures for 3D reconstruction

Open jly0810 opened this issue 3 years ago • 6 comments

  I want to use my photos to generate a 3D portrait model. I learned that in addition to photos, I also need several other files to input. 
  I have used the method here [https://github.com/sicxu/Deep3dPortrait/issues/9](url) to generate landmark.txt file.But I don't know how to generate the detection.txt files and the .mat file.
 I am a novice. I hope you can give me as detailed steps as possible to answer my doubts. Thank you very much for your help.

jly0810 avatar Dec 28 '21 07:12 jly0810

Have you found a way to create detection.txt file? @jly0810 If so please mention the method.

Hi, I have the same question! Have you find the way to generate them (.mat, landmark.txt)?

zwyking avatar Jul 28 '22 12:07 zwyking

@sicxu Hi, Dr. Xu, this is a great work. I followed #25 and LeoGitGuy's suggestion, but the depth map has problem.

/home/neural_image/Deep3dPortrait/utils/preprocess.py:27: FutureWarning: rcond parameter will change to the default of machine precision times max(M, N) where M and N are the input matrix dimensions. To use the future default and silence this warning we advise to pass rcond=None, to keep using the old, explicitly pass rcond=-1. k, , , _ = np.linalg.lstsq(A, b) (239, 239, 3) (159, 159, 3) (79, 79) Traceback (most recent call last): File "step1_recon_3d_face.py", line 126, in face_recon(input_path, save_path, vis_path) File "step1_recon_3d_face.py", line 74, in face_recon crop_img, crop_mask, inv_params, crop_lm, crop_param = headrecon_preprocess_withmask(img, mask, landmarks_2d, center2d.reshape([2]), s*s_factor/100) File "/home/neural_image/Deep3dPortrait/utils/preprocess.py", line 171, in headrecon_preprocess_withmask mask, lm.copy(), head_center.reshape([2]), scale, crp_w, crp_h, interpolation=cv2.INTER_NEAREST) File "/home/neural_image/Deep3dPortrait/utils/preprocess.py", line 69, in align_img cropped_img, _ = crop(img, bbox) File "/home/neural_image/Deep3dPortrait/utils/preprocess.py", line 53, in crop padded_img, padded_bbox = img_padding(img, bbox) File "/home/neural_image/Deep3dPortrait/utils/preprocess.py", line 49, in img_padding assert(bbox[0] >= 0 and bbox[1] >= 0) AssertionError_

Can you give me some advice? Thank you very much!

Best, Mike

Bai426 avatar Jan 18 '23 00:01 Bai426

Hi, I have the same question! Have you find the way to generate them (.mat, landmark.txt)?

Have you found the method to generate landmark.txt, detection.txt, and .mat?

syysummer avatar Oct 11 '23 03:10 syysummer

Just follow https://github.com/sicxu/Deep3dPortrait/issues/25 and other issues in this repo, you can generate these files.

Bai426 avatar Oct 11 '23 03:10 Bai426

Just follow #25 and other issues in this repo, you can generate these files.

Thank you very much for your answer! I have obtained the coordinates of 68 key points, but when I obtained the initial .mat file, I found that "https://arxiv.org/pdf/1906.01342.pdf" was inaccessible. Do you have any ideas?

syysummer avatar Oct 12 '23 07:10 syysummer