dl report
dl report
Chapter 1
Introduction
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.
Here are just examples of machine learning you might encounter every day:
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.
Chapter 2
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.
2.2.2 Perceptron
2.2.4 Backpropogation
Proper tuning of the weights allows you to reduce error rates and make the model
reliable by increasing its generalization.
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).
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.
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.
Chapter 4
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
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)
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)
2)
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.
Results:
1)
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.
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)
Chapter 5
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.
Chapter 6
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.
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.
Chapter 8
References