Note: Cycle GAN

We have set $X=\{x_1,x_2..\}$, $Y=\{y_1,_y2…\}$, where although there do not exist a one-to-one mapping between set $X,Y$, an element $x\in X$ is not distinguishable to elements in $Y$ if not for a certain consistent type of difference. (Eg. with/without snow, zebra/horse…)

Goal:

Find mappings $X \rightarrow X’, Y \rightarrow Y’$ so that $x’\in X’$ is similar enough to $x \in X$ but at the same time indistinguishable from $y\in Y$, and $y’\in Y’$ is similar enough to $y \in Y$ but at the same time indistinguishable from $x\in X$

Method:

Create two generators:
$$X’ =Gen_1(X) $$
$$Y’ = Gen_2(Y)$$
Create three losses:
$$L_{discriminator1}=disc(\{y’\},\{y\})$$
$$L_{discriminator2}=disc(\{x’\},\{x\})$$
$$L_{reconstruction}=||x-x’||_2+||y-y’||_2$$

And that is all that is necessary.
How amazing the design…

reference:

  • Unpaired Image-to-Image Translation
    using Cycle-Consistent Adversarial Networks