What are Generative Adversarial Networks?


A Generative Adversarial Network (GAN) is a concept that was developed in 2014 by a team of distinguished researchers led by Ian J. Goodfellow. In short, we train two deep neural networks in parallel so that the first (the Generator) tries to outsmart the second (the Discriminator). The Generator generates synthetic data, and the Discriminator tries to recognise whether the data is synthetic or natural. Over time, the generator and discriminator learn to do their jobs better and better, and the researcher can just take a rest.


Since 2014, various examples of generated dogs and cats, landscapes, horses, zebras and the faces of non-existent people have been published around the world. Although it is relatively simple to apply decision-making models in practice, imagining how to make use of GANs is much more difficult.


What Can I Generate?


StyleGAN's photorealistic facial generation was a watershed moment in the development of this technology. In the following years, more face-generation architectures have been developed, focusing on the ability to make changes to individual features of the generated faces.


Source: https://www.youtube.com/watch?v=T1o38DFalWs 0:15


In the example above, you can see how MaskGAN modifies the hairstyle of (and adds jewellery to) the person in the photo.


Not only faces can be generated. Generating anime characters is quite common. In the image below, you can see avatars that were generated based on certain conditions, such as hair colour and hair length, eye colour, facial expression and, optionally, spectacles.


Source: https://arxiv.org/pdf/1708.05509.pdf page 10.


How can we use GANs in Business Applications?


Dubbing Videos

 This technology is not limited to generating only static images. One of my favourites is Wav2Lip, which, based on a facial image (which can be generated) and a soundtrack, precisely animates the movement of the mouth, making it possible, for example, to adapt an actor's mouth movement for the purpose of dubbing.

Things get even more interesting when it turns out that there are GANs for generating speech from text. An example of such a network is GAN-TTS. By combining the text2speech model with the wav2lip model, it is possible to reduce the cost and time of producing films, commercials or educational materials for people who speak less common languages.

Hyper-personalisation for ecommerce

Another interesting application of GANs is in online shopping, for example, for clothing shops. As we all know, how a product is displayed has a significant impact on whether or not a customer decides to purchase that product. Let's imagine a lingerie shop. The algorithms we use for image analysis allow us to extract the features of the models that most frequently attract the attention of customers, and then, using GANs, add these features to the models that are used to present the products that we particularly want to convince customers to buy. For example, such features may be hair colour, eye colour or degree of muscularity.

Virtual Dressing Room

You could also use GANs (or other so-called Deep Fake algorithms) to create a virtual dressing room, where customers can try clothes, watches, glasses or jewellery on themselves. In this way, not only is it more likely that a single product will be sold, but this also increases the chances of customers buying coordinated sets combined of multiple items that are available in the store.


In the beauty industry, clients are often unable to visualise their future look when it comes choosing a new hairstyle, make-up or a tattoo. With GANs, you can show customers how they will look after the make-over, and therefore ensure that you customers are completely satisfied with the final effect.

Source: https://github.com/ZPdesu/Barbershop/blob/main/docs/assets/teaser.png


GANs Are not Only for Entertainment


In this brief article I tried to show that GANs are not only for conveying misinformation or for the purposes of entertainment. GANs can also be used to give a business a tangible advantage over its competitors. If you think that using GANs might work to the advantage of your organisation, please contact us. We will then be more than happy to discuss your business needs and assess if GANs can meet those needs.