0% found this document useful (0 votes)
13 views70 pages

Group 7 Major Report Camatt

The project report titled 'Camatt: Automated Attendance Marker' presents an AI-powered facial recognition system designed to automate attendance marking in educational institutions. By utilizing computer vision and machine learning algorithms, the system captures and recognizes students' faces to efficiently record attendance without manual intervention. The report outlines the limitations of existing attendance systems and describes the proposed solution's features, objectives, and implementation details.

Uploaded by

anchalcpp120
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views70 pages

Group 7 Major Report Camatt

The project report titled 'Camatt: Automated Attendance Marker' presents an AI-powered facial recognition system designed to automate attendance marking in educational institutions. By utilizing computer vision and machine learning algorithms, the system captures and recognizes students' faces to efficiently record attendance without manual intervention. The report outlines the limitations of existing attendance systems and describes the proposed solution's features, objectives, and implementation details.

Uploaded by

anchalcpp120
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 70

[Camatt: Automated Attendance Marker]

A Project Report
in Partial Fulfillment of the Requirements
for the Degree of
Bachelor of Technology
in
Computer Science and Engineering

by
Adeeb Khan
1804310002
Raveet Kumar
1804310039
Sahil Singh
1804310041
Pawan Kumar
1804310028

Under the Guidance of


[Er. Shashank Gupta]

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


BUNDELKHAND INSTITUTE OF ENGINEERING AND TECHNOLOGY
JHANSI – 284128, UTTAR PRADESH, INDIA
[18-04-2022]
UNDERTAKING

We declare that the work presented in this project titled “Camatt:


Automated Attendance Marker”, submitted to the Computer Science
and Engineering Department, Bundelkhand Institute of
Engineering and Technology, Jhansi for the award of the Bachelor
of Technology degree in Computer Science and Engineering, is
our original work.

April, 2022
Jhansi

(Adeeb Khan)

(Raveet Kumar)

(Sahil Singh)

(Pawan Kumar)

ii
CERTIFICATE

Certified that the work contained in the project titled “Camatt:


Automated Attendance Marker”, by Adeeb Khan, Registration
Number 1804310002, Raveet Kumar, Registration Number
1804310039, Sahil Singh, Registration Number 1804310041, and
Pawan Kumar, Registration Number 1804310028 has been carried
out under my supervision.

(Er. Shashank Gupta) (Dr.Yashpal Singh)


Designation, Head, Computer Science and
Computer Science and Engineering Department
Engineering Department BIET, Jhansi
BIET, Jhansi

April, 2022

iii
Acknowledgment

Predominantly, our sincere thanks and regards to our supervisor [Er. Shashank Gupta]
for his guidance and support during my course of work whilst allowing us to work in
our own way. We are also deeply indebted to our respected Head of Department Prof.
Yashpal Singh for his indomitable contribution and mentorship without which the
completion of this project would have been impossible.

Our sincerest thanks to all our faculty members, seniors and colleagues whose
help and guidance brought this project to successful completion.

- Adeeb Khan
- Raveet Kumar
- Sahil Singh
- Pawan Kumar

iv
Synopsis

Daily attendance marking is a common and important activity in schools and colleges for
checking the performance of students. Manual Attendance maintaining is difficult to process,
especially for a large group of students. Some automated systems developed to overcome these
difficulties, have drawbacks like cost, fake attendance, accuracy, intrusiveness.
Camatt is an AI powered face recognition solution which uses Computer Vision and
Machine Learning algorithms to mark the attendance of the employees or students of the
organization. The system will work on face recognition where each student in the class will be
photographed and their details will be stored in a server. The teacher can then record the
attendance by just clicking some pictures of the classroom/ students using webcam. The system
will recognize the faces and verify the presence or absence of each student.
The proposed system deals with automating the attendance recording procedure in an
efficient and optimized manner. It follows a tallying procedure to record attendance and stores it
in the system. This project introduces an involuntary attendance marking system, devoid of any
kind of interference with the normal teaching procedure.

v
Contents

Undertaking ii

Certificate iii

Acknowledgment iv

Synopsis v

List of Figures xii

List of Tables xiii

List of Algorithms xiv

1. Introduction 15

1.1. Existing Attendance System 17

1.1.1. Basic Attendance System 17

1.1.2. Moderate Attendance System 17

1.1.3. Advanced Attendance System 18

vi
1.1.4. Drawbacks of Existing System 19

1.2. Proposed System 21

1.2.1. Salient Features of Proposed System 21

1.3. Project Objectives 23

1.4. Project Scope 24

2. Literature Review 25

2.1. Previously Implemented Techniques for

Attendance Systems 26

2.1.1. REAL TIME LOCATING SYSTEM

USING RFID FOR INTERNET OF THINGS 26

2.1.2. IOT BASED AUTOMATIC ATTENDANCE

SYSTEM 26

2.1.3. AUTOMATED ATTENDANCE SYSTEM

HAARCASCADE: A FACE RECOGNITION

APPROACH 27

2.1.4. FACE RECOGNITION BASED ON

CONVOLUTIONAL NEURAL NETWORK 28

2.2. Tabular Representation 29

3. Existing Systems 30

4. Requirements 33

4.1. Hardware and Software Requirements 33

4.1.1. Software Requirements 33

4.1.2. Hardware Requirements 33

4.2. Functional Requirements 35

4.3. Non – Functional Requirements 36

4.4. System Requirements 37

vii
5. System Analysis 38

5.1. Problem Definition 38

5.2. Problem Formulation 39

5.2.1. Input Part 39

5.2.2. Face Detection Part 39

5.2.3. Face Recognition and Output Part 40

5.3. Proposed Solution 41

5.3.1. Training Part 41

5.3.2. Facial Recognition 42

5.3.3. Attendance Update 43

5.4. Algorithms(libraries) Used 44

6. Implementation & Result Analysis 45

6.1. Platform Used 45

6.2. Designing 47

6.2.1 Activity Diagram 47

6.2.2. State Chart Diagram 49

6.2.3 Sequence Diagram 51

6.2.4. Collaboration Diagram 52

6.2.5. Use Case Diagram 53

6.3. Source Code 54

6.4. Screenshots 57

7. Testing 60

7.1. Test Cases 60

7.2. Corrections 62

8. Conclusion & Future Scope 64

8.1. Conclusion 64

viii
8.2 Future Scope 65

9. References 66

ix
x
List of Figures

1 Figure 5.1 Problem Formulation........................................................................39

2 Figure 5.2 System Process..................................................................................40

3 Figure 5.3 Training Part......................................................................................41

4 Figure 5.4 Facial Recognition............................................................................42

5 Figure 5.5 Attendance Update............................................................................43

6 Figure 6.1 Activity Diagram..............................................................................47

7 Figure 6.2 State Chart Diagram..........................................................................49

8 Figure 6.3 Sequence Diagram............................................................................51

9 Figure 6.4 Collaboration Diagram.....................................................................52

10 Figure 6.5 Use Case Diagram.............................................................................53

11 Figure 6.6 Home Screen.....................................................................................57

12 Figure 6.7 Application Startup...........................................................................58

13 Figure 6.8 Excel Report......................................................................................59

xi
List of Tables

1 Table 2.1 Tabular Representation of the Background Research.........................29

2 Table 7.1 Test Cases and Output........................................................................60

xi
List of Algorithms

1 Adam Geitgey ‘face_recognition’......................................................................54

xi
Chapter 1
Introduction

Uniqueness or individuality of an individual is his face and its features. In this project, face of
an individual is used for the purpose of marking attendance automatically. Conventional
methodology for taking attendance is by calling the name or roll number of the student and the
attendance is manually recorded. The important point of concern with this methodology is Time
Consumption. On an average it takes an essential part of the time allotted for the subject.
Attendance is prime important for both the teacher and student of an educational organization.
So, it is very important to keep record of the attendance. The problem arises when we think
about the traditional process of taking attendance in class room. Calling out the name or roll
number of the student for attendance is not only a problem of time consumption but also
consumes energy. So, an automated attendance system can resolve all the above problems.

1
To stay away from these losses, an automated process has been used in this project which is
based on Image Processing. In this project, the two main components that have been used are
face detection and face recognition.
Face detection is used to locate the position of the face region and face recognition is
used for marking the understudy’s attendance. The database of all the students in the class is
stored and when the face of the individual student matches with one of the faces stored in the
database then the attendance is recorded.

1
1.1 Existing Attendance Systems

Attendance is prime important for both the teacher and student of an educational
organization. So, it is very important to keep record of the attendance. There are various
attendance management systems that vary in complexity and feasibility. We have
divided them into three categories namely, basic, moderate, and advanced.

1.1.1 Basic Attendance System

a. Manual Attendance System:


The Manual Attendance System involves the process of the faculty calling out
the roll calls. If the student is present in the class, the student physically
acknowledges the roll call and says that he/she is present. In all other cases, the
faculty marks the student absent.

b. Paper Based Attendance System:


The Paper Based Attendance System is a part of the manual attendance system or
could be used for any other attendance system as well. Attendance is taken in any
form and it's recorded on a paper by writing either the absentees, or the
presentees only. Usually faculties write the roll numbers of the students that are
absent or present as per convenience.

c. Timesheet Attendance System:


The Timesheet Attendance System involves recording attendance into a
timesheet. A timesheet is a physical or virtual tool that allows you to record and
keep track of your worked time, in this case it's number hours the student attends.

1.1.2 Moderate Attendance Systems

1
a. Biometric Attendance System:
The biometric attendance system works on two basic principles. First, it takes an
image of a finger. Then finger scanner saves characteristics of every unique
finger and saved in the form of biometric key. Actually, finger print scanner
never saves images of a finger only series of binary code for verification purpose.
Secondly, the biometric attendance system determines whether the pattern of
ridges and valleys in this image matches the pattern of ridges and valleys in pre-
scanned images.

b. Badge Monitoring Attendance System:


The Badge Monitoring Attendance System is most commonly used in places
where people work with radioactive materials such as in a X-ray lab, nuclear
centres, etc. The radioactive badge is worn by the person somewhere between the
neck and the waist such that the front faces the source of radiation.

c. Swipe Card Attendance:


The Swipe Card Attendance System works by the person swiping its card on
entry and exit of the gate, and the attendance is recorded. A swipe card must
come in contact with the corresponding card reader before any transaction can
take place. The transaction becomes active when the magnetic stripe on a card is
moved through a console at a gate.

1.1.3 Advanced Attendance Systems

a. Retinal Scan-based Attendance System:


The Retinal Scan-based Attendance System makes uses of retinal features and
marks attendance on retinal recognition. Eye scan or retinal scan is a biometric
system that identifies a person by using unique patterns of the retina. Human
retina contains a complex blood vessel (retinal vein) patterns through which an
eye scanner device can easily identify a person and can even differentiate

1
identical twins. To scan human retina, retinal scanner uses the reflection of light
that is absorbed by retinal vein.

b. Gait Recognition Attendance System:


The Gait Recognition Attendance System records and recognizes an individual
by examining the way an individual walks, saunters, swaggers, or sashays —
with up to 90-percent accuracy.

c. Facial Recognition Attendance System:


The Facial Recognition Attendance System makes use of facial features such as
distance between the eyes, width of the nose, depth of the eye sockets, the shape
of the cheekbones, the length of the jaw line, etc. to recognize and mark
attendance.

1.1.4 Drawbacks of Existing Systems

a. Accuracy:
With an automated system, there is no human error. When you manually track
your students’ time, your students typically report their hours after they've
worked them. This will often increase the likelihood of inaccurate reporting. A
student may not intend to misrepresent his hours, he may just forget what his
actual in and out times were. Or, if a student has illegible handwriting, it could
make it difficult for roll list to determine actual hours attended. With manual
reporting, the organization is basically relying on the honor system. This system
can be abused, which can lead to time theft.

b. Increased Productivity:
Organizations who use a manual roll call process spend several hours each day
collecting time cards, re-entering an illegible data by hand, faxing, phoning, and
processing rollcall. When you employ an automated time and attendance system,
the rollcall process takes just minutes each period.

1
c. Savings:
With an automated system, you’ll save rollcall processing hours and eliminate
time theft which means your bottom line will improve.

2
1.2 Proposed System

The proposed system “Camatt: Automated Attendance Marker” overcomes the problems
of the existing systems as mentioned previously. It mainly incorporates Facial
Recognition to mark student’s attendance into the database.

1.2.1 Salient Features of the Proposed System

a. Face-mapping:

Facial features of the student such as distance between the eyes, width of the
nose, depth of the eye sockets, the shape of the cheekbones, the length of the jaw
line, etc. are registered into the data array. Students are recognized based on these
stored facial features, and if a match is found, the student is marked present and
the same is updated into the excel sheet.

b. Complete Automation:

The system is automated to its full potential. The algorithm runs as soon as
teacher turns it on and captures the attendance of students present in class.

c. Immediate Update:

Once the algorithm successfully recognizes the student, the attendance for the
corresponding student is updated automatically, without any human intervention.

d. Three-step Management:

The entire system is efficiently split into three components. Firstly, the facial
features are stored, and the model is trained. Second, the student is recognized by
facial recognition algorithm “face_recognition”. Third, the attendance is
automatically updated into the database.

2
f. Multiple Face Detection: Another advantage with this system is that, students
need not form a queue to stand in front of the camera, get themselves recognized
and update their attendance. The system has the capability of recognizing multiple
faces at a time, and hence it saves time.

2
1.3 Project Objectives

 To help in solving the difficult task of robust face recognition in a simple setup. Such a
solution would be of great scientific importance and would be useful to the public in
general.

 To design and develop a robust facial recognition algorithm. The algorithm should be
usable in a simple and easily adaptable setup. This implies a single camera setup,
preferably a webcam, and no use of specialized equipment.

 To construct the different applications, precise and robust automated facial recognition
methods and techniques that are needed.

 The objective of face recognition is, from the incoming image, to find a series of data of
the same face in a set of training images in a database. The great difficulty is ensuring
that this process is carried out in real-time, something that is not available to all
biometric facial recognition software providers.

2
1.4 Project Scope

The goal of this system design is to run detection and recognition process in a more
effective way. Processing speed is of the highest priority in real-time system. The design
aims to ensure the system process the frames as quickly as possible to avoid stacking up
unprocessed frames over time.
The idea of using face recognition is to achieve an interactive system so that any future
maintenance or manipulation of the system architecture can be achieved in a convenient
way. This is better than a system that is not based on biometric identification. Face
recognition uses focus on verification or authentication. This technology is used, for
example, in situations such as:

 Second authentication factor, to add extra security in any log-in process.


 Access to mobile applications without a password.
 Access to previously contracted online services (login on online platforms, for
example).
 Access to buildings (offices, events, facilities of any kind …).
 Payment method, both in physical and online stores.
 Access to a locked device.

2
Chapter 2
Literature Review

Face recognition is one of the few biometric methods that possess the merits of both high
accuracy and low intrusiveness. It has the accuracy of a physiological approach without being
intrusive. Over past 30 years, many researchers have proposed different face recognition
techniques, motivated by the increased number of real-world applications requiring the
recognition of human faces. There are several problems that make automatic face recognition a
very difficult task. However, the face image of a person inputs to the database that is usually
acquired under different conditions. The important of automatic face recognition is much be
cope with numerous variations of images of the same face due to changes in the following
parameters such as Pose, Illumination, Expression, Motion, Facial hair, Glasses Background of

2
image.

2.1 Previously Implemented Techniques for Attendance Systems

2.1.1 REAL TIME LOCATING SYSTEM USING RFID FOR


INTERNET OF THINGS

In the present, attendance techniques are usually supplemented manually,


because the number of university students is increasing within training institutes,
the problem with getting hold of a hand requires human effort to report and
maintain student attendance. Consequently, human errors are common in this
process. In recent years, there has been an increase in the number of applications
based on RFID (Radio Frequency Identification) systems. RFID technology
facilitates automatic wave identification using passive and active passive
electronic labels with convenient readers. In this paper, an attempt has been made
to address the problem of continuous attendance of lectures in developing
countries and to find the location of special students using RFID technology. The
implementation of RFID for attending student attendance as developed and
deployed in this study is capable of eliminating lost time during manual
attendance gathering and an opportunity for education administrators to capture
classroom statistics for sharing appropriate outcomes Attendance and for further
managerial decisions.

2.1.2 IOT BASED AUTOMATIC ATTENDANCE MANAGEMENT


SYSTEM

In recent days, we have seen a sudden increase in the usage of Radio Frequency
Identification(RFID) systems in the fields of industrial technologies, health,

2
agriculture, transportation, etc. Also, Internet of Things is blooming parallelly.
Therefore, using these, an attempt has been made to solve the attendance
management and monitoring problems. Attendance Management System is the
implementation of Internet of Things through Raspberry Pi 3 and RFID
Technology in order to reduce the time consumed by the traditional system of
recording daily attendance in schools and institutions. So, everything here in turn
gets automated. An attempt has also been made to develop an Android
application(app) and help the students to view their attendance anywhere,
anytime.

2.1.3 AUTOMATED ATTENDANCE SYSTEM USING


HAARCASCADE : A FACE RECOGNITION APPROACH

A face recognition system is computer application capable of identifying a


person from a digital image. One of the ways to do so is by comparing selected
facial features from image and a facial database. Face recognition is used in
different areas, to name a few, The Australian and New Zealand customs services
have an automated border processing system called SMARTGATE that uses
facial recognition. The system compares the face of the individual with image in
the e-passport microchip to verify that the holder of passport is rightful owner.
Properly designed systems installed in airports, multiplexes and other public
places can identify individuals among crowd, without passers-by even being
aware of the system. Other biometrics like fingerprints, iris scans and speech
recognition cannot perform this kind of mass recognition. Another area includes
ATM and check cashing security. The software is able to quickly verify a
customer’s face. After a customer consents, the ATM captures a digital image of
him. The facelt software then generates a face print of the photograph to protect
customers against identity theft and fraudulent transactions. Thus, by face
recognition software there is no need for a picture ID, bankcard or personal
identification number(PIN)To verify customers identity. But it is good enough to
be already implemented in different vertical markets such as commercial sectors,
healthcare and hospitality. However, effectiveness of facial recognition software

2
in cases of railway and airport security is questionable as it struggles to perform
under certain conditions such as lightning, sunglasses, long hair and other objects
partially covering the subjects face. Also, if the face is pointing the camera at an
angle.

2.1.4 FACE RECOGNITION BASED ON CONVOLUTION NEURAL


NETWORK

In this paper, a face recognition method based on Convolution Neural Network


(CNN) is presented. This network consists of three convolution layers, two
pooling layers, two full-connected layers and one Softmax regression layer.
Stochastic gradient descent algorithm is used to train the feature extractor and the
classifier, which can extract the facial features and classify them automatically.
The Dropout method is used to solve the over-fitting problem. The Convolution
Architecture for Feature Extraction framework (Caffe) is used during the training
and testing process. The face recognition rate of the ORL face database and AR
face database based on this network is 99.82% and 99.78%.

2
2.2 Tabular Representation

Table 2.1 : Tabular Representation of Background Research

2
Chapter 3
Existing Systems

Face recognition technology is well advance that can applied for many commercial applications
such as personal identification, security system, image- film processing, psychology, computer
interaction, entertainment system, smart card, law enforcement, surveillance and so on. Face
recognition can be done in both a still image and video sequence which has its origin in still
image face recognition. Different approaches of face recognition for still images can be
categorized into three main groups such as

1. Holistic approach
2. Feature-based approach

3
3. Hybrid approach product

1. Holistic approach: In holistic approach or global feature, the whole face region is
taken into account as input data into face detection system. Examples of holistic
methods are eigenfaces (most widely used method for face recognition), probabilistic
eigenfaces, fisherfaces, support vector machines, nearest feature lines (NFL) and
independent-component analysis approaches.They are all based on principal
component-analysis (PCA) techniques that can be used to simplify a dataset into lower
dimension while retaining the characteristics of dataset.

2. Feature-based approach: In feature-based approaches or local feature that is the


features on face such as nose, and then eyes are segmented and then used as input data
for structural classifier. Pure geometry, dynamic link architecture, and hidden Markov
model methods belong to this category. One of the most successful of these systems is
the Elastic Bunch Graph Matching (EBGM) system which is based on DLA.Wavelets,
especially Gabor wavelets, play a building block role for facial representation in these
graph matching methods. A typical local feature representation consists of wavelet
coefficients for different scales and rotations based on fixed wavelet bases. These locally
estimated wavelet coefficients are robust to illumination change, translation, distortion,
rotation, and scaling. The grid is appropriately positioned over the image and is stored
with each grid point’s locally determined jet in figure 2(a), and serves to represent the
pattern classes. Recognition of a new image takes place by transforming the image into
the grid of jets, and matching all stored model graphs to the image. Conformation of the
DLA is done by establishing and dynamically modifying links between vertices in the
model domain.

3. Hybrid approach: The idea of this method comes from how human vision system
perceives both holistic and local feature. The key factors that influence the performance
of hybrid approach include how to determine which features should be combined and
how to combine, so as to preserve their advantages and avert their disadvantages at the
same time. These problems have close relationship with the multiple classifier system

3
(MCS) and ensemble learning in the field of machine learning. Unfortunately, even in
these fields, these problems remain unsolved. In spite of this, numerous efforts made in
these fields indeed provide us some insights into solving these problems, and these
lessons can be used as guidelines in designing a hybrid face recognition system. hybrid
approach that use both holistic and local information for recognition may ban effective
way to reduce the complexity of classifiers and improve their generalization capability.

3
Chapter 4
Requirements

4.1 Hardware and Software Requirements

4.1.1 Software Requirements

● Operating System: Windows Environments

● Any PYTHON IDE (Pycharm is referred)

● Corresponding dependencies like OpenCV, face_recognition and Tkinter

3
4.1.2 Hardware Requirements

● Processor: Pentium IV Processor or higher

● Hard Disk: 400Mb minimum hard disk storage

● RAM: 512Mb or more

3
4.2 Functional Requirements

The functional requirements for a system describe what the system should do. Those
requirements depend on the type of software being developed, the expected users of the
software. These are statement of services the system should provide, how the system should
react to particular inputs and how the system should behave in particular situation.
This project proposes an approach for recognizing the category of facial expressions.
Face Detection and Extraction of expressions from facial images is useful in many
applications, such as robotics vision, video surveillance, digital cameras, security and human-
computer interaction. This project’s objective was to develop a facial expression recognition
system implementing the computer visions and enhancing the advanced feature extraction
and classification in face expression recognition.
To measure the performance of proposed algorithm and methods and check the
results accuracy, the system has been evaluated using Precision, Recall and Fscore. Facial
expression recognition is a very challenging problem. More efforts should be made to
improve the classification performance for important applications

3
4.3 Non – Functional Requirements

The framework holder is anticipated to be able to utilize button, pull-down menus, and
comparative devices. A window with graphical client interface will be utilized. To begin
with, of all we have chosen to store the highlights of iris of the pictures of an eye of people
and utilize those highlights for acknowledgment.
In case the input image's highlights coordinate up with the already put away highlights
in the database, at that point a message will be shown illuminating an effective
acknowledgment along with the subtle elements of the comparing individual. This is a
unique plan. In the planning stage of the Iris Acknowledgment framework, the layout of the
required screen designs, report formats, and menu structures will be chosen on.

 Reliability: Reliability based on this system defines the evaluation result of the
system, correct identification of the facial expressions and maximum evaluation rate
of the facial expression recognition of any input images.

 Ease of Use: The system is simple, user friendly, graphics user interface
implemented so any can use this system without any difficulties.

 Security: The computer that runs the program will have its own security. Only the
System Admin will log in to the system with his/her username and password. The
person whose face and the iris are recognized will access to view the output.

 Maintainability: As a tool to obtain the ease of maintainability UML will be used in


the development process.

3
4.4 System Requirements
Following are the system utilities requirement necessary for the project:

a) Python programming language: Python is a general-purpose programming language.


It has imperative, object-oriented and generic programming features, while also
providing facilities for low level memory manipulation. It was designed with a bias
toward system programming and embedded, resource-constrained and large systems,
with performance, efficiency and flexibility of use as its design highlights. It has also
been found useful in many other contexts, with key strengths being software
infrastructure and resource constrained applications, including desktop applications,
servers.

b) OpenCV framework: OpenCV (Open-Source Computer Vision Library) is an open


source computer vision and machine learning software library. OpenCV was built to
provide a common infrastructure for computer vision applications and to accelerate the
use of machine perception in the 22 commercial products. Being a BSD-licensed
product, OpenCV makes it easy for businesses to utilize and modify the code.

c) Face_recognition: Recognizes and manipulates 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.

d) Tkinter: Tkinter is the standard GUI library for Python. Python when combined with
Tkinter provides a fast and easy way to create GUI applications. Tkinter provides a
powerful object-oriented interface to the Tk GUI toolkit.The facial expression
recognition system is trained using supervised learning approach in which it takes
images of different facial expressions. The system includes the training and testing
phase followed by image acquisition, face detection, image preprocessing, feature
extraction and classification.

3
Chapter 5
System Analysis

5. 1 Problem Definition

Traditional face recognition systems employ methods to identify a face from the given
input but the results are not usually accurate and precise as desired. The system
described in this project aims to deviate from such traditional systems and introduce a
new approach to identify a student using a face recognition system, the generation of a
facial Model. This describes the working of the face recognition system that will be
deployed as an Automated Attendance System in a classroom environment.

3
5.2 Problem Formulation

A throughout survey has revealed that various methods and combination of these
methods can be applied in development of a new face recognition system. Among the
many possible approaches, we have decided to use a combination of knowledge-based
methods for face detection part and neural network approach for face recognition part.
The main reason in this selection is their smooth applicability and reliability issues.

Figure 5.1: Problem Formulation

5.2.1. Input Part


Input part is prerequisite for face recognition system. Image acquisition operation
is performed in this part. Live captured images are converted to digital data for
performing image-processing computations. These captured images are sent to
face detection algorithm.

5.2.2 Face Detection Part


Face detection performs locating and extracting face image operations for face
recognition system. Face detection part algorithm is given in Figure given below.
Our experiments reveal that skin segmentation, as a first step for face detection,
reduces computational time for searching whole image. While segmentation is
applied, only segmented region is searched weather the segment includes any
face or not. For this reason, skin segmentation is applied as a first step of
detection part. RGB color space is used to describe skin like color. White balance
of images differs due to change in lighting conditions of the environment while

3
acquiring image. This situation creates non-skin objects that belong to skin
objects. Therefore, white balance of the acquired image should be corrected
before segmenting it.

Figure 5.2: System Process

5.2.3 Face Recognition and Output Part


Based on given conditions, face candidates are extracted from input image with
modified bounding box from original bounding box. These face candidates will
be sent to facial feature extraction part to validate the candidates. Final
verification of candidate and face image extraction, facial feature extraction
process is applied. Facial feature is one of the most significant features of face.
Facial features are eyebrows, eyes, mouth, nose, nose tip, cheek, etc. The
property is used to extract the eyes and mouth which, two eyes and mouth
generate isosceles triangle, and distance between eye to eye and mid point of
eyes distance to mouth is equal. Laplacian of Gaussian (LoG) filter and some
other filtering operations are perfomed to extract facial feature of face candidate.

4
5.3 Proposed Solution

The solution proposed consists of following steps:

5.3.1 Training Part

The facial features such as distance between the eyes, width of the nose, depth of
the eye sockets, the shape of the cheekbones, the length of the jaw line, etc. are
registered into the database folder by using the facial recognition xml file from
the ‘OpenCV’ python library. Once the features are registered, the model is
trained using the gathered features.

Figure 5.3: Training Part

4
5.3.2 Facial Recognition

The facial features are fetched from the database and the face of the student is
recognized by comparing with existing values in the database. Facial Recognition
is done using ‘OpenCV’ python library, particularly using ‘face_recognition’
code.

Figure 5.4 Facial Recognition

4
5.3.3 Attendance Update

Once the facial recognition is done successfully, the attendance for the
corresponding student is updated into the database automatically, without any
human intervention. If a match is found from the existing database, the student is
marked as present, in all other cases the student is marked absent.

Figure 5.5: Attendance Update

4
5.4 Algorithm (libraries) Used

 Tkinter

Python has a lot of GUI frameworks, but Tkinter is the only framework that’s
built into the Python standard library. Tkinter has several strengths. It’s cross-
platform, so the same code works on Windows, macOS, and Linux. Visual
elements are rendered using native operating system elements, so applications
built with Tkinter look like they belong on the platform where they’re run.
Although Tkinter is considered the de facto Python GUI framework, it’s not
without criticism. One notable criticism is that GUIs built with Tkinter look
outdated. If you want a shiny, modern interface, then Tkinter may not be what
you’re looking for.

 face_recognition

Recognize and manipulate faces from Python or from the command line with the world’s simplest face r
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!

 OpenCV

OpenCV is a huge open-source library for computer vision, machine learning,


and image processing. OpenCV supports a wide variety of programming
languages like Python, C++, Java, etc. It can process images and videos to
identify objects, faces, or even the handwriting of a human. When it is integrated
with various libraries, such as Numpy which is a highly optimized library for
numerical operations, then the number of weapons increases in your Arsenal i.e
whatever operations one can do in Numpy can be combined with OpenCV.
programs and projects.

4
Chapter 6
Implementation & Result Analysis

6.1 Platform Used

PyCharm is an integrated development environment (IDE) used in computer


programming, specifically for the Python programming language. It is developed by
the Czech company JetBrains (formerly known as IntelliJ). [5] It provides code analysis, a
graphical debugger, an integrated unit tester, integration with version control
systems (VCSes), and supports web development with Django as well as data
science with Anaconda .

4
PyCharm is cross-platform, with Windows, macOS and Linux versions. The Community
Edition is released under the Apache License, and there is also Professional Edition with
extra features – released under a subscription-funded proprietary license and also an
educational version.

 Coding assistance and analysis, with code completion, syntax and error
highlighting, linter integration, and quick fixes
 Project and code navigation: specialized project views, file structure views and quick
jumping between files, classes, methods and usages
 Python refactoring: includes rename, extract method, introduce variable, introduce
constant, pull up, push down and others
 Support for web frameworks: Django, web2py and Flask [professional edition only]
 Integrated Python debugger
 Integrated unit testing, with line-by-line code coverage
 Google App Engine Python development [professional edition only]
 Version control integration: unified user interface
for Mercurial, Git, Subversion, Perforce and CVS with change lists and merge
 Support for scientific tools like matplotlib, numpy and scipy [professional edition
only]

4
6.2 Designing
6.2.1 Activity Diagram

Figure 6.1 Activity Diagram

The image capturing process runs into a loop until a proper input image is captured
which is suitable for facial detection and facial recognition. The captured image is pre-
processed, extraneous details and background noise is removed. The specific facial

4
features such as distance between the eyes, width of the nose, depth of the eye sockets,
the shape of the cheekbones, the length of the jaw line, etc. are analyzed and hoarded.
The captured input image, after being pre-processed and the facial features being
extracted, is verified with the existing database that consists of facial features recorded at
the time of registration of students’ details into the system.
If a match is found, the corresponding student is marked present. This completes
the whole process of marking of student attendance by incorporating facial recognition.

4
6.2.2 State Chart Diagram

Figure 6.2: State Chart Diagram

The initial state deals with capturing of a suitable for facial detection and facial
recognition. It runs into a loop until an input image is captured successfully. The next
state is pre-processing. In this state, extraneous details and background noise is
eliminated from the captured input image. After this, in the next state, feature extraction
is done. The specific facial features such as distance between the eyes, width of the nose,
depth of the eye sockets, the shape of the cheekbones, the length of the jaw line, etc. are
analyzed and hoarded. The state after this is the verification module. The captured input
image, after being pre-processed and the facial features being extracted, is verified with

4
the existing database that consists of facial features recorded at the time of registration of
students’ details into the system.
If a match is found, the corresponding student is marked present. This completes
the whole process of marking of student attendance by incorporating facial recognition
and is the terminating state of the system.

5
6.2.3 Sequence Diagram

Figure 6.3: Sequence Diagram

There are three objects, User, FaceDetector, and System.The ‘User’ i.e. the student
registers himself/herself into the ‘FaceDetector’ database. This data is stored into the
‘System’. The ‘FaceDetector’ retrieves data from the ‘System’ and accesses the input
image from the ‘User’. The ‘User’ sends the input value to the ‘FaceDetector’ and the
‘FaceDetector’ searches for a tally in the ‘System’. If a match is found, the ‘User’ is
marked present, otherwise, the student is marked absent.

5
6.2.4 Collaboration Diagram

Figure 6.4: Collaboration Diagram

There are three objects, User, FaceDetector, and System. The ‘User’ i.e. the student registers
himself/herself into the ‘FaceDetector’ database. This data is stored into the ‘System’. The
‘FaceDetector’ retrieves data from the ‘System’ and accesses the input image from the ‘User’.
The ‘User’ sends the input value to the ‘FaceDetector’ and the ‘FaceDetector’ searches for a
tally in the ‘System’. If a match is found, the ‘User’ is marked present, otherwise, the student is
marked absent.

5
6.2.5 Use Case Diagram

Figure 6.5: Use Case Diagram

The function of the application which is entirely dependent on the User’s Input. There are two
actors namely, ‘Student’ and ‘System Manager’. The ‘Student’ Registers its facial features and
enrolls itself into the system. The ‘System Manager’ manages these registration details. The
‘Student’ may enter and exit the class. The ‘System Manager’ recorded attendance based on
student’s movement in and out of class. The ‘System Manager’ maintains system resources.

5
6.3 Source Code

import cv2
import
face_recognition
import os
from datetime import
datetime from tkinter
import *

path = 'images'
imgList = []
classNames = []
roll_num_data =
{}
myList = os.listdir(path)

class MyWindow:

def init (self, win):

self.lbl1 = Label(win, text='CamAtt: An Automated Attendance Marker',


font=("Arial", 35))
str1 = "Camatt is an Attendance Marker System based on Machine
Learning. It uses the face recognition technique.\nIt can be used in various
different settings like in schools, colleges or in any business organization,
but prim-\narily it is best suited for schools and colleges where we have
classrooms where all the people whose attende-\nce have to be marked are in
the same place at the same time. It can then mark attendance of people
coevally."
str2 = "Designed & Developed by Group :\n\nAdeeb Khan
(1804310002)\nRaveet Kumar (1804310039)\nSahil Singh (1804310041)\nPawan
Kumar (1804310028)"
self.lbl2 = Label(win, text=str1, font=("Arial",
20)) self.lbl3 = Label(win, text=str2,
font=("Arial", 20)) self.lbl1.place(x=100, y=50)
self.lbl2.place(x=100,
y=150)
self.lbl3.place(x=100,
y=750)

self.b1 = Button(win, text='Start Attendance', font=("Arial", 25),


command=self.start)

self.b1.place(x=100, y=350)

5
def start(self):
preparation()
createNewAttendanceSheet
() startProgram()

5
def preparation():
file_data = open("roll_num_data.csv",
"r") roll_num_list =
file_data.readlines()
file_data.close()

for item in roll_num_list:


name, roll_num =
item.split(",") roll_num =
roll_num.rstrip("\n")
roll_num_data[name] =
roll_num

for cl in myList:
curImg = cv2.imread(f'{path}/{cl}')
imgList.append(curImg)
classNames.append(os.path.splitext(cl)[0])

def createNewAttendanceSheet():
file_data = open("attendance.csv",
"r+") file_data.truncate(0)
str = "Name, Roll no.,
Time"
file_data.write(str)
file_data.close()

def markAttendence(name):
with open('attendance.csv', 'r+')
as f: myDataList =
f.readlines()
nameList = []
for line in myDataList:
entry =
line.split(',')
nameList.append(entry[0]
) if name not in nameList:
now = datetime.now()
dtString = now.strftime('%H:%M') f.writelines(f'\n{name},
{roll_num_data[name]},{dtString}')

def
findEncodings(imgLis
t): encodeList = []
for img in imgList:
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
encode =
5
face_recognition.face_encodings(img)[0]
encodeList.append(encode)
return encodeList

def startProgram():
encodeListKnown = findEncodings(imgList)

5
cap =
cv2.VideoCapture(0)
while True:
success, img = cap.read()
imgSmall = cv2.resize(img, (0, 0), None, 0.25,
0.25) imgSmall = cv2.cvtColor(imgSmall,
cv2.COLOR_BGR2RGB)

facesCurFrame = face_recognition.face_locations(imgSmall)
encodesCurFrame = face_recognition.face_encodings(imgSmall,
facesCurFrame)

for encodeFace, faceLoc in zip(encodesCurFrame, facesCurFrame):


matches = face_recognition.compare_faces(encodeListKnown,
encodeFace) faceDis =
face_recognition.face_distance(encodeListKnown, encodeFace)
matchIndexes = []

for index in range(0,


len(faceDis)): if
faceDis[index] < 0.6:
matchIndexes.append(index)

for value in
matchIndexes: if
matches[value]:
name =
classNames[value].upper() y1,
x2, y2, x1 = faceLoc
y1, x2, y2, x1 = y1 * 4, x2 * 4, y2 * 4, x1 * 4
cv2.FILLED cv2.rectangle(img, (x1, y1), (x2, y2), (0, 255,
) 0), 2)
cv2.rectangle(img, (x1, y2 - 35), (x2, y2), (0, 255, 0),

cv2.putText(img, name, (x1 + 6, y2 - 6),


cv2.FONT_HERSHEY_COMPLEX, 1, (255, 255, 255), 2)
markAttendence(name)

cv2.imshow('Webcam',
img) cv2.waitKey(1)

window = Tk()
myWin =
MyWindow(window)
window.title('CamAtt'
)
width =
window.winfo_screenwidth()
height =

5
window.winfo_screenheight()
window.geometry("%dx%d" % (width,
height)) window.mainloop()

5
6.4 Screenshots

Figure 6.6: Home Screen

This is the main screen of the application. It contains some details about it as well as the start
button to start the attendance. Basically, it’s a simple and plane GUI for handling the attendance
application.

5
Figure 6.7: Application Startup

After, we press the start button, the application will start the camera. The camera will start
taking pictures frame by frame and each frame will be sent to the application for recognition of
face. If face matches, a square is formed, confirming the student with it’s registered name and
his/her attendance will be marked.

5
Figure 6.8: Excel Report

Attendance marked on the excel sheet. After recognizing the face, the application fill find the
mark the attendance of the given person with name, roll no. and with time on a excel sheet.

5
Chapter 7
Testing

7.1 Test Cases

S. No Action Performed Expected Actual Output Remarks


Output

1 Starting Up and Runs successfully System checks Inefficient Code


Successfully Running and system report syntax loops and improper
Application checks take place errors in code library imports
properly without and import
errors crashes

6
2 Application Start-Up App successfully Takes a time gap Make sure you
and Execution starts up and user of a few don’t start the app
gives milliseconds for abruptly
requirement- the server to start
based inputs and run

3 Image Saving Registration No features Register the system


Successful with registered and model in a well-lit
the help of hence no dataset environment for
roll_num file and available for maximum accuracy
stored within detection
image folder

4 Face Detection Successful Inefficient Face Train the system


Detection of Detection and with an increased
Faces by tallying improper results count of data set
images of the shown
given dataset

5 OpenCV extraction OpenCV installed Version of All required


successfully and OpenCV differs libraries have to be
properly from that of installed with
imported NumPy and code proper versions
crashes

Table 7.1 Test Cases and Outputs

6
7.2 Corrections

After doing a lot of testing on different test cases and in different scenarios, different
types of problems popped up, which were corrected and again tested for further
refinement. Along with that different types of data set were also used for testing it, so
that system can become more perfect.
In order to make system very robust, some extra code blocks were also added to
handle the extraneous cases. Also, stress testing was also employed for the purpose of
correction, in order to make the system less error – prone.

6
Chapter 8
Conclusion & Future Scope

8.1 Conclusion

The Camatt: Automated Attendance System has the main goal of automating the
process of managing attendance and revolves around the fulcrum of Automation.
The system involves mainly three steps: Registration, Authentication and Update.
Its fundamental goal is to eliminate time consumption and the need to maintain
paperwork. Since the advent of technology, humans have progressed to evolve and
adapt to changes based on their convenience. Bringing this idea to practicality

6
helps the common man to effectively and efficiently progress and this system
helps the whole organization to evolve and achieve what is necessary by
eliminating the tedious and iterative tasks.
Face recognition systems are part of facial image processing applications and
their significance as a research area are increasing recently. Implementations of system
are crime prevention, video surveillance, person verification, and similar security
activities.

6
8.2 Future Scope

The system is built on a combination of several technologies and has overcome


most manual flaws and thus stands apart from the existing systems. However, the
database management is an area of concern and needs to be filtered out on a cyclic
and timely basis to avoid data overflow. Furthermore, since the system is built
upon the features of Machine learning, effective training and efficient procedures
must be followed to achieve 100% accuracy. Finally, we can build the system as
an integration of the current attendance systems being used in the organization in
order to achieve maximum efficiency.
The system can be made more flexible and scalable using given
recommendations. Please note that the system here is just a prototype of idea
presented via this project. The recommendations are as follows:

 The system can be extended to more number of students with freedom to


change list of students according to class changes.

 The system can be and more flexible to allow updating of templates in


case student incurs significant amount of change in facial features.

 The system can also be extended to allow better face recognition algorithm
in which even rotational features of face can be detected efficiently.

6
References

[1] “Face Recognition Based on Convolution Neural Network” by Kewen Yan, Shaohui Huang,
Yaoxian Song, Wei Liu, Neng Fan, Conference: Proceedings of the 36th Chinese Control
Conference

[2] “Automated Attendance System using Haarcascade : A Face Recognition Approach” by


Abhish Ijari , Anand Mannikeri , Vinod Kumar Gulmikar, Conference: International Journal for
Research in Applied Science & Engineering Technology (IJRASET)

[3] “IoT based Automatic Attendance Management System” by B.M Sri Madhu, Kavya
Kanagotagi, Devansh, Conference: 2017 International Conference on Current Trends in
Computer, Electrical, Electronics and Communication (CTCEEC)

[4] “Real time locating system using RFID for Internet of Things” by T. Saimounika, K.
Kishore, Conference: 2017 International Conference on Energy, Communication, Data
Analytics and Soft Computing (ICECDS)

[5] “Classroom Attendance Using Face Detection and Raspberry-Pi” by Priya Pasumarti,
P. Purna Sekhar, Conference: International Research Journal of Engineering and

6
Technology (IRJET), e-ISSN: 2395-0056, p-ISSN: 2395-0072, Volume: 05 Issue: 03
Mar-2018.

[6] https://medium.com/@ageitgey/machine-learning-is-fun-part-4-modern-face-recognition-
with-deep-learning-c3cffc121d78

[7] “Design of a Face Recognition System (PDF Download Available)”. Available from:
https://www.researchgate.net/publication/262875649_Design_of_a_Face_Recognition_System

6
6

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy