Our Report Final
Our Report Final
(A-Syst)
It is certified that the work presented in this report was performed by Hamza
Mawaz Khan , Nabeel Niaz, Omar Farooq, and Umair Ayaz Aslam under
the supervision of Dr. Raja Hashim and Dr. Ghulam Abbas. The work is
adequate and lies within the scope of the B.S. degree in Computer
Science/Computer Engineering at Ghulam Ishaq Khan Institute of
Engineering Sciences and Technology.
(Advisor)
(Dean)
ABSTRACT
We are grateful that the Almighty granted and blessed us with the required
strength to complete this endeavor. We would like to express our sincere
appreciation to everyone who made it possible for us to finish this project.
We owe a debt of gratitude to Dr. Raja Hashim, our senior year project
adviser, for his stimulating suggestions and assistance, which allowed us to
efficiently plan our project. Finally, I would like to extend my gratitude to
the whole faculty of Computer Science and Engineering, who guided the
team to success. During our project reviews, we value the help provided by
the panel members in the form of comments and suggestions.
TABLE OF CONTENTS
CERTIFICATE OF APPROVAL................................................................2
ABSTRACT....................................................................................................3
ACKNOWLEDGEMENT.............................................................................4
TABLE OF CONTENTS..............................................................................5
LIST OF FIGURES.......................................................................................7
LIST OF TABLES.........................................................................................8
CHAPTER I: INTRODUCTION.................................................................9
Motivation.............................................................................................9
Project Perspective................................................................................9
Project Scope......................................................................................11
Product Functioning............................................................................11
User Characteristics............................................................................12
System Overview................................................................................12
Product Functions...............................................................................18
Constraints..........................................................................................18
Assumptions and Dependencies.........................................................18
User Interfaces....................................................................................19
Hardware Interfaces............................................................................19
Software Interfaces.............................................................................19
Communication Interfaces..................................................................19
Functional Requirements....................................................................19
Functional Requirements with Traceability information....................21
Non-Functional Requirements............................................................27
1. Performance Requirements: Response Time......................27
2. Performance Requirements: Security..................................27
3. Performance Requirements: Scalability..............................27
4. Performance Requirements: Platform.................................28
Software Quality Attributes................................................................28
1. Reliability................................................................................28
2. Availability.............................................................................28
3. Maintainability.......................................................................28
4. Portability...............................................................................29
5. Usability..................................................................................29
6. Scalability...............................................................................29
Architectural Design...........................................................................30
UML Diagrams...................................................................................31
1. Use Case Diagram..................................................................31
2. State Diagram.........................................................................33
3. Component Diagram.............................................................35
4. Activity Diagram....................................................................35
5. Deployment Diagram.............................................................37
Methodology.......................................................................................38
Encoding Process (using Haar Cascade Classifier)............................42
Motivation
The old technique for registering attendance - storing paper sheets for
records, spending significant time manually confirming attendance, and
generating reports with the potential for human mistakes - has become
inefficient. Updates and maintenance of conventional attendance systems are
likewise exceedingly time-consuming. It will take at least a few hours to
update the entire school or college, regardless of whether the data is entered
manually or digitally. This time may have been employed more effectively
on other, more essential duties. Similarly, at the conclusion of the academic
year, it would require an enormous amount of time to consolidate all of the
records and generate individual student reports. Having an automatic
attendance tracker eliminates this burden and compiles all records without
requiring human interaction. Thus, the time saved can be allocated to more
critical managerial tasks.
Project Perspective
Product Functioning
There are two portals, to begin with, depending on the user. The admin portal
and the instructor portal. When the user first visits the website, they can
choose between the admin portal and the instructor portal. When the user
chooses the former, the admin page, there would be a login interface for the
admin where the admin can enter their respective login credentials, the
username, and the password. Once the admin has logged in, he or she will
have the option to update the database that holds the set of pictures that are
used to identify the students. The label of these images would be the title of
the student that they would be tagged with upon identification. These images
would be uploaded to the server, which would then be picked up by the
model, and the model will be trained on this dataset. For the instructor portal,
initially, there would be a login page where each instructor could log in with
their respective credentials. The instructor would then be taken to another
page after successfully logging in, where they could view the live attendance
analytics of the students. The instructor could also choose a time to schedule
multiple future classes, whereas per the chosen time, the attendance system
would activate in the classrooms and log student attendance. Individual
attendance files would be generated for the respective classes.
User Characteristics
This system consists of two main end-users, i.e., the Instructor and the
Administrator. The product's perspective from both points of view is as
follows:
Instructors access the system as a platform where they can monitor student
attendance analytics. They can filter by students as well as view combined
statistics.
System Overview
Tripathi et al. [1] asserted the existence of a real-time system that can track
the presence of pupils in a classroom. The required supporting photos for this
model were provided through a webcam at a steady pace until the system
was shut off. The author reviewed several facial detection and identification
algorithms. Students are discriminated against using the Ada boost and Haar
cascade classifiers. Although the author utilized OpenCV libraries for face
exposure and recognition, he also employed P.C.A. and LDA for a more in-
depth understanding. The text also highlighted the distinction between LDA
and P.C.A.
In conclusion, the author expressed confidence in the system's correctness
and stated that the recognition rate is totally dependent on the size of the
employed image and the database.
Akshara Jadhav et al. [3] spurred the development of the face encounter
method Viola-Jones and the face recognition P.C.A. technique with machine
learning and SVM extraction capability.
The author also added reprocessing, which involves the histogram
equalization and scaling to 100x100 of the retrieved face picture. It has been
demonstrated that neural networks can be used for facial identification, and
we may envision a semi-supervised learning strategy that employs facial
recognition support vector machines to get good results.
After the face is identified, the further processing generates weekly or
monthly attendance reports that may be emailed to parents and guardians.
Nirmala Kar et al. [4] utilized the Haar cascade front XML file for face
detection and Eigen face for face confirmation.
It was developed with Open-CV Libraries. After face orientation, the
examination was prepared. When the face orientation was about 0 degrees,
the detection and identification rates were 98.7 percent and 95 percent,
respectively.
The frequency dropped gradually as the face orientation increased from 0 to
90 degrees. The final levels of identification and recognition varied from 0 to
90 degrees.
Smit Hapani et al. [5] have amplified the system that validated the model that
contributes to facial recognition.
Haar classifiers employ a cascade technique, followed by Fisher face
recognition. The technology achieves excellent efficiency of up to 50 percent
within 15 pupils while modeling several faces with variables like hats and
glasses. The suggested approach utilizes classroom video sources, with the
generated frames utilized to detect faces. Consequently, by adhering to the
processes, the overall model's rate and precision are enhanced.
The paper examined many strategies for enhancing the detection and
recognition rate. The results demonstrate that Haar Cascade is consistent
across all examined articles and has a high detection rate. Despite the
author's laborious attempts to alter the above-mentioned techniques with a
model that interacts with many faces, it lacks both detection and
identification, necessitating the use of Deep Learning using convolutional
neural networks to fulfill the application's requirements.
CHAPTER III: DESIGN
Product Functions
Constraints
There should be sufficient lighting within the classrooms for the system to
work adeptly; moreover, students should face the camera many times during
a normal classroom session. The system should also be provided with
sufficient training data for each student to work as intended.
The constant flow of the stream is the key assumption of this product, and for
the system to process because the system needs this video stream to calculate
class strength and identify students to generate analytics. Moreover, we're
also assuming the students within the classroom have sustained appearances.
The existence of a video camera is the most important dependency as it
needs to be present in each classroom to provide continuous video streams to
operate the system as intended. We also expect the students to not leave the
classroom premises before a certain time instance.
User Interfaces
User interface will be categorized into two sections, one for the
administration, who will select the students for each class, and the other for
the instructors, who will view class analytics. The landing page of the web
application will allow the incoming users to log in or request a sign-up.
There will be a separate page that will list out all the product features and
provide a guide as to how to use the product.
Hardware Interfaces
The product will require a continuous inflow of video data to operate. This
video data will be provided via a dedicated camera placed strategically
within the environment.
Software Interfaces
The product will use machine learning models to process data. The output of
the model will be saved onto the database, and users can interact with the
system via the web dashboard
Communication Interfaces
All communication with the camera and the C.U. will be done locally. An
internet connection will be needed to access the web application.
Functional Requirements
The primary functional requirements necessary for the system to operate are
listed in Figure 2; however, each F.R. is defined in detail in the section that
follows.
Figure 2 -List of Functional Requirements
FR8 Logout
Functional Requirements with their respective traceability information
Privileged Access: This access is granted only to the admin and the
instructor panel that is required to log in with authenticated credentials.
Unprivileged Access: This access is granted to all the users who are using
the product demo.
Django web nodes grow horizontally because they have no stored state. Due
to the large open-source community of Django, most of the tools that are
needed to scale application already exists. For example, Amazon Web
Services (A.W.S.) S3 is being used, and Database indexes also make it much
more efficient to look up records by date or other indexed criteria.
The platform will use HTML, CSS, Bootstrap, and react for the front-end of
the application. PostgreSQL will be used for the database services. Django
will be used for back-end services.
1. Reliability
The resulting program will be trustworthy, error-free, and free of bugs. Users
can receive numerous property-related details. When you utilize any of the
app's functions, services will be promptly and accurately provided. The user
will be able to submit feedback in the event of a problem and will receive a
timely response from the administrative personnel.
2. Availability
Accessed by anyone with a stable internet connection anytime as our servers
are running around the clock
3. Maintainability
Our system code will be written in a readable and testable manner hence
allowing debugging and other aspects related to maintainability to be
conducted in an efficient manner
4. Portability
Our system is incredibly portable as it can be launched on any device which
has a web browser and an internet connection.
5. Usability
The system will work failure-free under the specified conditions, e.g., stable
internet connection, etc. Allows multiple instructors to upload attendance and
view past footage through the central database at the same time
6. Scalability
Allows multiple instructors to upload attendance and view past footage
through the central database at the same time
CHAPTER IV: PROPOSED SOLUTION
Architectural Design
The Template is a presentation layer that manages every aspect of the User
Interface. The View is used to execute business logic, interact with a data-
carrying model, and render a template.
View — In the MVT design pattern, the View determines which data to
display.
While Django adheres to the MVC paradigm, it maintains its own standards.
Thus, the framework itself manages the control.
The benefits of this architecture are that it is less coupled, easy to modify, and
suitable for small to large-scale applications.
UML Diagrams
In this section, different views of the system that will be utilized to construct
the application are modeled in Unified Modeling Language (UML) and
explained. Use case diagrams, class diagrams, component diagrams, activity
diagrams, and deployment diagrams are included to provide an overview of
how the internal system will function and how users will interact with the
system.
The first use case diagram depicts the interaction between the instructor and
the system. The instructor has the ability to schedule sessions via the
“capture attendance” interface. These sessions make it possible for the
system to know exactly when to start proctoring for attendance. When the
model is signaled to run via the “trigger model” interface at set times, the
system activates to fill the attendance sheet, this is done via the “generate
report” method in the use case diagram. As an added feature, the instructor
also has the ability to view the reports generated by the model through the
“view data analytics” interface.
The second use case diagram depicts the interaction between the admin and
the system. The admin can upload the dataset onto the system through the
“upload data” interface. The server is responsible for using this data to train
the model. It does this via the “prepare dataset” interface and subsequently
through accessing the “train model” interface.
2. State Diagram
A state diagram is a type of diagram used in computer science and related
fields to show the behavior of systems. State diagrams require that the
system being portrayed has a finite number of states, which is sometimes the
fact and other times a fair simplification. There are several various sorts of
state diagrams, each with its own semantics.
Figure 6 - State Diagram
3. Component Diagram
The instructor and admin components are interfaced with the authenticate
component, which itself makes use of the database component. The
instructor interface relies upon the reports generated by the model.
Preprocessed data from the incoming feed is accessed by the model for
making predictions. The admin interface relies upon the upload data
interface, it is the user’s job to provide proper labels for the data. This data is
then accessed by the model to make predictions for when the system is
applied.
4. Activity Diagram
The system works by turning the camera on, which generates an incoming
video feed for the system. After preprocessing this feed, ML techniques are
used to predict students in the frames. The timestamps, label, and ID of each
student is recorded in a separate file by the model, this file will be called
“analytics”. The instructor may log on to the system at any instance to view
the generated attendance. The system can verify the admin and grant the
ability to upload the dataset. The admin can retrain the model on the new
dataset through the press of a button available on the user interface, this is
particularly useful to train the system to be able to recognize new faces.
Upon deployment, the client is able to send HTTP web requests to the server.
Depending on the request type, the server may choose to access either the
student database or the user database. This will depend on the required
response for the requests. The model is also hosted on the server, which will
run in background upon being triggered by relevant requests.
Initially, we open the images folder, read all the images, store images in the
"images" dictionary and then store the name of the image at the same index
in the "className" dictionary. While storing the name of the image, we
remove the extension and just store the name of the image.
We convert all the images from RGB to grayscale. Next, we detect the faces
in each image and then find the encodings of the face and store them.
We open the camera and perform face detection in real-time. Once the face is
detected, we find the encoding of the face. Using the encoding of the face,
we compare it with all other stored face encodings. If there is an image that
has a match of a distance lower than 0.39, then we label the detected face
with the same label as the stored image and pass it to the
checktimeandmarkAttendence function. If there is no image in the dataset
which compares to a distance lower than 0.39, we label the image as
"Unrecognized" and ignore it.
The mark attendance function will print the Sr no, Name, and entry time of
the individual into the CSV file.
Haar-Features are identical to CNN kernels, with the exception that Haar-
Feature values are manually set, whereas CNN kernel values are determined
by training.
There are several Haar-Features described above. The first two are known as
"edge characteristics" because they detect edges. The third is a "line feature,"
and the fourth is a "four rectangle feature"; both are most likely used to detect
an angled line when haar characteristics are incorporated into a girl's image.
Each feature yields a single value determined by subtracting the sum of pixels
beneath a white rectangle from the sum of pixels beneath a black rectangle.
Figure 18 - Face detection example
AdaBoost:
As indicated previously, a detector with a base resolution of 24x24 may need
the calculation of over 160,000 feature values. However, it must be kept in
mind that only a tiny subset of these traits will be useful for facial recognition.
AdaBoost is used to reduce unnecessary features and choose only the most
useful ones.
Cascading:
We must calculate 2,500 relevant features from the 160,000 features selected
by AdaBoost for each 24x24 window. We must move a 24x24 window across
the entire image, compute 2,500 features for each window, and then take a
linear combination of all outputs to determine if the image exceeds a certain
threshold. Even if an image contains one or more faces, it is evident that a
disproportionately large number of examined sub-windows will be negative
(non-faces). Therefore, the algorithm should focus on eliminating non-faces
rapidly and spending more time on probable face regions due to the high
computational cost of evaluating a single strong classifier created from the
linear combination of the best characteristics on each window.
Instead of calculating 2,500 properties per window, cascades are utilized. We
sample 2,500 attributes and divide them into x unique cascades. In different
cascades, we can now identify the presence of a face in a linear fashion. If
cascade detects a face in the image, it is sent to the next cascade. If no face is
found in the cascade, we can proceed to the next window. This reduces the
complication of time.
The model that was selected performs as expected. It performs with high
precision in a variety of situations and environments. Several tests have
demonstrated that this system is robust, dependable, and scalable. The web
interface can always be customized to meet the needs of different
applications, such as those in locations where identification by other means
is not possible or when full-body personal protective equipment (P.P.E.) is
required. The project met all of the functional and non-functional
requirements; with a few minor adjustments to the user interface, the project
may be transformed into a full-fledged off-the-shelf solution for general
usage. Because of the model's ability to detect unknown individuals, this
research has the potential to be a valuable security tool that may be used to
sound alarms if an unauthorized individual attempt to enter a guarded area.
Figure 21 - A-Syst Homepage
The program collects and compares patterns on a person's face and analyses
the specifics to identify and verify the individual. Despite the complexity of
the underlying process, the entire technique may be boiled down into three
phases.
[4] Nirmalya Kar, Mrinal Kanti Debbarma, Ashim Saha, and Dwijen Rudra
Pal "Study of Implementing Automated Attendance System Using Face
Recognition Technique"
[5] Smit Hapani, Nikhil Parakhiya, Prof. Nandana Prabhu, Mayur Paghda –
"Automated Attendance System using Image Processing" l 2018 Fourth
International Conference on Computing Communication Control and
Automation (ICCUBEA)
[6] Nazare Kanchan Jayant, Surekha Borra – "Attendance Management
System Using Hybrid Face Recognition Techniques" 2016 Conference on
Advances in Signal Processing (CASP) Cummins College of Engineering for
Women, Pune. Jun 9-11, 2016