IN DEPTH OF Faceapp

Debojyoti Chakraborty
Analytics Vidhya
Published in
5 min readApr 16, 2020

Technology trends

___

By Debojyoti Chakraborty

INTRODUCTION

We all are using various social media like Facebook,Instagram and Twitter.Recent some while you open these app,you may see many old aged peoples in the profile of your friends,followers,even some celebrities also.

You might have noticed that they look older than their actual age in those pictures. Haven’t you?

Well, it’s not that all of they have stepped into a time machine or have consumed something that turned them into their 50s — it’s an exciting feature of an AI-enabled face changing app, FaceApp

Sounds surprising? Wondering how this application deliver a realistic picture of your older version?

Take a comfy seat and start reading.

Origin and Features of this app

Introduced back in 2017, FaceApp is a face changing app for iPhone and Android devices designed by Russian company, Wireless Lab. The application works on Artificial Intelligence and neural networks technology to generate highly realistic face transformations.

The app offers around 28 filters to make it possible for users to try and see hilarious, weird, freaky, and amusing alterations of their faces.

Some age filter features are Age filter,Smile filter,Hairstyle filter,Gender Swap filter,Skin tone Lightning filter etc.

Basic intro to Neural network and machine learning(for better understanding working of faceapp)

Basic idea behind machine learning

Now, where does the Machine Learning comes in? What does it do? What is it?

Simply stating, a computer learning things on its own without being explicitly programmed to, just by seeing data and its labels is called Machine Learning. You give a large dataset, label all of it and feed it to an ML Application, now it learns itself how to identify and segregate data.

Artificial Neural network

The simplest definition of a neural network, more properly referred to as an ‘artificial’ neural network (ANN), is provided by the inventor of one of the first neurocomputers, Dr. Robert Hecht-Nielsen. He defines a neural network as:

“…a computing system made up of a number of simple, highly interconnected processing elements, which process information by their dynamic state response to external inputs.

In “Neural Network Primer: Part I” by Maureen Caudill, AI Expert, Feb. 1989

The Basics of Neural Networks

Neural networks are typically organized in layers. Layers are made up of a number of interconnected ‘nodes’ which contain an ‘activation function’. Patterns are presented to the network via the ‘input layer’, which communicates to one or more ‘hidden layers’ where the actual processing is done via a system of weighted ‘connections’. The hidden layers then link to an ‘output layer’ where the answer is output as shown in the graphic below.

Programming language used for Faceapp

1. Swift and Java/Kotlin

When talking about frontend development, it is expected that this face changing application is relying upon Swift for its existence on iOS platform and Java or Kotlin for building its Android presence.

2. Python

Since the application is based on Artificial Intelligence, Python — one of the top programming languages — is also expected to be used for server-side development.

3. OpenGL or OpenCV

Either of these two libraries have also been considered as a part of FaceApp’s tech stack due to the fact that real-time processing is performed on pictures.

Working of FaceApp — The App That Makes You Look Old

FaceApp makes use of “deep generative convolutional neural networks” to makes your pictures awesome.Also the GAN(Generative Adversarial Network).

So what does happen when we apply a filter on FaceApp?

Simply saying, FaceApp is taking features from one face and applying to another. So it has a database where it has a huge amount of pictures of faces and it extracts features from your face, and applies some changes which render your face to look different, yet the distinctive features remain which make you identify yourself. So now you can change the gender of the photograph, age yourself decades and do what not with striking realism.

So what FaceApp does is uses AI open-source libraries like TensorFlow to find features from your face and then apply the filter or say add features which make you look old or whatever you choose.

If you consecutively run a filter on a single image, you will see the raw features generally associated with Hidden Layers of a Neural Net. The features the hidden layers store can be clearly seen in the image:

What is GAN?

Basically these are Neural Net technology which can be used to create new, fake data which looks like any real data.

For example, it can create new faces, new paintings which will look like any other but which actually does not even exist but are made by your machine. See, the machine is actually learning.

As the definition, Generative adversarial networks (GANs) are deep neural net architectures comprised of two nets, pitting one against the other (thus the “adversarial”).

So now you know how ML can even create new faces, so it may be easier to contemplate taking features from one face and applying to another or say taking features from your face and applying on it features which make you look older.

It is mainly uses cycleGan* and DiscoGan* to perform such type of operations on human faces.

Both gan has one main goal that

In this way the Faceapp uses GAN to make you old.

The great power of ai and Machine learning is showed in this app.

Definition — What does Image Filter mean?

An image filter is a technique through which size, colors, shading and other characteristics of an image are altered.

Conclusion

The Faceapp makes a great use of ml and ai.Hopefully we can see more revolutionary new products and application of ml in near future.

Resources I used:

1.“FaceApp: How Neural Networks can do Wonders” by Harsh Aryan https://link.medium.com/TMH7veydFY

2.https://appinventiv.com/blog/everything-you-need-to-know-about-faceapp/

3.https://www.reddit.com/r/MachineLearning/comments/67umwt/d_how_does_faceapp_work/?utm_medium=android_app&utm_source=share

4.http://pages.cs.wisc.edu/~bolo/shipyard/neural/local.html

5.https://cdn-images-1.medium.com/max/2000/1*bhFifratH9DjKqMBTeQG5A.gif

6.https://www.tensorflow.org/beta/tutorials/generative/cyclegan

cycleGan:unpaired image to image translation using conditional GAN’s, as described in Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks, also known as CycleGAN.

--

--

Debojyoti Chakraborty
Analytics Vidhya

cs student pre final year,Open source contributor,AI && ML,DS & ALGO