Closed jackytu256 closed 3 years ago
@jackytu256
(1) The save_image
function would revise recon_depth
, which would cause problem, so you may use save_image(recon_depth.clone(), f'./recon_depth.png')
(2) Use view_trans = view_trans.repeat(2,1)
instead of view_trans = view.repeat(2,1)
.
(3) Normalize recon_im
before saving it, e.g.: save_image(recon_im[0]/2+0.5, f'./recon_img.png', nrow=1)
I believe these revisions should solve the problem.
@XingangPan thanks for your reply. (1) the save_image function I use is torchvision.utils(just for your reference). (2) done (3) done
seems that the problem still remains. Do I need to provide extra information for you?
really appreciate your help :)
Thanks
@jackytu256 I have run your code and it works well with the revisions. How is your result wrong? Could you provide an example?
Here are my results:
Input:
Results:
here is the example.
I reckon unseen images may occur this problem(got from ffhq) ?
please let me know if I need to provide more information. Thanks
here is aligned images
@jackytu256 I see. This is not a bug. I think there are two main reasons.
(1) Note that the pre-trained model is not to predict accurate results for unseen samples, but to provide a rough initialization (as it is pre-trained on only 200 images). You still need to run instance-specific training as in scripts/run_celeba.sh
.
(2) There is a domain gap between FFHQ (testing) and CelebA (training). Faces are aligned differently for the two datasets. I think the issue would be alleviated if you test with CelebA images cropped via https://github.com/elliottwu/unsup3d/tree/master/data.
thanks @XingangPan
thanks @XingangPan
Hey, were you able to find good results?
Hi Thanks for releasing this repo.
I tried to do the inference to get the different degrees of viewpoints(celeba) by using the the output of netview and texture, followed by forward_step1 function, but the issue is that the generated image differs from the input one. Do I need to do the preprocessing for input image, such as specified alignment or the code I use needs to be modified? please provide some suggestions to help me to fix it. Thanks in advance