Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Torso not added to final output #3

Closed
RobinRenggli opened this issue Jun 26, 2021 · 18 comments
Closed

Torso not added to final output #3

RobinRenggli opened this issue Jun 26, 2021 · 18 comments

Comments

@RobinRenggli
Copy link

RobinRenggli commented Jun 26, 2021

I trained the Obama example and I get expected results from the HeadNeRF, but when I train and render the TorsoNeRF, I get results that look very similar (i.e. a floating head, torso is missing). I only trained for 10'000 iterations, but from my experience with NeRF, the correct shapes should appear rather quickly.

Could it be that there is a setting that needs to be turned on, or a bug in the code, that prevents the Torso from being learned by the TorsoNeRF? Or does it take a large amount of iterations for the Torso to appear?

I used the commands as specified in the README.

Thanks for your help, this is a very cool project!

HeadNeRF output:
000
TorsoNeRF output:
000

@YudongGuo
Copy link
Owner

Hi, actually it's a problem of network initialization. We found that in few cases the torso model could not produce proper output due to bad initialization.

One solution is to run the command multiple times until good initialization (in my experience, the psnr is greater than 21 in 1000 iterations for a good initialization). Another solution is to use a pretrained Torso model (e.g. torso model trained from another person).

@RobinRenggli
Copy link
Author

Oh, ok, this is really useful to know. I see now that in my run PSNR was still below 20 after 10'000 iterations.

Thanks for your help.

@RobinRenggli
Copy link
Author

I tried several times now with multiple attempts with PSNR over 25 and different input videos and it never worked. Could you maybe provide a pretrained torso model such that I can try if that makes it work/look at how the results are supposed to look?
(The HeadNeRF works very well!)

@YudongGuo
Copy link
Owner

Hi, the Torso model pretrained on the obama video is here:
https://www.dropbox.com/s/hy99o8jm3iyskur/500000_body.tar?dl=0

It should work.

@RobinRenggli
Copy link
Author

Thank you, I'll try it out today.

@RobinRenggli
Copy link
Author

I can confirm that it works by using a pretrained torso model, even if the torso in question is very different from the pretrained one.

In my example, I could not get a good initialization even after many tries. Do you maybe have an intuition or explanation on how likely/unlikely a good initialization is? Does it depend on how much of the frame is taken up by the torso?

Feel free to close this issue, as my question is more of a research one.

@YudongGuo
Copy link
Owner

I can confirm that it works by using a pretrained torso model, even if the torso in question is very different from the pretrained one.

In my example, I could not get a good initialization even after many tries. Do you maybe have an intuition or explanation on how likely/unlikely a good initialization is? Does it depend on how much of the frame is taken up by the torso?

Feel free to close this issue, as my question is more of a research one.

Hi, in my experience, I can get a good initialization with a single attempt in most cases. In all cases, a good initialization is achieved with no more than 5 attempts.

For bad initialization, the PSNR does not show obvious improvement (usually below 20). For good initialization, the PSNR shows obvious improvement in the first 1000 iterations and usually above 21. I didn't notice the correlation with the torso part rate.

It's strange that you didn't get proper results even with PSNR greater than 25. However, you can always use the pretrained torso model for initialization.

@saslamsameja
Copy link

Hi @YudongGuo, What is the expected value of PSNR for the training of HeadNeRF? I started a training iteration and completed about 200k iterations but my PSNR value is still at around 19. I used all default settings and commands given in Readme.

@YudongGuo
Copy link
Owner

YudongGuo commented Jun 30, 2021

Hi @YudongGuo, What is the expected value of PSNR for the training of HeadNeRF? I started a training iteration and completed about 200k iterations but my PSNR value is still at around 19. I used all default settings and commands given in Readme.

Hi, expected PSNR is over 30. And in rare cases (with lower rate than TorsoNeRF) HeadNeRF suffers from bad initialization too. So the advices for training TorsoNeRF above also apply to HeadNeRF.

@saslamsameja
Copy link

saslamsameja commented Jun 30, 2021

Hi @YudongGuo, What is the expected value of PSNR for the training of HeadNeRF? I started a training iteration and completed about 200k iterations but my PSNR value is still at around 19. I used all default settings and commands given in Readme.

Hi, expected PSNR is over 30. And in rare cases (with lower rate than TorsoNeRF) HeadNeRF suffers from bad initialization too. So the advices for training TorsoNeRF above also apply to HeadNeRF.

@YudongGuo, could you please provide the HeadNeRF pre-trained weights for the Obama video as well?

@YudongGuo
Copy link
Owner

YudongGuo commented Jun 30, 2021

Hi @saslamsameja, I have uploaded both pretrained models in pretrained_models/ folder. Note that the code of face tracking for training the uploaded models is slightly different from this repo.

@saslamsameja
Copy link

Thanks, @YudongGuo. I have two questions:

  • Even though the code for face tracking is different but using these weights for initialization will fix the problem of training, right?
  • And do you plan on publishing the changes related to the face tracking as well?

@saslamsameja
Copy link

I got a PSNR of around 30 on the 2nd iteration of HeadNerf training, without loading the pre-trained weights. Thanks, @YudongGuo.

@YudongGuo
Copy link
Owner

Thanks, @YudongGuo. I have two questions:

  • Even though the code for face tracking is different but using these weights for initialization will fix the problem of training, right?
  • And do you plan on publishing the changes related to the face tracking as well?

Hi, the weights could be used for good initialization. And there were slight differences in differentiable rendering settings and tracking smoothness settings (in general the tracking code in this repo is better).

@saslamsameja
Copy link

adnerfsub.mp4

@YudongGuo, the output that I generated using the weights that you shared has a lot of flickering between the head and torso. Could this be due to the difference in the tracking code that you mentioned? Or is there any other reason for this. Because I noticed that the demos that you shared do not have this noise.

@YudongGuo
Copy link
Owner

YudongGuo commented Jul 1, 2021

adnerfsub.mp4
@YudongGuo, the output that I generated using the weights that you shared has a lot of flickering between the head and torso. Could this be due to the difference in the tracking code that you mentioned? Or is there any other reason for this. Because I noticed that the demos that you shared do not have this noise.

I think it's because the difference between the tracking parameters. You can finetune the models with current parameters, and I will check this part too.

@YudongGuo
Copy link
Owner

YudongGuo commented Jul 1, 2021

adnerfsub.mp4
@YudongGuo, the output that I generated using the weights that you shared has a lot of flickering between the head and torso. Could this be due to the difference in the tracking code that you mentioned? Or is there any other reason for this. Because I noticed that the demos that you shared do not have this noise.

obama-nerf.mp4

Hi, this is the generated video with the tracking parameters of pretrained models. So it's because the inconsistence between tracking parameters.

@kingsj0405
Copy link

I also got the same problem with another identity.
Both trainings from scratch and from Obama are tried.
Can I get any advice to converge?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants