Group 7 Major Report Camatt
Group 7 Major Report Camatt
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
April, 2022
Jhansi
(Adeeb Khan)
(Raveet Kumar)
(Sahil Singh)
(Pawan Kumar)
ii
CERTIFICATE
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
1. Introduction 15
vi
1.1.4. Drawbacks of Existing System 19
2. Literature Review 25
Attendance Systems 26
SYSTEM 26
APPROACH 27
3. Existing Systems 30
4. Requirements 33
vii
5. System Analysis 38
6.2. Designing 47
6.4. Screenshots 57
7. Testing 60
7.2. Corrections 62
8.1. Conclusion 64
viii
8.2 Future Scope 65
9. References 66
ix
x
List of Figures
xi
List of Tables
xi
List of Algorithms
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
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.
1
identical twins. To scan human retina, retinal scanner uses the reflection of light
that is absorbed by retinal vein.
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.
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:
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.
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
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
2.2 Tabular Representation
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.
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
3
4.1.2 Hardware Requirements
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.
3
4.4 System Requirements
Following are the system utilities requirement necessary for the project:
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.
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.
4
5.3 Proposed Solution
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.
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.
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.
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
OpenCV
4
Chapter 6
Implementation & Result Analysis
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
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
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
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
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
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:
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 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 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.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
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
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
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 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
[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