Deep3DFaceReconstruction icon indicating copy to clipboard operation
Deep3DFaceReconstruction copied to clipboard

Confidence Net in the model

Open HOMGH opened this issue 4 years ago • 7 comments

Hey, Thanks for your great work. Just wondering what is the notation of Confidence subnet (C-Net) in your repository? I can't find any C-Net in your codes. I'm pretty much sure that there were R-Net and C-Net in your codes (maybe the initial version)! But now it's just R_Net and Perceptual_Net in networks.py.

HOMGH avatar Sep 23 '21 10:09 HOMGH

Hi, sorry that the current code does not include the C-Net part. Actually, we did not release the C-Net part in any previous versions.

YuDeng avatar Sep 26 '21 11:09 YuDeng

Thanks for your reply. So, it means you do not use Confidence Net in your model? or you've used Confidence Net in your model but haven't released it's code?!

HOMGH avatar Sep 26 '21 14:09 HOMGH

Well, in the paper we did use the C-Net and report the evaluation results. Later in practice, we find that in most of the times C-Net only has minor improvement (in quantitative metrics) upon the naive average shape and shows no difference in visual quality. Therefore we only release the single image part (R-Net) which we think is enough to produce good result.

YuDeng avatar Sep 28 '21 05:09 YuDeng

Gotcha! Thanks for your clarification!

HOMGH avatar Sep 28 '21 06:09 HOMGH

@YuDeng , I have a question related to this topic. I was wondering what do you mean with "naive average shape". I am trying to reconstruct a face from multiple images of the same subject and I have managed to do so by getting the face_shape_ from single images of the subject (from different angles), and then I perform the average by using np.mean() between the "face_shape_"s. This way I get a decent result, but the final face appears to be "squeezed", so I don't think that the np.mean() is what you mean with naive average shape. Thank you in advance.

paolalf avatar Oct 09 '21 09:10 paolalf

Hi, the "average shape" means taking the average of identity coefficients and use the averaged coeff to construct the shape.

YuDeng avatar Oct 12 '21 04:10 YuDeng

Hi, the "average shape" means taking the average of identity coefficients and use the averaged coeff to construct the shape.

Thank you very much for your answer, @YuDeng . I have another question, If you could help me. Assuming that I have n pictures of the same subject, if I wanted to take the average of the identity coefficients, what I understand is therefore that I have to "collect" the n coeff_s returned by every

coeff_,face_shape_,face_texture_,face_color_,landmarks_2d_,recon_img_,tri_ = sess.run([coeff,\
					face_shape,face_texture,face_color,landmarks_2d,recon_img,tri],feed_dict = {images: input_img})

performed on every image of my subject and take the average of the identity portion of said coeffs_. This is then merged with the untouched portion of the coeff_ and finally what it's get is the averaged_coeff_. Following this, do you have a suggestion on how to get the face_shape_ from the new averaged_coeff_? Do I have to call again the above code, making sure that the tf.Graph() uses the new coefficient, maybe implementing an if/else statement within the tf.Graph()? Another thing that I tried was to execute:

FaceReconstructor.Reconstruction_Block(averaged_coeff,opt)
face_shape = FaceReconstructor.face_shape_t

within the tf.Session(), but it doesn't seem to be the right path to follow. Thank you again for your time.

paolalf avatar Oct 13 '21 09:10 paolalf