Face Recognition System Complete Documentation
🕒 2025-04-27 10:13:59.206333This is the finalized report on the Face Recognition System project. I have started from the Abstract to the final chapter. I have written this post so that it will be easy for you to understand how to write documentation on any project.
Table of Content
Chapter 2: Requirement Analysis and Feasibility Analysis
2.4 Structuring System Requirements
Chapter 3: Design of Face Recognition System
Chapter 4: Implementation and Testing
Chapter 5: Conclusion and Future Work
Abstract
Recognizing faces is the easiest way to distinguish the individual identity of each person. Mainly, the human face recognition system has two phases- one is to detect faces and another is to recognize faces. Detection of face means to identify if the images contain any face or not and recognition of face means to remember the name of the detecting face. For this, CNN (Convolutional Neural Network) plays a significant role. There are a lot of neural network libraries like TFlearn and Keras. This project uses TensorFlow and TFlearn. Also, this report is about how to extract audio using gtts (Google Text to Speech). This library saves what we want to record (e.g. authorized person names). The area of this project's face recognition system is Image processing.
Keywords: Face Recognition System, OpenCV, CNN, TensorFlow, TFlearn, Tkinter, gtts
List of Figures:
Figure 1.1: Steps of face recognition system applications
Figure 2.4.1: ER Diagram of Face Recognition System
Figure 2.4.2(a): Data flow diagram (level 0)
Figure 2.4.2(b): Data Flow Diagram (level 1)
Figure 3: System architecture for Face Recognition
Figure 3.1: Face Recognition Approach
Figure 3.1.2: The framework of face detection process
Figure 3.1.3(a): The framework of face recognition system
Figure 3.1.3(b): Multi-layer network structure
Figure 3.1.3(c): Activation functions used in neural network
List of ABBREVIATIONS:
CNN Convolutional Neural Network
CV Computer Vision
GUI Graphical User Interface
IDE Integrated Development Environment
ReLU Rectified Linear Unit
RGB Red, Green, Blue
Chapter 1: Introduction
1.1. Background
Object detection is the technique of detecting real-world object instances in photos or videos, such as vehicles, televisions, and persons. It allows for the detection, recognition, and localization of objects in an image.
Face Recognition is the process of determining whether a previously detected object is a known or unknown face. Two major libraries used for this project are TensorFlow and TFlearn. The main aim of this project is to predict the images with their name.
For any face recognition project, generating a dataset is very important. So, for this, the OpenCV library comes into existence. OpenCV is a free and open-source software library for computer vision and machine learning. To detect and recognize faces may not be as accurate as using deep learning.
Facial recognition systems are based on computer programs that examine pictures of human faces in order to identify them. The applications take a picture of the face and measure things like the distance between our eyes, the length of the nose, and the angle of our jaw, and create a unique file using that file, it then compares the image with another image and produces a score that measures how similar the images are to each other.
1.2. Problem Statement
There might have been a number of situations where it is necessary to recognize faces or simply detect faces. The traditional lock/unlock methods are quite inefficient. There may be a possibility of losing keys or breaching codes/passwords. So, we propose a face recognition system that can be able to recognize faces with the maximum accuracy possible.
1.3. Objectives
The following are the system's objectives:
- Detect faces.
- Match detected faces to the images previously captured and recognize them.
- Provides accurate information about them (e.g. their names).
1.4. Future scope
- Our current recognition system acquires images from files located in a folder and from the webcam. It is possible to add scanner support for more flexibility.
- Currently, our system fails under vastly varying conditions which we can solve in the future.
1.5. Limitation
- Insufficient lighting, sunglasses, long hair, low-resolution pictures, or any other object that partially blocks the subject's face will cause the face recognition system to malfunction.
- This system can’t tell the difference between identical twins.
Chapter 2: Requirement Analysis and Feasibility Analysis
2.1. Literature review
The history of face recognition technology unfolds chronologically, beginning with semi-automated systems in the 1960s. In 1973, Kenade developed fully automated face recognition, extracting 16 facial features for identification. Eigenfaces, introduced by Sirovich and Kirby in 1986, utilized Principal Component Analysis to reconstruct images from lower dimensions.
Turk and Pentland expanded on Eigenfaces in 1991, enabling face detection within images. DARPA and NIST launched the FERET program in the 1990s, aiming to stimulate commercial face recognition. Facebook introduced face recognition in 2010, despite initial privacy concerns. Techniques continued to evolve, with advancements in criminal identification and Viola-Jones face detection.
In 2012, Uttam Mande explored criminal identification through facial evidence. A paper in 2014 analyzed the Viola-Jones technique, proposing post-processing for improved efficiency. Indian students introduced a speed-enhancing technique in 2018.
Overall, face recognition technology has garnered increasing interest for its natural, nonintrusive, and versatile applications.
2.2. Requirement analysis
Requirement analysis is a process of carefully identifying, specifying, and documenting the numerous requirements that are relevant to a certain business purpose. Requirements gathering helps in clearly understanding the needs of the customer, defining the scope of the project, and the resources required to complete it. This project's functional, non-functional, and technological needs are as follows:
2.2.1. Functional requirements:
The functional requirement refers to "any requirement which specifies what the system should do". The following is a list of the project's functional requirements:
- It should support images in the 'PNG' and 'JPEG' formats.
- It should generate the dataset properly.
- It should be able to anticipate authorized users with high accuracy.
2.2.2. Non-functional requirements:
The non-functional requirement refers to “any requirement that specifies how the system performs a certain function”. They are the characteristics or attributes of the system that can judge its operation. The following is a list of the project's non functional requirements:
- The system's graphical user interface (GUI) will be user-friendly.
- The system will be flexible to changes, e.g. at any time, we should be able to add authorized users.
- The efficiency and effectiveness of the system is important.
2.2.3. Technical requirements:
The following are the technical criteria for this project:
a. Hardware Requirements:
- camera integrated system
b. Software Requirements:
- Windows operating system
- TensorFlow version 1.14
- OpenCV
2.3. Feasibility study
A feasibility study examines the likelihood of a project's success. It also serves as a solid foundation for developing our business plan. This study includes the following three factors:
2.3.1. Technical feasibility
Technical feasibility defines the feasibility that is concerned with specifying equipment and software that will successfully satisfy the user requirement. For this project, the software and hardware required for the development of this system are already available as free as open source, so this project is technically feasible.
2.3.2. Economic feasibility
Economic feasibility means whether a business or a project is feasible cost-wise or logistically. For this project, we download all the requirements from the Internet without any associated charges, making this system economically feasible.
2.3.3. Operational feasibility
Operational feasibility is a measure of how well a new system under consideration will work in solving problems. In this project, the system solves the problem of losing keys or breaching codes/passwords as mentioned in the problem statement, so this project is also operationally feasible.
2.4. Structuring System Requirements
2.4.1. Data modeling
2.4.2. Process modeling
Chapter 3: Design of Face Recognition System
This system is mainly based on face detection and face recognition. Among the many possible approaches, we have decided to use the Haar-Like features algorithm for the face detection part and the neural network approach for the face recognition part.
When the user opens the GUI, there is a button to capture images where the user captures images from the camera. After capturing the image, we preprocess it, detect faces, perform recognition, and then display the result to the user.
3.1. Face Recognition Approach
The figure below illustrates the approach of the face recognition system:
3.1.1 Input part
The input section of the facial recognition system is crucial. Here, the image acquisition procedure takes place, converting real-time images into digital data for processing. The captured images undergo processing through a face detection algorithm.
3.1.2 Face Detection Part
Face detection is the process of identifying human faces in an image. Below is the process of face detection:
3.1.3 Face Recognition Part
Face recognition is a process of recognizing the name of a detected face. Below is the process of face recognition:
This report introduces a new face recognition approach in which local features are fed into a neural network.
The activation functions decide which signal to pass to the next neuron. Common activation functions are Linear, Sigmoid, SoftMax, and ReLU functions.
3.1.4 Output part
This part is the final step of the face recognition system. The face recognition system determines the person's name by utilizing the output vector of the neural network.
Chapter 4: Implementation and Testing
4.1. Implementation
The implementation phase entails putting the project strategy into practice. This phase begins once the majority of the code for the program is written. It involves translating the requirements specified in the requirement phase into a logical structure that can be implemented in a programming language. We can write code in Jupyter Notebook as an integrated development environment (IDE). This emulator aided in the implementation of the project in an authentic environment.
4.1.1 Tools used
1. Camera-integrated system
We can use either internal or external cameras for this project.
2. Jupyter notebook
We used Jupyter Notebook as an integrated development environment (IDE). It is very easy to use and also flexible because as its name suggests, we can write notes and execute code in the same IDE. We can also use other IDs like sublime text, PyCharm, and so on.
4.1.2 Libraries used
1. OpenCV
OpenCV is an open-source computer vision and machine learning free software library. This library contains over 2,500 efficient algorithms for detecting and recognizing faces as well as generating datasets.
2. TensorFlow:
TensorFlow is Google’s Open Source Machine Learning Framework for dataflow programming across a range of tasks. We can use TensorFlow with TFlearn to train the model and to make predictions.
3. TFlearn
TFlearn is a Python modular library developed on top of TensorFlow. It is a deep-learning library. We can use either Keras or TFlearn as a TensorFlow framework.
4.1.3 Data Collection
Here, we can collect the data in the form of Images. For data collection, we used Python openCV. It combines the best qualities of OpenCV, C++, API, and Python language. OpenCV provides a wide range of computer vision and machine learning methods. We utilize the haarcascade_frontalface_default.xml file to detect frontal faces, crop them to a specific size, and save them in a folder. We can used cropped images for training the model later on.
Detection = cv2.CascadeClassifier(“haarcascade_frontalface_default.xml”)
4.1.4 CNN Recognition Algorithm
CNNs are a sort of multi-layer feed-forward neural network. CNNs are made up of filters, kernels, or neurons with learnable weights, parameters, and biases. Each filter takes certain inputs, does convolution, and then optionally adds non-linearity. CNN has Convolutional, Pooling, Rectified Linear Units (ReLU), and Fully Connected Layers.
a. We first resized the input image and then passed it to the different conv layers and the pooling layers.
b. We have used a 5x5 filter and the number of filters used can differ from layer to layer of convolution.
c. Finally, we get a flattened image which is used later on to recognize the face.
4.2. Testing
Software testing is the practice of evaluating a software product to find inconsistencies between the input that has been provided and the desired result. We generally perform two software tests. They are:
4.2.1 Integration testing
In integration testing, various modules have been combined and tested as a group. The integration testing of the app has been done by dividing the project into two modules. The first module includes a GUI interface working. We check whether the GUI is able to capture the image or not as well as whether it has a proper linkup with the ML model or not. The second module includes whether the ML model is properly trained or not and whether it is able to give output with the best possible accuracy.
4.2.2 System testing
Finally, we conducted testing on a complete integrated system and we verified that our whole system is working correctly and is ready to deploy.
Chapter 5: Conclusion and Future Work
5.1. Conclusion:
Face recognition systems recognize the faces of authorized users very easily. Those persons who want to use the Face recognition system don’t have to know how to make the system but it is sufficient to know how to use it only.
The main steps of this project are concluded below:
1: Create a database of authorized users
2: Train the model with that dataset
3: Calculate the precision (accuracy)
4: Predict faces using that trained model
5: Represent the project in GUI and also can be able to listen to the names of authorized users.
All the above-mentioned steps are accomplished successfully. It met our initial aims and objectives and as mentioned in the limitation, we are working to deal with this too.
5.2. Future work:
Still, few faces are there which are really tough to distinguish, for example, twin siblings. Building a system that can distinguish between the two look-alikes can be a challenge. Moreover, we want our system to recognize someone, even though there is only one picture of that person on file, and it was taken at a different angle, in different lighting, or they were wearing sunglasses like a human being. Maybe in the near future, we can imagine our system to identify more challenging images.
Thus, this face recognition system can be preserved for future use. The dataset can be updated in time to maintain the accuracy. With the help of GUI, it doesn’t take too much time to update the dataset.
Comments
Loading comments...
Leave a Comment