Hi everyone!

I am an engineering student in the sixth semester of the Electronics & Instrumentation department at B.M.S. College of Engineering, Bengaluru.

One of my electives is Machine Learning, and I was required to code a classifier for an assignment. I came across Generative Adversarial Networks, also abbreviated as GANs. These are exciting and very interesting machine learning models. GANs are fun to code and implement. ๐Ÿ˜ 

So, what is GAN? In simple words, GAN is a class of machine learning frameworks (Deep Learning-based model) where two neural networks compete in a game. One of the trained neural networks will generate data with the same statistics as the training datasets and the other neural network will be trained to differentiate real data from fake one. Hence, the name "adversarial". One of the popular applications of GAN includes deepfake detection. I have elaborated on the basic workings of a GAN below. 

The two neural networks of a GAN are called generator and discriminator. The generator is generally represented by the function G(x), and the discriminator is represented by the function D(x). In most cases, the input to the generator will be any sort of noise, and it generates data from the given input. For example, if the input fed to the generator is a blurry dog's image, it will generate a clear dog's picture but not necessarily the same dog as the one present in the input. Now, the discriminator determines whether the picture generated by the first neural network is a real or a deepfake image.

GANs are unsupervised learning trained to copy or mimic an image and not to classify an image.


Illustration of a GAN (Ref: https://machinelearningmastery.com/what-are-generative-adversarial-networks-gans/)

GANs have several applications, a few of them are as follows:

  • Generating examples for image datasets
  • Generating images of human faces
  • Generation of realistic pictures
  • Generation of caricatures and cartoon characters
  • Image-to-Image translation
  • Text-to-Image translation
  • Face Frontal View Generation
  • Conversion of images to emojis
  • Photograph editing
  • Face aging
  • Photo blending
  • Video prediction
  • Three-dimensional (3-D) object generation
In conclusion, the real-life application of GAN is the popular FaceApp, which is used to swap faces and make the face look younger or older. GAN is used to change the hair color in an image (for example, if a person in a certain image is blonde, the hair color can be changed to brown, red, or any other color). GANs are very innovative and entertaining for everyone. Anyone passionate about coding Python will appreciate the GANs. ๐Ÿ˜Ž



  




 

Comments

Post a Comment