0% found this document useful (0 votes)
0 views

dl report

The document discusses machine learning and its applications, particularly in human face recognition using deep learning and convolutional neural networks (CNN). It outlines the importance of machine learning, types of algorithms, and the architecture of neural networks, emphasizing the iterative learning process and model training. The project details various experiments conducted to improve face recognition accuracy, highlighting challenges faced and the continuous evolution of deep learning technologies.

Uploaded by

mulemeera92
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

dl report

The document discusses machine learning and its applications, particularly in human face recognition using deep learning and convolutional neural networks (CNN). It outlines the importance of machine learning, types of algorithms, and the architecture of neural networks, emphasizing the iterative learning process and model training. The project details various experiments conducted to improve face recognition accuracy, highlighting challenges faced and the continuous evolution of deep learning technologies.

Uploaded by

mulemeera92
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Human Face Recognition

Chapter 1
Introduction

1.1 What Is Machine Learning ?


Machine learning (ML) is a discipline of artificial intelligence (AI) that provides
machines with the ability to automatically learn from data and past experiences
while identifying patterns to make predictions with minimal human intervention.

Machine learning methods enable computers to operate autonomously without


explicit programming. ML applications are fed with new data, and they can
independently learn, grow, develop, and adapt.

Machine learning derives insightful information from large volumes of data by


leveraging algorithms to identify patterns and learn in an iterative process. ML
algorithms use computation methods to learn directly from data instead of relying
on any predetermined equation that may serve as a model.

The performance of ML algorithms adaptively improves with an increase in the


number of available samples during the ‘learning’ processes. For example, deep
learning is a sub-domain of machine learning that trains computers to imitate
natural human traits like learning from examples. It offers better performance
parameters than conventional ML algorithms.

While machine learning is not a new concept – dating back to World War II
when the Enigma Machine was used – the ability to apply complex mathematical
calculations automatically to growing volumes and varieties of available data is a
relatively recent development.

RGCOE, Department Of Computer Engineering 1


Human Face Recognition

1.2 How does machine learning works ?


Machine learning algorithms are molded on a training dataset to create a model.
As new input data is introduced to the trained ML algorithm, it uses the
developed model to make a prediction.

1.3 Why is Machine learning important ?


Machine learning is important because it gives companies and enterprises
a view of trends in customer behavior and business operational patterns,
as well as supports the development of new products. Many of today's
leading companies, such as Facebook, Google and Uber, make machine
learning the center part of their operations. It has become a significant
competitive differentiator for many companies.

RGCOE, Department Of Computer Engineering 2


Human Face Recognition

1.4 Types of machine learning ?


Machine learning algorithms can be trained in many ways, with each method
having its pros and cons. Based on these methods and ways of learning, machine
learning is broadly categorized into four main types:

1.5 Real-world machine learning use cases

Here are just examples of machine learning you might encounter every day:

Speech recognition: It is also known as automatic speech recognition (ASR),


computer speech recognition, or speech-to-text, and it is a capability which uses
natural language processing (NLP) to process human speech into a written
format. Many mobile devices incorporate speech recognition into their systems
to conduct voice search

Customer service: Online chatbots are replacing human agents along the
customer journey. They answer frequently asked questions (FAQs) around topics,
like shipping, or provide personalized advice, cross- selling products or
suggesting sizes for users, changing the way we think about customer engagement
across websites and social media platforms.

Computer vision: This AI technology enables computers and systems to


derive meaningful information from digital images, videos and other visual
inputs, and based on those inputs, it can take action. This ability to provide
recommendations distinguishes it from image recognition tasks. Powered by
convolutional neural networks, computer vision has applications within photo
tagging in social media, radiology imaging in healthcare, and self-driving cars
within the automotive industry.
Recommendation engines: Using past consumption behavior data, AI
algorithms can help to discover data trends that can be used to develop more
effective cross-selling strategies. This is used to make relevant add-on
recommendations to customers during the checkout process for online retailers.

RGCOE, Department Of Computer Engineering 3


Human Face Recognition

Chapter 2

Neural Network and Deep Learning

2.1 Neural Networks


A neural network is a series of algorithms that attempt to recognize underlying
relationships in a set of data through a process that imitate the way the human
brain operates. In this sense, neural networks refer to systems of neurons,
either organic or artificial in nature.
For example, when human faces some sort of unexpected event, the human eye
detects the object and sends signals to the brain, then it responds based on the
intensity of the signal. These signals is transferred to the brain via something
called neurons. The neurons take the signal and pass it by to the next neuron
until it reaches the brain.
Neural networks can adapt to changing input; so the network produce the best
possible result without needing to redesign the output criteria.

2.1.1 Why are nural network important ?

Neural networks can help computers make intelligent decisions with limited
human assistance. This is because they can learn and model the relationships
between input and output data that are nonlinear and complex. For instance,
they can do the following tasks.

RGCOE, Department Of Computer Engineering 4


Human Face Recognition

2.2 Traditional Neural Networks


2.2.1 Warren Mcculloch
In the 1943 paper McCulloch and Pitts attempted to demonstrate that a Turing
machine program could be implemented in a finite network of formal neurons
(in the event, the Turing Machine contains their model of the brain), that the
neuron was the base logic unit of the brain.
In the 1947 paper they offered approaches to designing "nervous nets" to
recognize visual inputs despite changes in orientation or size.
From 1952 McCulloch worked at the Research Laboratory of Electronics at MIT,
working primarily on neural network modelling. His team examined the visual
system of the frog in consideration of McCulloch's 1947 paper, discovering that
the eye provides the brain with information that is already, to a degree, organized
and interpreted, instead of simply transmitting an image.

2.2.2 Perceptron

Perceptron was introduced by Frank Rosenblatt in 1957. He proposed a


Perceptron learning rule based on the original MCP neuron. A Perceptron is an
algorithm for supervised learning of binary classifiers. This algorithm enables
neurons to learn and processes elements in the training set one at a time.

2.2.3 Artificial Neural Nerwork ?


The term "Artificial Neural Network" is derived from Biological neural networks
develop the structure of a human brain. Similar to the human brain that has neurons
interconnected to one another, artificial neural networks also have neurons that are
interconnected to one another in various layers of the networks. These neurons are
known as nodes.

RGCOE, Department Of Computer Engineering 5


Human Face Recognition

2.2.4 Backpropogation

Backpropagation is the essence of neural network training. It is the method of


refining the weights of a neural network based on the error rate obtained in the
previous approaches (i.e., iteration).

Proper tuning of the weights allows you to reduce error rates and make the model
reliable by increasing its generalization.

Backpropagation in neural network is a short form for “backward propagation of


errors.” It is a standard method of training artificial neural networks. This
method helps calculate the mean of a loss function with respect to all the weights
in the network.

2.3 Deep Learning

Deep learning is a subset of machine learning, which is essentially a neural


network with three or more layers.
These neural networks attempt to simulate the behavior of the human brain—
albeit far from matching its ability—allowing it to “learn” from large amounts of
data.
While a neural network with a single layer can still make approximate predictions,
additional hidden layers can help to optimize and refine for accuracy.
Deep learning drives many artificial intelligence (AI) applications and services
that improve automation, performing analytical and physical tasks without
human intervention.
Deep learning technology lies behind everyday products and services (such as
digital assistants, voice-enabled TV remotes, and credit card fraud detection) as
well as emerging technologies (such as self-driving cars).

2.4 CNN

CNN deals with larger images better than other neural networks where it takes
the image as an input and applies filter on image to reduce the size of the
image; by detecting the most important (unique) features of the image. It keeps
doing the same thing until it gets all the unique features. The filter size is
usually a 3x3 matrix (can be bigger).

RGCOE, Department Of Computer Engineering 6


Human Face Recognition

Chapter 3
Human Face Recognition by using CNN

3.1 Dataset

Our dataset consists of 153 classes, each class contains 20 images with the same
background but from a different angle with a different facial reaction.

3.2 Preprocessing

Image enhancement was made to the images to improve the quality of data and
information obtained from them to be able to extract more features.
Some of the techniques used are image augmentation, rescaling and resizing.

3.3 Here is how the procedure work:

Make sure your data is arranged into a format acceptable for train test split. In
scikit-learn, this consists of separating your full dataset into Features and Target.

Split the dataset into two pieces: a training set and a testing set. This consists of
randomly selecting about 75% (you can vary this) of the rows and putting them
into your training set and putting the remaining 25% to your test set. Note that the
colors in “Features” and “Target” indicate where their data will go (“X_train”,
“X_test”, “y_train”, “y_test”) for a particular train test split.

Train the model on the training set. This is “X_train” and “y_train” in the image.

Test the model on the testing set (“X_test” and “y_test” in the image) and
evaluate the performance.

RGCOE, Department Of Computer Engineering 7


Human Face Recognition

Chapter 4

Architecture Model

4.1 Architecture Model

We initially built some models but they weren't able to give us the required
accuracy, for example:

This model was designed using 1 block, and started with 32 filters with activation
function ‘relu’ and ‘softmax.

After many trials and modifications, we were able to come up with the best
model

Best Architecture Model:


This model was designed using 3 blocks, and started with 32 filters for the first
block, 64 for the second block and 64 for the third block with stride (2,2) for
each block and activation function ‘relu’ and ‘softmax.

RGCOE, Department Of Computer Engineering 8


Human Face Recognition

4.2 Experiment 1

Dataset:
First a simple database that contains 113 person is used, each person has 20
images with different positions. The images are divided into two folders; train
and test.
A simple function was implemented to create train and test folders and inside
each folder a folder for each person.
Another function was implemented to divide the images for each person
randomly with 75% of them in the train folder and the rest in the test folder
automatically.

Preprocessing:
We used the image data generator to perform some augmentations.
Each person is categorized into a class with target size = 256 x 256 and batch
size = 10.
We pushed the images into a NumPy array to make it easier to deal with the
values obtained from the images when dealing with the prediction method.
Train test split is a model validation procedure that allows you to
simulate how a model would perform on new/unseen data.

Results:
1)

Class (86) Accuracy 80%


2)

Class (112) Accuracy 100%

RGCOE, Department Of Computer Engineering 9


Human Face Recognition

4.3 Experiment 2
Dataset:
First a simple database that contains 113 person is used, each person has 20
images with different positions. The images are divided into two folders; train
and test.
A simple function was implemented to create train and test folders and inside
each folder a folder for each person.
Another function was implemented to divide the images for each person
randomly with 50% of them in the train folder and the rest in the test folder
automatically.

Preprocessing:
We used the image data generator to perform some augmentations.
Each person is categorized into a class with target size = 256 x 256 and batch
size = 10.
We pushed the images into a NumPy array to make it easier to deal with the
values obtained from the images when dealing with the prediction method.
Train test split is a model validation procedure that allows you to
simulate how a model would perform on new/unseen data.

Results:
1)

Class (108) Accuracy 80%

RGCOE, Department Of Computer Engineering 10


Human Face Recognition

2)

Class (96) Accuracy 100%

4.4 Experiment 3
Dataset:
First a simple database that contains 113 person is used, each person has 20
images with different positions. The images are divided into two folders; train
and test.
A simple function was implemented to create train and test folders and inside
each folder a folder for each person.
Another function was implemented to divide the images for each person
randomly with 25% of them in the train folder and the rest in the test folder
automatically.
Preprocessing:
We used the image data generator to perform some augmentations.
Each person is categorized into a class with target size = 256 x 256 and batch
size = 10.
We pushed the images into a NumPy array to make it easier to deal with the
values obtained from the images when dealing with the prediction method.
Train test split is a model validation procedure that allows you to
simulate how a model would perform on new/unseen data.

RGCOE, Department Of Computer Engineering 11


Human Face Recognition

Results:
1)

Class (60) Accuracy 86.67%

4.5 Experiment 4
Dataset:
First a simple database that contains 132 person is used, each person has 20
images with different positions. The images are divided into two folders; train
and test.
A simple function was implemented to create train and test folders and inside
each folder a folder for each person.
Another function was implemented to divide the images for each person
randomly with 75% of them in the train folder and the rest in the test folder
automatically.

Preprocessing:
We used the image data generator to perform some augmentations.

RGCOE, Department Of Computer Engineering 12


Human Face Recognition

Each person is categorized into a class with target size = 256 x 256 and batch
size = 10.
We pushed the images into a NumPy array to make it easier to deal with the
values obtained from the images when dealing with the prediction method.

Results:
1)

Class (43) Accuracy 80%


2)

Class (10) Accuracy 100%

RGCOE, Department Of Computer Engineering 13


Human Face Recognition

Chapter 5

5.1 Problems faced throughout the project:


1. Installing the required libraries with the version needed for our system
2. Kernel dead: when we used a version other than python version 3.6
3. Overfitting: We solved this problem by adding strides to our model
4. GPU: Anaconda wasn’t reading the GPU at some of our laptops

5.2 Summary

To conclude, our project is face recognition with deep learning. For our model,
we have constructed an architecture and trained our dataset with it with
different ‘train’ and ‘test’ percentages until we got the best results possible.

From our experience with this project for this academic year, we have figured
that deep learning is a technology going through continuous updates and
upgrades. During our research in papers and articles, for our model, we have
looked to find what architecture fits the best with a certain case. No architecture
is agreed upon to be the “best” for specific case. What happens is that
developers experience new techniques and try several methods to reach to the
best result with the resources available between their hands. And this is what
we have tried to do.

Yet, this results in the next conclusion which is no model can reach a 100%
accuracy. For this to happen, the dataset entered should cover every single side
of what the model should understand and know. This is hard, especially that we
have only worked with Anaconda, our personal computers, and lab’s computer
provided by the university. The resources should be very high to handle both the
storage and the processing of the models. However, even if these resources are
available and such dataset exists, no model will reach perfection in its
predictions but it will get faster result and very close to great predictions.

RGCOE, Department Of Computer Engineering 14


Human Face Recognition

Chapter 6
Future Scopes

6.1 Future Scopes

There are some ideas that we want to implement in the future, for example, we
want to make our system able to identify a companion to an image even if the
image is incomplete, and for the model to be able to identify the owner of the
image even if one of the features is hidden such as the mouth, eyes, and so on.
So we want to make some adjustments so that we can get the desired results
with the right accuracy.
We can then use this model for some applications on the ground such as
criminal investigation systems.

RGCOE, Department Of Computer Engineering 15


Human Face Recognition

Chapter 7
Conclusion
7.1 Conclusion

The mini project "Human Face Recognition" has been a significant step in exploring the
dynamic and evolving field of computer vision and artificial intelligence. The primary
objective of this project was to design and implement a system capable of accurately
identifying or verifying a human face from an image or video frame, leveraging modern
machine learning techniques and facial feature extraction methods.

Throughout the course of this project, we delved into several core concepts of face recognition,
including image acquisition, preprocessing, facial feature detection, feature extraction, and
classification. We utilized powerful tools and libraries such as OpenCV, NumPy, and possibly
deep learning frameworks like TensorFlow or PyTorch (if applicable), which made the
development process efficient and effective. The implementation focused on using algorithms
that analyze the spatial geometry of facial landmarks, such as the eyes, nose, lips, and jawline,
to create a unique facial signature for each individual.

One of the key outcomes of this project was the realization of how complex and sensitive face
recognition systems are. Factors such as lighting conditions, facial expressions, occlusions (like
glasses or masks), and camera angles can significantly affect recognition accuracy. Despite
these challenges, our system was able to achieve satisfactory results by incorporating
preprocessing techniques like grayscale conversion, histogram equalization, and face
alignment.

The practical applications of face recognition systems are vast and impactful, ranging from
security and surveillance to authentication in mobile devices and attendance systems. Through
this project, we not only gained technical knowledge but also understood the ethical
considerations surrounding face recognition, including concerns about privacy, consent, and
potential misuse.

In conclusion, the Human Face Recognition mini project provided a comprehensive learning
experience in both the theoretical and practical aspects of artificial intelligence and computer
vision. It demonstrated how intelligent systems can mimic human abilities to recognize faces
and opened doors to future explorations in deep learning-based recognition, 3D face analysis,
and real-time video processing. This project lays a strong foundation for further research and
development in biometric systems and intelligent human-computer interactions.

RGCOE, Department Of Computer Engineering 16


Human Face Recognition

Chapter 8
References

1) Practical Machine Learning and Image Processing - Himanshu Singh


2) https://www.sciencedirect.com/topics/engineering/image- processing
3) https://www.stackvidhya.com/plot-confusion-matrix-in-python- and-why/
4) https://www.analyticsvidhya.com/blog/2020/04/confusion-matrix- machine-
learning
5) https://pdfcoffee.com/face-recognition-project-report-pdf- free.html
6) https://iq.opengenus.org/techniques-for-face-recognition/
7) https://www.kaspersky.com/resource-center/definitions/what-is- facial-
recognition
8) https://www.researchgate.net/publication/303326261_Machine_L
earning_Project
9) https://www.asquero.com/article/advantages-and-disadvantages- of-artificial-
neural-networks/
10) https://www.spiceworks.com/tech/artificial-
intelligence/articles/what-is-ml/
11) https://www.asquero.com/article/advantages-and-
disadvantages-of-different- types-of-
machine- learning-algorithms/
12) https://aws.amazon.com/what-is/neural-network/
13) https://www.javatpoint.com/perceptron-in-machine-learning
14) https://www.javatpoint.com/artificial-neural-network
15) https://www.watelectronics.com/back-propagation-neural- network/
16) https://towardsdatascience.com/convolutional-neural- networks-explained-
9cc5188c4939

RGCOE, Department Of Computer Engineering 17

You might also like