OmarAzizi / Generative-AI

Generating images (handwritten digits) using GANs built with PyTorch

Repository from Github https://github.comOmarAzizi/Generative-AIRepository from Github https://github.comOmarAzizi/Generative-AI

Generative-AI

PyTorch

Generative Adversarial Networks (GANs) consists of two neural networks, the generator and the discriminator, which are trained simultaneously through a competitive process.

image

  1. Generator: Its goal is to create data that is indistinguishable from real data.
  2. Discriminator: The discriminator network tries to distinguish between real data and data generated by the generator. It is trained on both real data and the fake data generated by the generator.

About This Model

I used the MNIST dataset to train the GAN for generating hand-written digits. Then I used matplotlib to plot some generated images on each epoch.

  | Name          | Type          | Parameters 
------------------------------------------------
0 | generator     | Generator     | 358 K 
1 | discriminator | Discriminator | 21.4 K
------------------------------------------------

Before Training

The images generated were basically just noise

image

After First Epoch

image

After 10 Epochs

Generated images pattern started to look like a hand-written digit

image

After 100 Epochs

Generated images now look like hand-written digits now

image

After 400 Epochs

image

About

Generating images (handwritten digits) using GANs built with PyTorch


Languages

Language:Python 100.0%