Professional Documents
Culture Documents
0 Introduction
1.1 Background Introduction
The current method that institutions uses is the faculty passes an attendance sheet or make
roll calls and mark the attendance of the students, which sometimes disturbs the discipline of the
class and this sheet further goes to the admin department, which is then updated to an excel
sheet. This process is quite hectic and time-consuming. Also, for professors or employees at
institutes or organizations, the biometric system serves one at a time. So, why not shift t o an
automated attendance system which works on face recognition technique? Be it a classroom or
entry gates it will mark the attendance of the students, professors, employees, etc.
¬ There is always a chance of forgery (one person signing the presence of the other
one) Since these are manually so there is a great risk of error.
¬ The ability to compute the attendance percentage becomes a major task as manual
computation produces errors, and also wastes a lot of time.
¬ This method could easily allow for impersonation and the attendance sheet could
be stolen or lost.
1.5 Motivation
The main motivation for this project was the slow and inefficient traditional manual attendance
system. So, why not make it automated fast and much efficiently. Also, such face detection
techniques are in use by the department of a criminal investigation where the usage of CCTV
footages and detecting the faces from the crime scene and comparing them with criminal
database to recognize them. It is also becoming as a feature of daily life in China, where
authorities are using it on the streets, in subway stations, and at airports.
Face recognition is such a challenging yet interesting problem that it has attracted researchers
from different backgrounds. It is due to this fact that the literature on face recognition is vast and
diverse. The earliest work on face recognition can be traced back at least to the 1950s
additionally; the research on automatic machine recognition of faces really started in the 1970s,
but a fully automatic face recognition system based on a neural network was reported back in
1997.
The aim of all the researches was to make face recognition as automated and accurate as
possible through various types of inputs such as static images, video clips, etc. so as to increase
its applications in real world. Computational methods of face recognition need to address
numerous challenges. These type of difficulties appear because faces are need to be represented
in such a way that best utilizes the available face information to define a specific face from all
the other faces in the database. Also, extracting such detailed facial features can be used in
slandering the search and enhancing recognition.
It’s evident that after more than 30 years of research and development, basic 2D face
recognition and other image processing applications have reached a mature level and many
commercial systems are available for various applications. Some of the major reasons for this
success are faster computers, algorithmic improvements, access to large amounts of research
tools and datasets, advances in machine learning and perception, the increase in affordable
neural networks and now the data-hungry deep learning methods; which have started to
dominate accuracy benchmarks around 2011. Various surveys also present factual data
indicating that error rates in image processing tasks have fallen significantly since 2012 and are
expected to for fall further in near future.
1. Student Registration
2. Face Detection
3. Face Recognition
- Feature Extraction
- Feature Classification
¬ It will detect the faces via wireless camera (IP camera)/webcam and then recognize the
faces.
¬ After recognition, it will mark the attendance of the recognized student and update the
attendance record.
4.0 Methodology
Research Methodology
What Is Research?
Research is a logical and systematic search for new and useful information on a particular
topic. It is an investigation of finding solutions or problems of scientific and social platforms
through objective and systematic analysis. The information might be collected from different
sources like experiences, books, journals, nature, etc.
A research can lead to new contributions to the existing knowledge. Research is done
with the help of study, experiment, observation, analysis, comparison and reasoning. Research is
in fact ubiquitous. For example, we know that cigarette smoking is injurious to health; heroine is
Department of Computer Application , The M.S. University , Vadodara 7
addictive; cow dung is a useful source of biogas, etc. We became aware of all these information
only through research. More precisely, it seeks predictions of events, explanations, relationships
and theories for them.
Research methods:
Refers to various procedures and schemes researches use in performing research operations.
Research methodology
2. To analyse an event or process or phenomenon to identify the cause and effect relationship
3. To develop new scientific tools, concepts and theories to understand scientific and non-
scientific problems
¬ Selection of topic
¬ Definition of problem
¬ Actual investigation
¬ Data analysis
¬ Interpretation of result
¬ Report
Asistencia is face recognition, attendance biometric system which enrols the unique and
permanent facial fine points of people and records them in the database as stencils. Once the
enrolment process is complete, a look at the camera is required to verify the identity and the face
recognition attendance system automatically marks the attendance.
¬ Uses live face recognition to recognize each individual and mark their attendance
automatically.
6.1 Objectives
- Detection of unique face image amidst the other natural component such as walls and other
backgrounds.
6.2 Goals
- To help the lecturers, improve and organize the process of tracking and managing student
attendance.
- Reduce manual process errors by providing automated and a reliable attendance system.
- Increase privacy and security which, student cannot present him or his friend while they are
not.
6.3 Strategies
1. Recruited the Right Resources:
Recruited talent with the right skills and relevant experience as it is vital to ensure the
project’s success. We allocated the right work to the appropriate person. Si milarly,
invested in tools that enhances efficiency and increases the team’s productivity. The latest
PCs, appropriate updated hardware, development and testing software and platforms, as
5. Defined Requirements:
Effective requirement gathered, formed the basis of aligning the finished product with the
business objectives. Defined primary, derived and implicit requirements, both functional
and non-functional. Functionality was captured via the data-flow scenarios. Performance,
fault tolerance, system, design and architectural requirements was well-addressed.
6. Defined System Architecture:
Ensured that the suitable architecture is selected, keeping in mind the requirements as well
as the limitations and constraints, if any. Best practices such as identifying the threats and
anti-patterns in the system proved out to be very helpful.
7. Optimized Design:
10. Real-Time Face Detection with IP Camera ( gray-scaled face images ) 27/02/18 – 28/02/18
11. Database Storage 03/03/18 –
(a) MySQL 08/03/2018
(b) SQLite
16. Formation of Neural Network ( creating neurons for layers ) 19/03/18 – 20/03/18
¬ Software Components
PyCharm
Microsoft Excel
¬ Hardware Components
IP camera/Web Camera
Computer
Technologies
Department of Computer Application , The M.S. University , Vadodara 17
¬ Python
¬ Kivy
¬ PyCharm libraries
Pandas: A Python package which provides fast, flexible and expressive data
structures and data analysis tools designed to make working with various types of
data both easily and intuitively.
Pickle: Pickle Module is used for serializing and de-serializing a Python object
structure by pickling being the way to convert it into a character stream for it to be
saved on disk.
Sklearn: Scikit-learn is a very powerful Python library for machine learning &
predictive modeling.
NumPy : A library for the Python programming language, adding support for
large, multi-dimensional arrays and matrices, along with a large collection of
high-level mathematical functions to operate with.
Sip: A tool that has the ability to take existing libraries, written in C or C++ and
making them available as Python extension modules.
Matplotlib: A plotting library for the Python programming language and its
numerical mathematics extension NumPy.
Random: The random module is another library of functions that can extend the
basic features of python.
Tensorflow: A Python library for fast numerical computing created and released
by Google. It is a foundation library that can be used to create Neural Network
and Deep Learning models directly or by using wrapper libraries that simplify the
process built on top of Tensorflow.
Os: The module provides a portable way of using operating system dependent
functionality.
Six: It provides utility functions for smoothing over the differences between
the Python versions with the goal of writing Python code that is compatible on
both Python versions.
I. Technical Requirement
i. Hardware Requirements
System functional requirement describes activities and services that must provide.
¬ The administrator or the person who will be given the access to the system must
login into the system before using it.
Non-functional Requirements are characteristics or attributes of the system that can judge
its operation. The following points clarify them:
a. Accuracy and Precision: the system should perform its process with accuracy
and precision to avoid problems.
b. Flexibility: the system should be easy to modify, any wrong should be correct.
¬ The data that will be shown to the users will be made sure that it is correct and is
available for the time being. The system will be flexible to changes.
¬ The system will be extended for changes and to the latest technologies.
¬ He/ She needs to sit properly and capture 10-15 images of himself/herself in
different directions and expressions.
¬ At the time of taking attendance, students need to sit properly facing the camera.
¬ The faculty needs to log into the system at the time of attendance.
¬ The faculty needs to enter lecture details before starting the attendance process.
¬ If the entered lecture details don’t match with the ones in the database (excel
sheet) an error dialog will be displayed.
¬ The administrator needs to log into the system at the time of registering the
students in the face recognition process.
¬ He / She must make sure that the student enters the details properly.
¬ Only the administrator has the rights to manage any changes in the system.
¬ Only the administrator is allowed to view the Training set and the Testing set.
¬ Only the administrator has the rights to manage any changes in the stored data set.
Classifier file
Extraction of facial features for comparison is created based on the stored
Department of Computer Application , The M.S. University , Vadodara 24
from training set and test image for face recognition information
The extracted facial features and the student’s folder name are stored in separate files
Figure 2 Feature Extraction
CNN is a class of deep, feed-forward artificial neural networks that has successfully been
applied to analysing visual imagery. CNNs have wide applications in image and video
recognition, recommender systems and natural language processing.
Like other neural networks, CNN are made up of neurons with learnable weights and
biases. Each neuron receives several inputs, takes a weighted sum over them, pass it through
an activation function and responds with an output. The whole network has a loss function
and all the tips and tricks developed for neural networks still apply on CNNs.
Unlike neural networks, where the input is a vector, here the input is a multi-channelled
image (3 channelled in this case).
What is a Convolution?
We take the 5*5*3 filter and slide it over the complete image and along the way take the dot
product between the filter and chunks of the input image.
The convolution layer is the main building block of a convolutional neural network. Below is an
example of Convolution layer.
The convolution layer comprises of a set of independent filters (6 in the example shown).
Each filter is independently convolved with the image and we end up with 6 feature maps of
shape 28*28*1.CNNs have a couple of concepts called parameter sharing and local connectivity.
Parameter sharing is sharing of weights by all neurons in a particular feature map.
Local connectivity is the concept of each neural connected only to a subset of the input image
(unlike a neural network where all the neurons are fully connected). This helps to reduce the
number of parameters in the whole system and makes the computation more efficient.
Pooling Layers
2. Residual Networks
As per what we have seen so far, increasing the depth should increase the accuracy of the
network, as long as over-fitting is taken care of. But the problem with increased depth is that the
signal required to change the weights, which arises from the end of the network by comparing
ground-truth and prediction becomes very small at the earlier layers, because of increased depth.
It essentially means that earlier layers are almost negligible learned. This is called vanishing
gradient.
The second problem with training the deeper networks is, performing the optimization on
huge parameter space and therefore naively adding the layers leading to higher training error.
Residual networks allow training of such deep networks by constructing the network
through modules called residual models as shown in the figure. This is
called degradation problem.
The plain 34 layer network had higher validation error than the 18 layer plain network.
This is where we realize the degradation problem. And the same 34 layer networ k when
converted into the residual network has much lesser training error than the 18 layer residual
network.
Top-5 No. of
Year CNN Developed by Place
error rate parameters
Alex Krizhevsky,
2012 AlexNet(7) Geoffrey Hinton, IIya 1st 15.3% 60 million
Sutskever
Matthew Zeilerand
2013 ZFNet() 1st 14.8%
Rob Fergus
As we can see that this all started way back in 1998 and the CNN used was LeNet (8).Over a
period of developing phase the least error rate was noticed on ResNet (152) with only 3.6% of
error rate in 2015.
AlexNet: - This architecture was one of the first deep networks to push ImageNet Classification
accuracy by a significant stride in comparison to traditional methodologies. It is composed of 5
convolutional layers followed by 3 fully connected layers.
VGG Net (16):- This architecture is from VGG group, Oxford. It makes the improvement over
AlexNet by replacing large kernel-sized filters (11 and 5 in the first and second convolutional
layer, respectively) with multiple 3X3 kernel-sized filters one after another. With a given
receptive field(the effective area size of input image on which output depends), multiple stacked
smaller size kernel is better than the one with a larger size kernel because multiple non-linear
layers increases the depth of the network which enables it to learn more complex features, and
that too at a lower cost.
Deep metric learning is useful for a lot of things, but the most popular application is face
recognition. The model used is a ResNet network with 29 convolutional layers which is a pre -
trained model. It's essentially a version of the ResNet-34 network from the paper ‘Deep Residual
Learning for Image Recognition’ by He, Zhang, Ren, and Sun with a few layers removed and
the number of filters per layer reduced by half.
The network was trained from scratch on a dataset of about 3 million faces which were
derived from a number of datasets. The face scrub dataset, the VGG dataset, and then a large
number of images scraped from the internet.
This model has an accuracy of 99.38% on the standard labelled Faces in the Wild
benchmark. This is comparable to other state-of-the-art models and means that, given two face
images, it correctly predicts if the images are of the same person 99.38% of the time provided in
good environmental conditions.
The training started by randomly initializing weights and using a structured metric loss that
tries to verify all the identities into non-overlapping balls of radius 0.6. The type loss observed is
a pair-wise hinge loss that runs over all pairs in a mini-batch and includes hard-negative mining
at the mini-batch level.
¬ Login feature
¬ Registration of students
¬ Face detection
¬ Reports generation
¬ Email notification
b) Integration Test –
This test verifies the entire system’s functionality according to the design
specification.
c) Business Requirements –
This test verifies whether specific requirements of the customer are met.
d) Acceptance Testing –
This test verifies whether the system needs to meet the initial objectives and
customer’s expectations.
ID TC01
TITLE Admin sign up
PREREQUISTE Full Name
Username
Password
TEST ACTION 1. Start Asistencia application
2. Fill in details of sign up page of the admin
ID TC02
TITLE Admin log in
PREREQUISTE Username
Password
ID TC04
TITLE Storing details of the Registration form
PREREQUISTE Registered from filled up correctly
TEST ACTION 1. Start Asistencia application
2. Admin log in
Student registration
EXPECTED Should check, whether the excel sheet, the name of a sheet
RESULT according to the semester and subject is present or not and
store information into that specific sheet or create a new
one of that name and store in it respectively.
ID TC06
TITLE Registration of faces
PREREQUISTE IP camera
TEST ACTION 1. Start Asistencia application
2. Admin log in
3. Student registration form
4. Student face registration
EXPECTED Check if the Training set folder is available or not if not create
RESULT a new one, in its check whether the name of a student’s folder
is available inside it or not, if not create a new one and store
images into the student’s folder name.
ID TC08
TITLE Encoding registered faces
PREREQUISTE Training set
TEST ACTION 1. Start Asistencia application
2. Admin log in
3. Encode Database
EXPECTED Save encoding file with .csv format and labels in .pkl.
RESULT
ID TC10
TITLE Live face recognition
PREREQUISTE Encoding and Training should be done before a live
prediction
TEST ACTION 1. Start Asistencia application
2. Admin log in
3. Take Attendance
ID TC11
TITLE Attendance entry in Excel sheet
PREREQUISTE Live prediction should be on.
TEST ACTION 1. Start Asistencia application
2. Admin log in
3. Take Attendance
ID TC12
TITLE View Attendance
PREREQUISTE Excel sheet should be present
TEST ACTION 1. Start Asistencia application
2. Admin log in
3. Email Notification
TC01
TC02
TC03
TC04
TC05
TC06
TC07
TC08
TC10
TC11
13.0 Conclusion
The anticipated outcome of this project was the identification of condition that affects the
recognition of faces and to what extent. The results have been classified into different
parts.
Accuracy has been calculated by testing 10 faces of each factor and accurate recognition
rates are mentioned in the table below where rates are derived using the formula:
Accuracy % = (correct prediction/ total supplied values) * 100
The raw data i.e. unstructured and individual listings aren't always clean-cut and
complete, this can be problematic. Thus we selected data for experiment purpose in
CSV format. Time mentioned below is in Minutes.
Images
100 31.8 Min 28.5 Min 38 Min 34 Min 34.6 Min 25.5 Min
Images
Accuracy rate measured when images varying of their pixel values were tested.
Accuracy rate when input devices were switched between Webcam and IP-Camera.
Device Accuracy
Webcam Totally depends on the pre-defined
IP-Camera resolution and fps of the camera.
Accuracy rates with training dataset containing and without blur images.
Quality Accuracy
With Blur Images 30 %
Without Blur Images 80 %
4. Difference in models
5. Memory
Memory used Amount of main memory with is used to execute the algorithm is defined
as memory used which is given in MB.
¬ Authorized by administrator.
¬ E-mail notification
16.0 Benefits
¬ Ease of use.
¬ As the system stores the faces that are detected during registration and automatically
marks attendance faster. Providing authorized access.
17.0 Limitations
¬ Expensive
¬ Difficulties with big data processing and storing without gpu and RAM below 4GB
As the saying goes “The only source of knowledge is experience”. We gained strength, courage
and confidence by every experience, making us ready for facing every challenge ahead of us.
This project helped us getting aware by giving us a brief insight of the challenges that the Tech-
Industry holds and also the ability of handling important projects by applying the most suitable
strategy with considering all the important aspects. The whole experience was similar to reading
a Sherlock Homes book, i.e. upcoming challenges at every step with a touch of uncertainty and
mystery.
It has been such a unique experience where every suffering was worth going through and
without which nothing would have been possible. Furthermore it’s a privilege to have such a
great team where no member is pompous instead is modest and enthusiastic, also the support
that our teachers have shown towards this project by providing us this opportunity is something
we cannot thank them enough for
[1] O. M. Parkhi, A. Vedaldi, A. Zisserman Deep Face Recognition British Machine Vision
Conference, 2015.
Beyeler, M. (2017). Machine Learning for OpenCV: Intelligent image processing with Python.
London: Packt Publishing Ltd.
Bruce, P., & Bruce, A. (2017). Practical Statistics for Data Scientists. California: O’Reilly
Media.
Chollet, F. (2018). Deep Learning with Python. New York: Manning Publications Co.
Géron, A. (2017). Hands-On Machine Learning with Scikit-Learn and TensorFlow: Concepts,
Tools, and Techniques to Build Intelligent Systems. Brooklyn: O′Reilly.
Grus, J. (2015). Data Science from Scratch: First Principles with Python. California: O’Reilly
Media.
Lutz, M. (2013). Learning Python. California: O’Reilly Media.
Matthes, E. (2015). A Hands-On, Project-Based Introduction to Programming . San Francisco:
William Pollock.
McKinney, W. (2017). Python for Data Analysis: Data Wrangling with Pandas, NumPy, and
IPython. California: O’Reilly Media.
Phillips, D. (2014). Creating Apps in Kivy: Mobile with Python. California: O’Reilly .
Solem, J. E. (2012). Programming Computer Vision with Python: Tools and algorithms for
analyzing images. United States: O'Reilly Media.
Sweigart, A. (2015). Automate the Boring Stuff with Python: Practical Programming for Total
Beginners. San Francisco: William Pollock.
Ulloa, R. (2015). Kivy: Interactive Applications in Python. Birmingham : Packt Publishing Ltd.