Smart Attendance Face Recognision Using Machine Learning 2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 27

REPORT ON PROJECT ENTITLED

“FACIAL RECOGNITION BASED


ATTENDANCE SYSTEM”

SUBMITTED BY

PRANAV GHASGHASE
MURTAZA BURHANI
ROHAN POPHALE
HARISH YADAV

GUIDED BY

PROF. ABHAY E. PATIL

UNIVERSITY OF MUMBAI
2021-22
CERTIFICATE
Date: ____________

This is to certify that, the project work embodied in this report entitled, “FACIAL
RECOGNITION BASED ATTENDANCE SYSTEM” submitted by Pranav Ghasghase Roll
No. 415, Murtaza Burhani Roll No. 439, Rohan Pophale Roll No. 451, Harish Yadav Roll No.
477, for the award of Second year of Engineering (B.E.) degree in the subject of Information
Technology, is a work carried out by them under my guidance and supervision within the
institute. The work described in this project report is carried out by the concerned students and
has not been submitted for the award of any other degree of the University of Mumbai.
Further, it is certified that the students were regular during the academic year 2021-2022 and have
worked under the guidance of concerned faculty until the submission of this project work at Rajiv
Gandhi Institute of Technology, Mumbai.

Prof. Abhay E. Patil Prof. Yogita Ganage


Project Guide Project Co-ordinator

Dr. Sunil B. Wankhede Dr. Sanjay U. Bokade


Head of Department Principal

2
CERTIFICATE OF APPROVAL

This Mini Project report entitled

“Facial Recognition Based Attendance System”


Submitted by:
Roll No. Name
415 Pranav Ghasghase
439 Murtaza Burhani
451 Rohan Pophale
377 Harish Yadav

In partial fulfilment of the requirements of the degree of Second Year of Engineering in


Information Technology is approved.

SEAL OF
INSTITUTE

Internal Examiner External Examiner

________________ ________________

Date:

Place:

3
DECLARATION
I declare that this written submission represents my ideas in my own words and where others'
ideas or words have been included, I have adequately cited and referenced the original sources. I
also declare that I have adhered to all principles of academic honesty and integrity and have not
misrepresented or fabricated or falsified any idea/data/fact/source in my submission. I understand
that any violation of the above will be cause for disciplinary action by the Institute and can also
evoke penal action from the sources which have thus not been properly cited or from whom
proper permission has not been taken when needed.

ROLL NO. NAME SIGNATURE

415 PRANAV GHASGHASE

439 MURTAZA BURHANI

451 ROHAN POPHALE

477 HARISH YADAV

Date:

Place:

4
ACKNOWLEDGEMENT

With all reverence, we take the opportunity to express our deep sense of gratitude and
wholehearted indebtedness to our respected guide, Prof. Abhay E. Patil Department of
Information Technology, Rajiv Gandhi Institute of Technology, Mumbai. From the day of
conception of this project his active involvement and motivating guidance on day-to-day basis has
made it possible for us to complete this challenging work in time.
We would like to express a deep sense of gratitude to our respected Head of the Department,
Dr. Sunil B. Wankhade who went all the way out to help us in all genuine cases during the
course of doing this project. We wish to express our sincere thanks to Dr. Sanjay U. Bokade,
Principal,
Rajiv Gandhi Institute of Technology, Mumbai and would to like to acknowledge specifically for
giving guidance, encouragement and inspiration throughout the academics.
We would like to thank all the staff of Information Technology Department who continuously
supported and motivated during our work. Also, we would like to thank our colleagues for their
continuous support and motivation during the project work. Finally, we would like to express our
gratitude to our family for their eternal belief in us. We would not be where we are today without
their support and encouragement.

Pranav Ghasghase
Murtaza Burhani
Rohan Pophale
Harish Yadav

Date:

Place:

5
INDEX
Chapters Title of the Chapter/s Pages

Chapter 1 Introduction 12-18


1.1 Introduction of the project title
1.2 Statement of the problem(if any)
1.3 Objectives of the study/work
1.4 Project Scope and Direction
1.5 Impact, Significant and Contribution

Chapter 2 Literature Review 08-12


2.1 Research paper 1
2.2 Research paper 2
2.3 Research paper 3
Chapter 3 Methodology/Proposed system 05-10
3.1
3.2

Chapter 4 Implementation 15-25


4.1
4.2

Chapter 5 Details of Hardware & Software 15-25


5.1
5.2

Chapter 6 References

6
CHAPTER - 1
INTRODUCTION
Faces are the most decorated pictures in the visual system within the life time of a human being. it
is not surprising that humans have the ability to recognize faces. With regards to face recognition
by humans, it is thought that the brain remembers important details such as the shapes and colors
of crucial features corresponding to the eyes, nose, forehead, cheeks and the mouth. Thus, this
work is aimed at developing a face recognition system that will be able to detect an imperfect
human face and tell whose face it is.
Face recognition has been a very trending and developing area of research. There is continuous
research in the domain of face recognition and it has reached a point where a computer recognises
human face better than humans ourselves. As such it has become a very reliable technique to use
in security applications like Theft monitoring systems, criminal database etc. Face recognition can
also be used in educational institutes for taking attendance. Manually taking attendance by calling
out individual student’s name one by name is a time-consuming process, hence inefficient. Face
recognition based attendance system is by far the best solution to address this problem.
With the computational power of Machine learning, it is possible to build an efficient face
recognition model. In the proposed work, Python implementation of Facenet algorithm is used
and is tested on the standard AT&T orl face dataset. This dataset contains photographs of 40
individuals with 10 photographs each with varied poses. It was found in the proposed work that
Facenet produces 100% accuracy on this dataset. In the proposed model, the versatility of Google
Drive helps to indirectly connect a smartphone to a laptop/desktop so that an image clicked on the
smartphone can be accessed automatically by the Laptop to fetch and process it. This is the
novelty of the proposed work which doesn’t cost extra electronic hardware than what the faculty
of most educational institutes already have.

1.1Introduction of the Project Title

Due to increased demand of security day by day verifying identities, internet connections, online
communications led the researchers to find ways for these problems. Along with this facial
recognition systems are main part in finding solutions to these problems. Identity of any person is
incomplete without facial recognition. Just like any other form of biometric identification, face
recognition requires samples to be collected, identified, extracted with
necessary (features) information, and stored for recognition.

7
This Facial Recognition Based Attendance System is a project for Educational Institutions.
In this chapter, the problem and motivation, research objectives, project scope, project
contributions and the background information of the project will be discussed in detail.

1.2 Statement of the Problem

According to the previous attendance management system, the accuracy of the data collected is
the biggest issue. This is because the attendance might not be recorded personally by the original
person, in another word, the attendance of a particular person can be taken by a third party
without the realization of the institution which violates the accuracy of the data. For example,
student A is lazy to attend a particular class, so student B helped him/her to sign for the
attendance which in fact student A didn’t attend the class, but the system overlooked this matter
due to no enforcement practiced. Supposing the institution establish an enforcement, it
might need to waste a lot of human resource and time which in turn will not be practical at all.
Thus, all the recorded attendance in the previous system is not reliable for analysis usage. The
second problem of the previous system is where it is too time consuming. Assuming the time
taken for a student to sign his/her attendance on a 3-4 paged name list is approximately 1 minute.
In 1 hour, only approximately 60 students can sign their attendance which is obviously inefficient
and time consuming. The third issue is with the accessibility of those information by the
legitimate concerned party. For an example, most of the parents are very concerned to track their
child’s actual whereabouts to ensure their kid really attend the classes in college/school. However
in the previous system, there are no ways for the parents to access such information. Therefore,
evolution is needed to be done to the previous system to improve efficiency, data accuracy and
provides accessibility to the information for those legitimate party.

1.3 Objectives of the study/work

In order to solve the drawbacks of the previous system stated in 1.1, the existing system will need
to evolve. The proposed system will reduce the paperwork where attendance will no longer
involve any manual recording. The new system will also reduce the total time needed to do
attendance recording. The new system will acquire individual attendance by means of
facial recognition to secure data accuracy of the attendance.

The following are objectives of the project:


 To develop a portable Smart Attendance System which is handy and self-powered.

8
 To ensure the speed of the attendance recording process is faster than the previous system
which can go as fast as approximately 3 second for each student.
 Have enough memory space to store the database.
 Able to recognize the face of an individual accurately based on the face database.
 Allow parents to track their child’s attendance.
 Develop a database for the attendance management system.
 Provide a user-friendly interface for admins to access the attendance database and for non-
admins (parents) to check their child’s attendance by mailing the attendance.
 Allow new students or staff to store their faces in the database by using a GUI.
 Able to show an indication to the user whether the face- recognition process is successful or
not.

1.4 Project Scope and Direction

The main intention of this project is to solve the issues encountered in the old attendance
system while reproducing a brand new innovative smart system that can provide
convenience to the institution. In this project, an application will be developed which is
capable of recognising the identity of each individuals and eventually record down the data
into a database system. Apart from that, an excel sheet is created which shows the students
attendance and is directly mailed to the respected faculty.

The followings are the project scopes:


 The targeted groups of the attendance monitoring system are the students and staff of an
educational institution.
 The database of the attendance management system can hold up to 2000 individual’s
information.
 The facial recognition process can only be done for 1 person at a time.
 An excel sheet is created which contains the student attendance and is mailed to the
respective faculty.
 The project has to work under a Wi-Fi coverage area or under Ethernet connection, as the
system need to update the database of the attendance system constantly.
 The device on which the application is running is powered up by power bank to improve the
portability of the application.

9
1.5 Impact, Significance and Contributions

Many attendance management systems that exist nowadays are lack of efficiency and information
sharing. Therefore, in this project, those limitations will be overcome and also further improved
and are as follows :
 Students will be more punctual on attending classes. This is due to the attendance of a
student can only be taken personally where any absentees will be noticed by the system.
This can not only train the student to be punctual as well as avoids any immoral ethics
such as signing the attendance for their friends.
 The institution can save a lot of resources as enforcement are now done by means often
technology rather than human supervision which will waste a lot of human resource for an
insignificant process.
 The application can operate on any device at any location as long as there is Wi-Fi coverage
or Ethernet connection which makes the attendance system to be portable to be placed at
any intended location. For example, the device can be placed at the entrance of the
classroom to take the attendance.
 It saves a lot of cost in the sense that it had eliminated the paperwork completely.
 The system is also time effective because all calculations are all automated. In short, the
project is developed to solve the existing issues in the old attendance system.

10
CHAPTER - 2
LITERATURE SURVEY
2.1Smart Attendance System based on Machine Learning
Authors: Harish M, Chethan P, Prajna N Holla K, Syed Abdul Azeem, M.G. Veena
JSS Science and Technology University (SJCE), Mysuru, Karnataka, India.

There have been many attempts to automate the attendance marking system. Some of the major
works are briefed here:
A Fingerprint based attendance system was proposed by Sanjay Badhe et al. which uses a
Fingerprint module to take the fingerprint of the student. The fingerprint data is stored in a
computer wherein the Fingerprint is recognised based on the data obtained from the
Microcontroller. Although this model automates the process a little bit, students still have to wait
for their turn to register their fingerprint to mark their attendance, which is time consuming.
A Speech Biometric based attendance system proposed by Subhadeep Dey et al., uses speech
characteristics of a human being to distinguish between humans and recognise them. The user
accesses the system by making a call from few pre-decided mobile phones. An interactive voice
response (IVR) system guides a new user to enrol for the database while an enrolled member is
guided through the verification process.
The proposed model in this paper is an attempt to overcome all the shortcomings of the previous
related works in the domain of smart attendance system. Machine learning based Facenet model
has high accuracy to distinguish and recognise wide spectrum of faces with varied poses and
lighting conditions. Histogram of Gradients (HOG) method is used in the Facenet to detect the
faces from the surrounding environment. If there are multiple faces in a single picture, which is
the case in classrooms, this method segments the entire image and fetches individual faces
separately and later it is sent through the Facenet model to get individual predictions.
Images of the classroom is taken by the lecturer’s smartphone. The number of images depends on
the size of the classroom and the field of view of the smartphone camera so as to capture the
entire length and breadth of the classroom and not miss out any student’s face.
The program to fetch this image from the database, which will be stored in the lecturer’s laptop.
Upon detecting images, the program automatically downloads them, runs it through the Facenet
model, gets the predictions of all the students and the attendance status is sent to the concerned
lecturer/faculty through email. The attendance status file will be a comma separated values (csv)
file which contains the present or absent status of all students including their total attendance
percentage.

11
2.2

12
2.3 Automatic Students Attendance Marking System Using Image
Processing And Machine Learning
Authors: Vidya Patil, Anushka Narayan, Vaishnavi Ausekar, Anahita Dinesh
MIT,Pune

While studying related work in the field, there is so many recent works done by many researchers
in the area of ‘Automatic attendance marking systems’. Sawhney et al. proposed a model for
marking an automated attendance of the students in a class by using a face recognition method
with Eigenvalues and Convolutional Neural Network (CNN). Face detection and recognition
algorithms are proposed to be applied to both the cameras outside as well as inside the classroom.
Viola-Jones algorithm is proposed for face detection and Principal Component Analysis (PCA)
technique is proposed for feature selection while creating face image training dataset. Actual
implementation results are not given in the paper. Sovitkar and Kawathekar used the Viola Jones
algorithm for detection of the faces. For feature selection, they used algorithms such as LDA,
PCA and hybrid approach using both of these with SVM as a classifier.
They created dataset using different facial expressions, poses and lighting conditions. They
achieved maximum success rates as 90.1% for PCA, 92.3% for LDA and 95.6% with Hybrid
approach. Average rate of recognition with the combination of all algorithms showed is 95%.
There is decrease in the recognition rate as persons to be identified increases. Matilda and Shahin
implemented a system for student face detection and recognition using a video stream.
Implementation is done using Viola-Jones Algorithm along with Haar cascade filters for face
detection and recognition. Upon matching of the captured face image features with the student’s
recorded features, attendance is marked in an Excel sheet.
Dmello et al. proposed an attendance management system based on detection and recognition of s
tudent’s faces present in a class and mark recognized students’ attendance automatically. They
used IOT cameras to capture the students’ faces. CNN, along with SVM classifier is used for
face recognition. The system gives an accuracy of 94%. Rekha and Ramprasad proposed a system
which automates marking of the attendance by face recognition method using Eigenface database
along with the PCA technique. The database contains the images of 15 different persons with 10
images per person. A similarity score is calculated between the new face detected and images
present in the database. If the similarity score is greater than 0.3 face is recognized and the Excel
sheet gets updated.

13
METHODLOGY / PERPOSED SYSTEM

The present system of attendance marking i.e., manually calling out the roll call by the
faculty have quite satisfactorily served the purpose. With the change in the educational
system with the introduction of new technologies in classroom such as virtual classroom,
the traditional way of taking attendance may not be viable anymore. Even with rising
number of course of study offered by universities, processing of attendance manually could
be time consuming. Hence, in our project we aim at creating a system to take attendance
using facial recognition technology in classrooms and creating an efficient database to
record them.

 Image Acquisition:
Our proposed system uses a camera mounted at a proper place for acquiring students’ face
images in a controlled environment.
 Image Pre-processing:
For image pre-processing, histogram equalization is used to enhance input image quality.
 Face Detection:
Face is detected from the image using Viola-Jones and HAAR Cascade algorithm.
 Feature Extraction:
The features are extracted and the feature vectors dimensionality is reduced using the LDA
algorithm.
 Face Recognition:
With the help of LDA, SVM and KNN are used to classify images for face recognition
purpose.
 Mark Attendance:
If a match is found in the database, then it will automatically mark the student’s attendance
in the Excel Sheet, as per lecture name and time. Else, it will display an error and
attendance will not be marked.

14
IMPLEMENTATION

SOFTWARE

1 PROGRAMMING LANGUAGE : PYTHON

2 PYTHON VERSION : PYTHON 3.7

3 PYTHON LIBRARY : FACE RECOGNITION, OPENCV, DLIB, NUMPY

4 IDE : PYCHARM

Python Programming Language


Python is a high-level, general-purpose and a very popular programming
language. Python programming language (latest Python 3) is being used in web
development, Machine Learning applications, along with all cutting edge technology in
Software Industry. Python Programming Language is very well suited for Beginners, also
for experienced programmers with other programming languages like C++ and Java.
This specially designed Python tutorial will help you learn Python Programming Language
in most efficient way, with the topics from basics to advanced (like Web-scraping, Django,
Deep-Learning, etc.) with examples.

Below are some facts about Python Programming Language:


1)Python is currently the most widely used multi-purpose, high-level programming
language.
2)Python allows programming in Object-Oriented and Procedural paradigms.
3)Python programs generally are smaller than other programming languages like Java.
Programmers have to type relatively less and indentation requirement of the
language, makes them readable all the time.
4)Python language is being used by almost all tech-giant companies like – Google,
Amazon, Facebook, Instagram, Dropbox, Uber… etc.
5)The biggest strength of Python is huge collection of standard library which can be
used for the following:
 Machine Learning
 GUI Applications (like Kivy, Tkinter, PyQt etc. )
 Web frameworks like Django (used by YouTube, Instagram, Dropbox)
 Image processing (like OpenCV, Pillow)
 Web scraping (like Scrapy, BeautifulSoup, Selenium)
 Test frameworks
 Multimedia
 Scientific computing
 Text processing and many more..

15
is a widely used general-purpose, high level programming language. It was
created by Guido van Rossum in 1991 and further developed by the Python Software
Foundation. It was designed with an emphasis on code readability, and its syntax allows
programmers to express their concepts in fewer lines of code.
Python is a programming language that lets you work quickly and integrate systems more
efficiently.
There are two major Python versions:
Python 2 and Python 3. Both are quite different.

Python Language advantages and applications


Python is a high-level, interpreted, and general-purpose dynamic programming language
that focuses on code readability. It has fewer steps when compared to Java and C. It was
founded in 1991 by developer Guido Van Rossum. Python ranks among the most popular
and fastest-growing languages in the world. Python is a powerful, flexible, and easy-to-use
language. In addition, the community is very active there. It is used in many organizations
as it supports multiple programming paradigms. It also performs automatic memory
management.

1)Advantages :
 Presence of third-party modules
 Extensive support libraries(NumPy for numerical calculations, Pandas for
data analytics etc)
 Open source and community development
 Versatile, Easy to read, learn and write
 User-friendly data structures
 High-level language
 Dynamically typed language(No need to mention data type based on the
value assigned, it takes data type)
 Object-oriented language
 Portable and Interactive
 Ideal for prototypes – provide more functionality with less coding
 Highly Efficient(Python’s clean object-oriented design provides enhanced
process control, and the language is equipped with excellent text processing
and integration capabilities, as well as its own unit testing framework, which
makes it more efficient.)
 (IoT)Internet of Things Opportunities
 Interpreted Language
 Portable across Operating systems

2)Applications :
 GUI based desktop applications
 Graphic design, image processing applications, Games, and Scientific/
computational Applications
 Web frameworks and applications
 Enterprise and Business applications
 Operating Systems

16
 Education
 Database Access
 Language Development
 Prototyping
 Software Development

3)Organizations using Python :


 Google(Components of Google spider and Search Engine)
 Yahoo(Maps)
 YouTube
 Mozilla
 Dropbox
 Microsoft
 Cisco
 Spotify
 Quora

PYTHON LIBRARIES :
1) FACE RECOGNITION LIBRARY:
Recognize and manipulate faces from Python or from the command line with
the world’s simplest face recognition library.
Built using dlib’s state-of-the-art face recognition
built with deep learning. The model has an accuracy of 99.38% on the
Labeled Faces in the Wild benchmark.
This also provides a simple face_recognition command line tool that lets
you do face recognition on a folder of images from the command line!
 FEATURES
a) FIND IN FACE IN PICTURE
Find all the faces that appear in a picture:

INPUT OUTPUT

17
b) Find and manipulate facial features in pictures
Get the locations and outlines of each person’s eyes, nose, mouth and
chin.

INPUT OUTPUT

2) OPENCV LIBRARY :
OpenCV is a popular Computer Vision library mostly used for real-time
applications. In this blog, we go through the 9 most frequently used OpenCV
functions to use the library efficiently along with code examples.
 FEATURES
1) Color to GrayScale :
We convert the BGR images to grayscale images so that we can observe the
intensity of the pixels in the image rather than the color configurations in
the image.

2) Blurring an image using GuassianBlur :


We blur an image in order to reduce the noise in the image caused by bad
lighting and some issues with the sensors in cameras while capturing the
image. In the code, in order to increase the range of blur, we can increase
the kernel size from (3,3) to (7,7).

18
3) Edge Cascade :
to detect edges in an image for better model learning.We using the Canny
Edge detector which is very popular

4) Determining contours in an image :  


Contours are nothing but a curve or line joining all the continuous points in
the image(along the borders)which has the same color or intensity. It is used
in object detection mainly for shape analysis.

5) Ploting a histogram of an iamges.


This gives intuition of the pixel distribution in the image

3) NUMPY LIBRARY :

19
widely used array-processing library in Python.

What is NumPy?
NumPy is a general-purpose array-processing package. It provides a high
performance multidimensional array object, and tools for working with these
arrays. It is the fundamental package for scientific computing with Python.
It contains various features including these important ones:
 A powerful N-dimensional array object
 Sophisticated (broadcasting) functions

 Tools for integrating C/C++ and Fortran code
 Useful linear algebra, Fourier transform, and random number capabilities

Besides its obvious scientific uses, NumPy can also be used as an efficient multi-
dimensional container of generic data. Arbitrary data-types can be defined using
Numpy which allows NumPy to seamlessly and speedily integrate with a wide
variety of databases.

INPUT

OUTPUT

20
FLOWCHART

21
START WINDOW

SINGLE FACE
DETECTION

MULTIPAL FACE
DETECTION

22
23
24
25
26
27

You might also like