Paper 21-Fake Face Generator
Paper 21-Fake Face Generator
Abstract—As machine learning is growing rapidly, creating the fake images generated by the conventional GAN is
art and images by machine is one of the most trending topics limited. Wang et al. [2] in 2016 tried to simplify the overall
in current time. It has enormous applications in our current process of generative models which gave them more
day to day life. Various researchers have researched this topic realistic high resolution images as well as highly stable and
and they try to implement various ideas and most of them are robust learning procedures. Ghatas et al. [3] in 2020
based on CNN or other tools. The aim of our work is to proposed a method of building a complex modular pipeline
generate comparatively better real-life fake human faces with low using previously trained models to generate the kin image.
computational power and without any external image They tried to build such a model where it changes the way
classifier, rather than removing all the noise and maximizing the
of approaching GAN problems.
stabilization which was the main challenge of the previous
related works. For that, in this paper, we tried to implement Hamdi et al. [4] in 2019 proposed a new GAN that uses
our generative adversarial network with two fully connected the K-nearest neighbor for selective feature matching in a high
sequential models, one as a generator and another as a level space and they named their work as K-GAN. Tolosana
discriminator. Our generator is trainable which gets random et al. [5] in 2020 tried to recognize fake news, fake images,
data and tries to create fake human faces. On the other hand, fake media, and face manipulation using their method. They
our discriminator gets data from the CelebA dataset and tries provided a thorough review of digital manipulation techniques
to detect that the images generated by the generator are fake or
which were applied to facial content due to the huge number
real, and gives feedback to the generator. Based on the feedback
of possible detrimental applications.
the generator improves its model and tries to generate more
realistic images. Karras et al. [6] in 2019 proposed a method that re-designs
the generator architecture so that we can understand the various
Keywords—Generative adversarial network; fake human faces; aspects of the image synthesis process. Though GAN has seen
generator; discriminator; CelebA dataset rapid improvement in recent years, we still have a very
I. INTRODUCTION poor understanding of the properties of the latent spaces. They
tried to understand the inner workings of the latent spaces.
Fake images can be used by police to track down Their work starts learning from constant input and tries to
people who are involved in adultery. As we know nowadays adjust the “Style” of the image on each layer. Their method
child and underage pornography is alarming. To catch such was tested on Flickr-Faces-HQ and FFHQ datasets.
people we can use computer generated fake faces, that will
be more ethical than using real images [11]. As we can see Zhao et al. [7] in 2019 proposed an image translation
nowadays creating fake or edited images is very easy. To network by exploiting attributes with the generative adversarial
identify these kinds of images, we can build a model. For this network. It can remarkably contribute to the seven authenticity
model to be trained we can use the computer generated images of the generated face by supplementing the sketch image with
to identify the real and fake images. We use the fake computer the additional facial attribute feature. The generator and
generated images in visual art and the advertising industries. discriminator both use skip-connection to reduce the number of
These images have a huge role in computer games. In layers without affecting network performance. In the
computer and mobile games along with play station games, underlying feature extraction phase this network is different
these images can be used. As augmented reality and virtual from most attribute-embedded networks. They divided their
reality are growing rapidly, we can use these computer networks into two parts as sub-branch A and sub-branch B,
generated fake images. which takes a sketch image and attribute vector to extract low
level profile information and high level semantic features.
II. LITERATURE REVIEW
In recent years, Generative Adversarial Networks have
There are many fake image generation models created achieved extraordinary results for various applications in many
or updated by the researchers which generate pretty good fields especially in image generation because of their ability to
images. Zhang et al. [1] in 2020 discussed an algorithm that create sharp and realistic images. In this paper, Shirin Nasr
can improve the quality of generated images as the quality of Esfahani et al. [8] discussed five areas of image synthesis
160 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 13, No. 7, 2022
based on different techniques of GAN. They are: Text to Image as we can see from the workflow diagram, we have used
Synthesis, Image to Image translation, Face Manipulation, 3D random noise as input data for the generator. We have also
Image Synthesis and Deep Master Prints. In this paper they used the Batch Normalization technique and the Reshape
have actually tried to focus on the applications of the above module from the keras to resize the data and normalize to train
techniques and discussed their merits and demerits and future the generator properly. In our generator we have used a total
applications. An Introduction to Image Synthesis with of five layers, one is an input layer with 128 nodes, starting
Generative Adversarial Nets is proposed in [10]. This model is with three more dense layers 512, 1024 and 2048 nodes
working well for the simple dataset, for the complex dataset the respectively with each layer and lastly the output layer. We
model does not work well. have used the Leaky ReLU activation function for all the
layers except the output layer; in the output layer we have
Though there are many fake image generation models, used the tanh activation function for the output layer. We
what we have tried to do in our work is that we have tried to have also used the loss function as the binary cross-entropy
generate the images using low computational power and for our generator model. Our generator will receive feedback
without any external image classifier. We have used two data from the discriminator and based on the received
neural networks in our model. One is Generator and the other feedback our generator will be updated.
is Discriminator. Generator creates fake human faces and
Discriminator detects the faces generated by the generator if On the other hand, our discriminator is also
this is fake or real. If the face generated by the generator is implemented with the sequential model. However, the main
detected as fake then the discriminator gives feedback to the difference between our generators is that after each epoch it
generator. And based on the feedback of the discriminator, does not learn, meaning it will not update or train after
the generator improves itself and tries to generate better each epoch. Our discriminator’s main purpose is to identify
quality faces. This process goes on until the generator the real and fake image and give the feedback to the
creates better quality fake human faces. From detecting fake generator, so that we will use the sequential model. In our
news, fake images to data misclassification, fake human face discriminator’s input data we have used both the generator
generation helps us to be used in all of these areas. And produced data and the real image from the CelebA dataset
generative adversarial network model is one of the best one and it takes both images and tries to identify the real and the
to create better real life fake human faces. fake image. Here, the model uses a total of four layers. As an
input layer we have taken the generated data and the real
Rest of the paper is organized as follows. The proposed image data and there are also two hidden dense layers along
method is explained in Section III. In Section IV, the with an output layer which produce binary values. Other than
experimental results are presented. The paper is concluded in the output layer we have used the Leaky ReLU activation
Section V. function in our model and as our output will be classification
III. PROPOSED METHOD type, so in the output layer we have used the sigmoid
function. For the loss function in our model we have used
A. Methodology the binary cross-entropy function.
In our model we have tried to implement generative B. Overall Workflow
adversarial networks in a very classic way with new and latest
tools and technologies. We have tried to implement a In Fig. 1 the diagram we have shown the overall
generative adversarial network to generate fake human faces workflow of our proposed model, and later in this paper we
from random noise with low computational power and have also explained how our generator, discriminator and the
without any external image classifier, rather than removing all fully connected sequential model work [12] [13].
the noise and maximizing the stabilization which was the main C. Generator
challenge of the previous related works. We know that for
implementing generative adversarial network we have to set We have proposed two sequential models, one as a
a generator whose work will be to generate fake faces from generator and another one as a discriminator to implement the
the noise and update its own model after receiving the generative adversarial model. We have used random noise as
feedback from the discriminator and we also have to input data in the generator model. The input data is
implement a proper discriminator to identify the real and fake actually a layer which has 100 nodes. Then we have used
four hidden layers where we have used Leaky Relu as our
image, so that it give the right feedback, means it says true to
activation function. The hidden layers have 128, 256, 512,
real image and false to fake image and based on its feedback
1024 nodes respectively. We have used the Tanh activation
the generator will change its model in such a way that
function in our last layer. We have also used Batch
eventually it will create almost real like images.
Normalization to normalize the data. At last, we have
That’s how we are trying to implement our generative reshaped the nodes into (48, 48, 1) size. The Adam optimizer
adversarial network to generate fake human faces. Our has been used as our optimizer. During the compilation of
generator and discriminator will use the keras’s classic the model, binary cross-entropy has been used as our loss
sequential modeling. function. The generator will produce some fake human
faces and it will improve itself by the feedback from the
We proposed to use two sequential models, one as a discriminator. The flow diagram of the generator is presented
generator and another one as a discriminator to implement our at Fig. 2.
generative adversarial model. For implementing the generator,
161 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 13, No. 7, 2022
Fig. 3. Discriminator.
162 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 13, No. 7, 2022
163 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 13, No. 7, 2022
E. Loss Function
Here, in the Fig. 6, we can see the loss function of the
discriminator. We ran our models at about 100000 epochs. If
we see the graph we can see most of the loss value between 0
to 1, which is pretty good value for the discriminator. And as
the discriminator is an un-trainable model we see the loss
value maintains the same ranges between the whole 100000
epochs. Now we can see some spike in the loss value of our
graph. If we try to separate the high spike by trying again
and again to visualize the diagram without the high spike of
the loss value in our (48 x 48) size images, we can then
easily see our loss value is somewhere between 0 and 1.4.
And if we calculate the high spike, we can see there are 771
high spikes between 100000 epochs which is around 0.77%
high spike and other 99.23% are the average, means 0 to
1.4 ranges. This is pretty good value for our model.
164 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 13, No. 7, 2022
165 | P a g e
www.ijacsa.thesai.org