SinGAN: Learning a Generative Model from a Single Natural Image: Difference between revisions

Line 21: Line 21:


==Training and Loss Function==
==Training and Loss Function==
<math>\min_{G_n} \max_{D_n} \mathcal{L}_{adv}(G_n, D_n) + \alpha \mathcal{L}_{rec}(G_n)</math><br>
They use a combination of the standard GAN adversarial loss and a reconstruction loss.
They use a combination of the standard GAN adversarial loss and a reconstruction loss.
===Reconstruction Loss===
===Reconstruction Loss===
<math>L_{rec} = \Vert G_n(0,(\bar{x}^{rec}_{n+1}\uparrow^r) - x_n \Vert ^2</math><br>
<math>\mathcal{L}_{rec} = \Vert G_n(0,(\bar{x}^{rec}_{n+1}\uparrow^r) - x_n \Vert ^2</math><br>
The reconstruction loss ensures that the original image can be built by the GAN.<br>
The reconstruction loss ensures that the original image can be built by the GAN.<br>
Rather than inputting noise to the generators, they input  
Rather than inputting noise to the generators, they input  
<math>\{z_N^{rec}, z_{N-1}^{rec}, ..., z_0^{rec}\} = \{z^*, 0, ..., 0\}</math>
<math>\{z_N^{rec}, z_{N-1}^{rec}, ..., z_0^{rec}\} = \{z^*, 0, ..., 0\}</math>
where the initial noise <math>z^*</math> is drawn once and then fixed during the rest of the training.
where the initial noise <math>z^*</math> is drawn once and then fixed during the rest of the training.