GAN: what it is and what are its most interesting applications


Many images now are generated by AI and especially by GAN. Find out what it is and how it works.

2022-07-14T10:30:06+00:00 June 8th, 2023 | Author: Niccolò Cacciotti | Category:

GAN: what it is and what are its most interesting applications


Many images now are generated by AI and especially by GAN. Find out what it is and how it works.

2022-07-14T10:30:06+00:00 June 8th, 2023 | Author: Niccolò Cacciotti | Category:

Home/Artificial Intelligence/GAN: what it is and what are its most interesting applications

What are GANs?


If the image of the woman next to the Mona Lisa has triggered your curiosity, you are in the right place to find out what it is all about.

Let’s start by saying that she is not the real Mona Lisa from whom Leonardo Da Vinci took inspiration for his very famous painting. It is just an image generated by Artificial Intelligence

Today, more than ever, we hear about this kind of content. For example, we all also know and use different algorithms, such as Chat GPT, that allow us to create text, images and videos from simple descriptive text.

Now we would like to delve into particular generative systems that have become important because of their impressive results. We are talking about GANs, Generative Adversarial Networks, which are an AI algorithm used in unsupervised machine learning. 

They were born only in 2014 by the American computer scientist Ian Goodfellow and colleagues at the University of Montreal. The paper, named “Generative Adversarial Nets”, showed an architecture in which two neural networks competed with each other. Let’s find out more.

How do GAN networks work?


The two neural networks that oppose each other are called generator and discriminator.

Taking the example of the Mona Lisa, we will now explain their operation leading to the final result we have seen.

The discriminator is a convolutional neural network. The aim of this part of the algorithm is to define with the highest possible accuracy if the received input is a real face or not.

The discriminator is initially trained separately to recognize real faces with a high degree of accuracy. The ultimate goal of the discriminator is to distinguish whether a given image is of a real or artificial face. In short, it must try to win over the generator by recognizing its fakes.

Now it is the turn of the generator. It is a deconvolutional network, which tries to generate images through interpolation processes. The purpose is to produce realistic images that can bypass the discriminator, producing faces indistinguishable from real ones. 

How is the end result achieved? The process is truly fascinating.

The images created by the generator will be the input to the discriminator. 

This latter analyzes the generated image, calling it real or artificial, comparing it with the images in the test set. 

If the judgment is wrong (artificial face considered real), the discriminator will learn from the error and improve subsequent responses. If the valuation is correct (artificial face identified as such), the feedback will help the generator improve the next images.

This process continues until the images produced by the generator and the discriminator’s judgments reach an equilibrium point. Thus, the two networks will continue to oppose each other and train continuously. 

This, however, allows for results that are closer and closer to perfection.

Here are the most curious and innovative applications of GANs


It seems clear that GANs represent one of the most innovative ideas presented recently. 

Now the time has finally come to present its applications. We anticipate that in addition to the interesting innovations they bring, GANs prove to be really crucial for improvements in some areas.

  • Faces of people and deepfake videos

This application example demonstrates the high degree of perfection of AI-generated images. Indeed, the images have such precise details that it is impossible to recognize an image generated from a real face. 

We had already shown an example when we talked about the tasks of computer vision. It is worth seeing the result, you will be impressed.

Starting from images of people, it is possible to also generate videos with such people in motion. In the video, for example, an artificial Tom Cruise is seen laughing and joking.

Source: TikTok

We have to admit, it is a very impressive output. The technique used is known as “deepfake,” or fake videos of important people worldwide. 

This example is amusing, but such technique is not always used for this purpose. 

  • Clothing 

Again, the images of the clothing, which follow, do not exist.   

The images in the same row are generated from the original image.

Source: Github

Compared to the other example, we can see how this application can be really useful for companies in the fashion industry. For example, the generated clothes can be a source of inspiration for designers.

This type of generation can also cover shoes, any type of clothing. As the number of applications increases, so do the beneficiaries of this technology.

  • Art and pictures 

The art world could not miss the call as well. GANs can amaze by creating and spectacular paintings. Do you like the artist Monet? Surely then you will love these paintings. 

In this case, GAN learns the style of the artist’s images as a whole and applies it to other types of images. We can then take a picture of a landscape and transfer the style of a specific artist. This application will surely be appreciated by all art lovers.

Source: Github

  • Music 

Not only images and videos, even music tracks can be generated by AI. Rhythm, tones and other nuances are carefully shaped into a new melody

Who knows if we will hear this track sung by our favorite singer at one of his/her concerts.

Source: Github

Analyzing these applications, we can say that GANs produce very accurate results. This, however, makes it clear that human use of these technologies is different.

Precisely because of the nature of their use, we can talk about the use of GANs, in medical imaging. For example, they can be used to transform a radiological image into another image belonging to the same method. Another case concerns the possibility of improving the quality of acquired images. Finally, they are also useful for segmenting or synthesizing radiological images to predict disease course.

We wonder: as artificial intelligence evolves, what is the role of humans in a changing world?

What we must remember is that these tools cannot replace them. Instead, they can enhance and support the innate creativity that only humans have. 

We must not be afraid and reject Artificial Intelligence in all its facets. We need to try and get to know it. Only in this way can we take advantage of all the opportunities it gives us to improve more efficiently our present.


© Copyright 2012 – 2023 | All Rights Reserved


Author: Niccolò Cacciotti, Head of AI Department

Home/Artificial Intelligence/GAN: what it is and what are its most interesting applications

What are GANs?


If the image of the woman next to the Mona Lisa has triggered your curiosity, you are in the right place to find out what it is all about.

Let’s start by saying that she is not the real Mona Lisa from whom Leonardo Da Vinci took inspiration for his very famous painting. It is just an image generated by Artificial Intelligence

Today, more than ever, we hear about this kind of content. For example, we all also know and use different algorithms, such as Chat GPT, that allow us to create text, images and videos from simple descriptive text.

Now we would like to delve into particular generative systems that have become important because of their impressive results. We are talking about GANs, Generative Adversarial Networks, which are an AI algorithm used in unsupervised machine learning. 

They were born only in 2014 by the American computer scientist Ian Goodfellow and colleagues at the University of Montreal. The paper, named “Generative Adversarial Nets”, showed an architecture in which two neural networks competed with each other. Let’s find out more.

How do GAN networks work?


The two neural networks that oppose each other are called generator and discriminator.

Taking the example of the Mona Lisa, we will now explain their operation leading to the final result we have seen.

The discriminator is a convolutional neural network. The aim of this part of the algorithm is to define with the highest possible accuracy if the received input is a real face or not.

The discriminator is initially trained separately to recognize real faces with a high degree of accuracy. The ultimate goal of the discriminator is to distinguish whether a given image is of a real or artificial face. In short, it must try to win over the generator by recognizing its fakes.

Now it is the turn of the generator. It is a deconvolutional network, which tries to generate images through interpolation processes. The purpose is to produce realistic images that can bypass the discriminator, producing faces indistinguishable from real ones. 

How is the end result achieved? The process is truly fascinating.

The images created by the generator will be the input to the discriminator. 

This latter analyzes the generated image, calling it real or artificial, comparing it with the images in the test set. 

If the judgment is wrong (artificial face considered real), the discriminator will learn from the error and improve subsequent responses. If the valuation is correct (artificial face identified as such), the feedback will help the generator improve the next images.

This process continues until the images produced by the generator and the discriminator’s judgments reach an equilibrium point. Thus, the two networks will continue to oppose each other and train continuously. 

This, however, allows for results that are closer and closer to perfection.

Here are the most curious and innovative applications of GANs


It seems clear that GANs represent one of the most innovative ideas presented recently. 

Now the time has finally come to present its applications. We anticipate that in addition to the interesting innovations they bring, GANs prove to be really crucial for improvements in some areas.

  • Faces of people and deepfake videos

This application example demonstrates the high degree of perfection of AI-generated images. Indeed, the images have such precise details that it is impossible to recognize an image generated from a real face. 

We had already shown an example when we talked about the tasks of computer vision. It is worth seeing the result, you will be impressed.

Starting from images of people, it is possible to also generate videos with such people in motion. In the video, for example, an artificial Tom Cruise is seen laughing and joking.

Source: TikTok

We have to admit, it is a very impressive output. The technique used is known as “deepfake,” or fake videos of important people worldwide. 

This example is amusing, but such technique is not always used for this purpose. 

  • Clothing 

Again, the images of the clothing, which follow, do not exist.   

The images in the same row are generated from the original image.

Source: Github

Compared to the other example, we can see how this application can be really useful for companies in the fashion industry. For example, the generated clothes can be a source of inspiration for designers.

This type of generation can also cover shoes, any type of clothing. As the number of applications increases, so do the beneficiaries of this technology.

  • Art and pictures 

The art world could not miss the call as well. GANs can amaze by creating and spectacular paintings. Do you like the artist Monet? Surely then you will love these paintings. 

In this case, GAN learns the style of the artist’s images as a whole and applies it to other types of images. We can then take a picture of a landscape and transfer the style of a specific artist. This application will surely be appreciated by all art lovers.

Source: Github

  • Music 

Not only images and videos, even music tracks can be generated by AI. Rhythm, tones and other nuances are carefully shaped into a new melody

Who knows if we will hear this track sung by our favorite singer at one of his/her concerts.

Source: Github

Analyzing these applications, we can say that GANs produce very accurate results. This, however, makes it clear that human use of these technologies is different.

Precisely because of the nature of their use, we can talk about the use of GANs, in medical imaging. For example, they can be used to transform a radiological image into another image belonging to the same method. Another case concerns the possibility of improving the quality of acquired images. Finally, they are also useful for segmenting or synthesizing radiological images to predict disease course.

We wonder: as artificial intelligence evolves, what is the role of humans in a changing world?

What we must remember is that these tools cannot replace them. Instead, they can enhance and support the innate creativity that only humans have. 

We must not be afraid and reject Artificial Intelligence in all its facets. We need to try and get to know it. Only in this way can we take advantage of all the opportunities it gives us to improve more efficiently our present.


© Copyright 2012 – 2023 | All Rights Reserved


Author: Niccolò Cacciotti, Head of AI Department