Home

Awesome

pytorch-MNIST-CelebA-cGAN-cDCGAN

Pytorch implementation of conditional Generative Adversarial Networks (cGAN) [1] and conditional Generative Adversarial Networks (cDCGAN) for MNIST [2] and CelebA [3] datasets.

Implementation details

GAN

Loss

Resutls

MNIST

<table align='center'> <tr align='center'> <td> cGAN</td> <td> cDCGAN</td> </tr> <tr> <td><img src = 'MNIST_cGAN_results/generation_animation.gif'> <td><img src = 'MNIST_cDCGAN_results/MNIST_cDCGAN_generation_animation.gif'> </tr> </table> <table align='center'> <tr align='center'> <td> MNIST </td> <td> cGAN after 50 epochs </td> <td> cDCGAN after 20 epochs </td> </tr> <tr> <td><img src = 'MNIST_cGAN_results/raw_MNIST.png'> <td><img src = 'MNIST_cGAN_results/MNIST_cGAN_50.png'> <td><img src = 'MNIST_cDCGAN_results/MNIST_cDCGAN_20.png'> </tr> </table>

CelebA

<table align='center'> <tr align='center'> <td> cDCGAN</td> <td> cDCGAN crop</td> </tr> <tr> <td><img src = 'CelebA_cDCGAN_results/CelebA_cDCGAN_generation_animation.gif'> <td><img src = 'CelebA_cDCGAN_crop_results/CelebA_cDCGAN_crop_generation_animation.gif'> </tr> </table> <table align='center'> <tr align='center'> <td> CelebA </td> <td> cDCGAN after 20 epochs </td> <td> cDCGAN crop after 30 epochs </td> </tr> <tr> <td><img src = 'CelebA_cDCGAN_results/raw_CelebA.png'> <td><img src = 'CelebA_cDCGAN_results/CelebA_cDCGAN_20.png'> <td><img src = 'CelebA_cDCGAN_crop_results/CelebA_cDCGAN_crop_30.png'> </tr> </table> <table align='center'> <tr align='center'> <td> cDCGAN </td> <td> cDCGAN crop </td> </tr> <tr> <td><img src = 'CelebA_cDCGAN_results/CelebA_cDCGAN_morp.png'> <td><img src = 'CelebA_cDCGAN_crop_results/CelebA_cDCGAN_crop_morp.png'> </tr> </table>

Development Environment

Reference

[1] Mirza, Mehdi, and Simon Osindero. "Conditional generative adversarial nets." arXiv preprint arXiv:1411.1784 (2014).

(Full paper: https://arxiv.org/pdf/1411.1784.pdf)

[2] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. "Gradient-based learning applied to document recognition." Proceedings of the IEEE, 86(11):2278-2324, November 1998.

[3] Liu, Ziwei, et al. "Deep learning face attributes in the wild." Proceedings of the IEEE International Conference on Computer Vision. 2015.