An intuitive introduction

In this section, we are going to introduce GANs in a very intuitive way. To get an idea of how GANs work, we will adopt a fake scenario of getting a ticket for a party.

The story starts with a very interesting party or event being held somewhere, and you are very interested in attending it. You hear about this event very late and all the tickets are sold out, but you will do anything to get into the party. So you come up with an idea! You will try to fake a ticket that needs to be exactly the same as the original one, or very, very similar to it. But because life is not easy, there's another challenge: you don't know what the original ticket looks like. So from your experience of going to such parties, you start to imagine what the ticket might look like and start to design the ticket based on your imagination.

You will try to design the ticket and then go to the event and show the ticket to the security guys. Hopefully, they will be convinced and will let you in. But you don't want to show your face multiple times to the security guards, so you decide to get help from your friend, who will take your initial guess about the original ticket and show it to the security guards. If they don't let him in, he will get some information for you about what the ticket might look like, based on seeing some people getting in with the actual ticket. You will refine the ticket based on your friend's comments until the security guards let him in. At this pointand at this point only—you will design another one that has exactly the same look and get yourself in.

Do, think too much about how unrealistic this story is, but the way GANs work is very similar to this story. GANs are very trendy nowadays, and people are using them for many applications in the field of computer vision.

There are many interesting applications that you can use GANs for, and we will implement and mention some of them.

In GANs, there are two main components that have made a breakthrough in many computer vision fields. The first component is called Generator and the second one is called Discriminator:

  • The Generator will try to generate data samples out of a specific probability distribution, which is very similar to the guy who was trying to replicate a ticket for the event
  • The Discriminator will judge (like the security guys who are trying to find flaws in the ticket to decide whether it's original or fake) whether its input is coming from the original training set (an original ticket) or from the generator part (designed by the guy who's trying to replicate the original ticket):
Figure 1: GANs – general architecture
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset