faceswap-GAN icon indicating copy to clipboard operation
faceswap-GAN copied to clipboard

Direct Intuition of XGAN version implementation

Open cookie-yang opened this issue 6 years ago • 3 comments

Hi, this is Neo and I am trying to understand the principle under the model. Since I am familiar with deepfake's auto-encoder version and XGAN paper. I found model structure in your implementation is a little different from that in XGAN, like the shared encoder structure which is treated as a bad structure in XGAN, and could you please show me some potential reason behind your design? like some paper or other description? It would make us understand the whole project more.

Thanks a lot NeoYang

cookie-yang avatar Jun 26 '18 07:06 cookie-yang

The reason to use a shared-weights encoder is that I assume both input domains are human face. In XGAN, the input domains are different: they are cartoon/human faces, thus the author learned the low level features separately.

shaoanlu avatar Jun 26 '18 07:06 shaoanlu

That makes sense! Thanks a lot!And another problem is about the code shared by encoder and decoder. In the encoder: screen shot 2018-06-26 at 4 01 43 pm

After the code which is 1024 * 1 is got, why a use 4 * 4 * 1024 dense layer to reshape the code to 4 * 4 * 1024 and then use upscale layer to flatten it into 8 * 8 * 512. Then reason of these two layers confused me. Since in XGAN paper, only the 1024 * 1 code is used.

Same, In the decoder. screen shot 2018-06-26 at 4 02 15 pm

A dens e layer and two upscale layers is used to flatten code to 16 * 16 * 128 and then concatenate it with x here?

I wonder why the code is used here? and the reason behind these transformations?

Thanks a lot NeoYang

cookie-yang avatar Jun 26 '18 08:06 cookie-yang

Besides, I found some details such as the kernel size of convolutional layer of generator and discriminator are different and I am confused why the size matters and you set it from your experiences or several trials or there exists some reasons?

cookie-yang avatar Jun 26 '18 09:06 cookie-yang