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

multiview images inversion in one time #12

Open
ohjarwa opened this issue Jan 16, 2023 · 3 comments
Open

multiview images inversion in one time #12

ohjarwa opened this issue Jan 16, 2023 · 3 comments

Comments

@ohjarwa
Copy link

ohjarwa commented Jan 16, 2023

Hi, thanks for your great work!

I slightly changed your code and use it to invert mulview images in one time.
To be clearly, the inversion images are capture by different cameras at one time. The angle is from 0 degree(frontal) 30 45 60 90,both left and right. On the training time, I use the pre-compute camera labels to synthesis the specific view images by one w, and accumulate the loss of multiview together. However the result is failed.
I wonder:

  1. Is the pre-compute camera pose suitable for the mulview circumstance?
  2. If not so, should I optimize the camera label during the step of w/w+ project or PTI .

Thanks.

@ohjarwa
Copy link
Author

ohjarwa commented Jan 16, 2023

My description seems not clear. Here's a group of sample data.
image

@oneThousand1000
Copy link
Owner

  1. Yes, the pre-compute camera pose is suitable, if you use the correct camera pose extraction code and image align code.

Could you please upload the aligned images of those images you showed? I wonder if the alignment is right.

My multi-view projection is a little different from yours. Specifically, all the multi-view images share a single w+ latent code (w latent code also works) and are rendered from different camera views. I didn't accumulate the loss of multiview together, instead, I backward the losses of different views respectively.

Here is part of my training code, it works for me.

        for i in tqdm(range(hyperparameters.max_pti_steps)):

            for pose_idx ,real_images_batch in enumerate(real_images_batchs):
                c = cameras[pose_idx]

                image_name = pose_idx
                generated_images = self.forward(w_pivot, c)['image'][0]

                loss, l2_loss_val, loss_lpips = self.calc_loss(generated_images, real_images_batch, image_name,
                                                               self.G, use_ball_holder, w_pivot, c)

                self.optimizer.zero_grad()
                loss.backward()
                self.optimizer.step()

                use_ball_holder = global_config.training_step % hyperparameters.locality_regularization_interval == 0

                global_config.training_step += 1

And here is a group of aligned images and camera parameters I use. Images are from FaceScape dataset:
https://drive.google.com/file/d/1XESEBIUbCsOntoWrm3gj_vpoN1gNl9pg/view?usp=sharing

@ohjarwa
Copy link
Author

ohjarwa commented Jan 17, 2023

Thanks for your reply.

I use the same w+ latent code too. I will check the img align results and compare the respective loss with accmulate loss.
I'm not convenient now. Later I will upload the image align result.

Thank you. 😊

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

2 participants