In this project, we implement the model architecture and training loop for DCGAN and CycleGAN. Additionally, we perform ablation study and analysis on data augmentation method and discriminator type to provide further information.
The formula for calculating the relationship between input size, output size, and convolutional paramter is shown below:
Given that the
We can solve the solution and find that
Based on the formula in 2.1,
(1) --data_preprocess=basic
Discriminator total loss:

Generator total loss:

(2) --data_preprocess=basic and --use_diffaug
Discriminator total loss:

Generator total loss:

(3) --data_preprocess=deluxe
Discriminator total loss:

Generator total loss:

(4) --data_preprocess=deluxe and --use_diffaug
Discriminator total loss:

Generator total loss:

Ideally, the discriminator loss would decrease at the early stage and eventually be stablized around one value that suggests around 50% accuracy in distinguishing real images from fake ones. The generator loss would be high at the early stage and decreases over time as it learns to produce high-quality images. Additionally, the loss curve would fluctuate a lot due to the dynamics due to the adversarial training.
Generated image at iteration 200:

Generated image at iteration 2000:

Generated image at iteration 6000:

Based on three example from 200 to 2000 to 6000 above, we can see that GAN gradually improves its generation quality by making the edge and shape better as the first step. Based on clear edge and shape, it would improve its details including the eyes and fur.
Cat dataset: w/o cycle consistency loss at iteration 1000
X-Y

Y-X

Cat dataset: w/ cycle consistency loss at iteration 1000
X-Y

Y-X

Cat dataset: w/o cycle consistency loss at iteration 10000
X-Y

Y-X

Cat dataset: w/ cycle consistency loss at iteraction 10000
X-Y

Y-X

Apple2orange dataset: w/o cycle consistency loss at iteration 10000
X-Y

Y-X

Apple2orange dataset: w/ cycle consistency loss at iteration 10000
X-Y

Y-X

The positive side is that consistency loss helps the model generate more clear edges and object shapes since it forces the model to match generated images with real images. Easy features like edges and colors are more similar with real images compared with generated images provided without consistency loss. The consistency loss helps the model avoid generating ambiguous or unclear images.
However, the current comparison are purely subjective. More advanced automatic evaluation metric like FID should be included to provide accuracy comparison.
Generally, PatchDiscriminator helps CycleGAN provide higher quality of images. The patch classification helps the discriminator to better classify between generated images and real images. Typically, patches features help the model better align with local features like the shape of eyes and the shape of months. Examples are provided below.
Cat dataset: CycleGAN with DCDiscriminator at iteration 10000
X-Y

Y-X

Cat dataset: CycleGAN with PatchDiscriminator at iteration 10000
X-Y

Y-X

Apple2orange dataset: CycleGAN with DCDiscriminator at iteration 10000
X-Y

Y-X

Apple2orange dataset: CycleGAN with PatchDiscriminator at iteration 10000
X-Y

Y-X
