XingangPan / GAN2Shape

Code for GAN2Shape (ICLR2021 oral)
https://arxiv.org/abs/2011.00844
MIT License
571 stars 104 forks source link

How to change symmetry assumption #15

Closed junxuanlee closed 3 years ago

junxuanlee commented 3 years ago

Hi, in your report "DO 2D GANS KNOW 3D SHAPE? UNSUPERVISED 3D SHAPE RECONSTRUCTION FROM 2D IMAGE GANS", you have presented results for training without symmetry assumption (Image1 and Image2). May I know which part of the code allows me to change the "symmetry assumption"? Thanks in advance!

Image 1: image

Image 2: image

XingangPan commented 3 years ago

@jun1byte Hi, setting 'flip1' and 'flip3' to false in the config file will do.

junxuanlee commented 3 years ago

Hi, thank you for your reply. In the synface_pretrain.yml, you have the following as the default settings: flip1_cfg: [false, true, true, true, true, true, true, true] flip3_cfg: [true, true, true, true, true, true, true, true]

1) May I know why do you only set the first stage: flip1 = false, flip3 = true? Why only step 3 requires flipping at first stage and it is not required in the rest of the stages?

2) What does flipping mean in this setting? Flipping half of the prior shape?

3) If I were to train the model with no symmetry assumption, do I only change the first stage of flip1 and flip3 to false (as shown below)? flip1_cfg: [false, true, true, true, true, true, true, true] flip3_cfg: [false, true, true, true, true, true, true, true]

4) Or should I set the flip1 and flip3 for all stages for be false (as shown below)? flip1_cfg: [false, false, false, false, false, false, false, false] flip3_cfg: [false, false, false, false, false, false, false, false]

XingangPan commented 3 years ago

@jun1byte

  1. At the beginning, the pose of each image is unknown, in which case setting flip1=True would lead to inaccurate albedo. flip3 is used in step3, in which case setting flip3=True would motivate the viewpoint network to discover the canonical viewpoint.
  2. Flipping means flipping the original predictions (albedo and depth), and concat them to the original ones. As mentioned in this paper: https://arxiv.org/abs/1911.11130
  3. You should set the flip1 and flip3 for all stages to be false.
junxuanlee commented 3 years ago

Understood, thanks!