SlideShare a Scribd company logo
Automatic Attendance
System By Face
Recognition
Supervised by :-
Rajesh Pal Sir
Submitted By:-
Shitanshu Ranjan Srivastava [17-IEC-041]
Aniruddh Singh [17-ICS-008]
Ashwani kumar kushwaha [17/IEC/012]
Himanshu Kumar Singh [R16-IEC-015]
Table Of Content
01 – OUR TEAM
02 – INTRO TO OUR PROJECT
03 - WORKING MODULE
04 - DEMONSTRATION
OUR TEAM
Shitanshu
Ranjan
Srivastava [17-
IEC-041]
Ashwani Kumar
Kushwaha [17-
IEC-012]
Aniruddh
Singh [17-ICS-
008]
Himanshu
Kumar Singh
[R16-IEC-015]
BASICS WE SHOULD KNOW –
1. What do you mean by facial
recognition ?
2. Which model have we used for face
detectiom ?
3. Why has been OpenCV used ?
4. Which algorithm has been used ?
5. How to increase the accuracy of face
recognition ?
6. What is the role of tkinter in this face recognition ?
• The project is made to automate the student’s attendance
overhead by faculty and save time for lectures as well.
• It will also reduce the proxy of attendance to some extent. Not
sure to reduce to 100% until it’s implemented.
• The project is made in python using open CV (Open Source
Computer Vision Library).
• The software will take images of students in database in jpeg
format and this dataset will be trained and detected to identify
that particular student.
• The images can either be took from a class video or directly
through webcam as per convenience of faculty.
Introduction:-
This Photo by Unknown author is licensed under CC BY-NC-ND.
VS code
• Visual Studio
Code is a free
source-code
editor made
by Microsoft
for Windows
Open CV
• It is an image
and video
processing
library with
bindings in C,
C++, python
and java. It
will be used
for our facial
detection
Pandas
• Pandas is the
most popular
python library
that is used
for data
analysis. It
provides
highly
optimized
performance
with back-
end.
NumPy
• NumPy is a
python library
used for
working with
arrays. It also
has functions
for working
in domain of
linear algebra,
Fourier
transform,
and matrices
OpenpyXL
• Openpyxl is
a Python
library for
reading and
writing
Excel files.
The openpyxl
module
allows Python
program to
read and
modify Excel
files.
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.
TOOLS and LIBRARIES USED:-
The Algorithim has four stages
Haar Feature
Selection
Creating
Integral Images
Adaboost
Training
Casading
Classifirers
Detection :- Detection is done by the help of
OpenCV and Haas cascades
This Photo by Unknown author is licensed under CC BY-SA.
Detection :
Detection is done by using HAAR CASCADE Algorithm.
The detection of face is done by clicking on attendance button on portal interface.
ON clicking the attendance button Web-cam or any integrated Camera gets open to
capture the images.
All the sample data of only face is taken and stored in the folder training images in the
root folder of project.
The haar -Cascade feature allows to only capture facial images and that is converted
into Grey scale by using fuction of opencv2 library imported in our project.
Gray= cv2.cvtColor(img, cv2.Color_BGR2GRAY)
To train faces We will be using haarcascade_frontalface_default.xml file
Haar Cascade
Working:
Recognition
OpenCV has three built in face recognizers and thanks to OpenCV's clean coding, you can
use any of them by just changing a single line of code. Below are the names of those face
recognizers and their OpenCV calls.
1. Eigen Faces Face Recognizer - cv2.face.createEigenFaceRecognizer()
2. Fisher Faces Face Recognizer -cv2.face.createFisherFaceRecognizer()
3. Local Binary Patterns Histograms (LBPH) Face Recognizer -
cv2.face.createLBPHFaceRecognition
Local Binary Pattern (LBP) is a simple yet very efficient texture operator which labels the
pixels of an image by thresholding the neighborhood of each pixel and considers the
result as a binary number.
In our project we will use Recognition by LBPH recognizer
Face recognition system
Face recognition system
Local binary patterns histograms (LBPH) Face Recognizer
Process
• We know that Eigenfaces and Fisher faces are both affected by
light and, in real life, we can't guarantee perfect light
conditions. LBPH face recognizer is an improvement to
overcome this drawback.
• Take a 3×3 window and move it across one image. At each
move (each local part of the picture), compare the pixel at the
center, with its surrounding pixels. Denote the neighbors with
intensity value less than or equal to the center pixel by 1 and
the rest by 0.
• After you read these 0/1 values under the 3×3 window in a
clockwise order, you will have a binary pattern like 11100011
that is local to a particular area of the picture. When you finish
doing this on the whole image, you will have a list of local
binary patterns.
• Now, after you get a list of local binary patterns, you convert
each one into a decimal number using binary to decimal
conversion (as shown in above image) and then you make a
histogram of all of those decimal values. A sample histogram
looks like this:
Face recognition system
Face recognition system
Face recognition system
Face recognition system
•ON clicking on attendance button the Camera window pops up.
•The window opens on the same screen and recognizes the face for marking attendance
•On pressing button ‘q’, the attendance gets marked.
Face recognition system
Manage record in Excel files by GUI
• By the help of GUI CRUD operations can be performed in excel
files
Tkinter and openpyxl.
• With help of Tkinter we can make GUI which purpose is to insert
record in excel sheet.
• With the help of OpenPyxl we will access it.
• We will use pandas to convert xlsx to
• csv(Comma Separated Values) file for
• convenience to code and for machine to understand.
Train Image
• •We will use pandas to convert xlsx to csv(Comma Separated Values) file
for convenience to code and for machine to understand.
• •The student details are being entered automatically in excel sheet one
who registers them from GUI directly.
DEMONSTRATON
Face recognition system
THANK YOU...

More Related Content

Face recognition system

  • 1. Automatic Attendance System By Face Recognition Supervised by :- Rajesh Pal Sir Submitted By:- Shitanshu Ranjan Srivastava [17-IEC-041] Aniruddh Singh [17-ICS-008] Ashwani kumar kushwaha [17/IEC/012] Himanshu Kumar Singh [R16-IEC-015]
  • 2. Table Of Content 01 – OUR TEAM 02 – INTRO TO OUR PROJECT 03 - WORKING MODULE 04 - DEMONSTRATION
  • 3. OUR TEAM Shitanshu Ranjan Srivastava [17- IEC-041] Ashwani Kumar Kushwaha [17- IEC-012] Aniruddh Singh [17-ICS- 008] Himanshu Kumar Singh [R16-IEC-015]
  • 4. BASICS WE SHOULD KNOW – 1. What do you mean by facial recognition ? 2. Which model have we used for face detectiom ? 3. Why has been OpenCV used ? 4. Which algorithm has been used ? 5. How to increase the accuracy of face recognition ? 6. What is the role of tkinter in this face recognition ?
  • 5. • The project is made to automate the student’s attendance overhead by faculty and save time for lectures as well. • It will also reduce the proxy of attendance to some extent. Not sure to reduce to 100% until it’s implemented. • The project is made in python using open CV (Open Source Computer Vision Library). • The software will take images of students in database in jpeg format and this dataset will be trained and detected to identify that particular student. • The images can either be took from a class video or directly through webcam as per convenience of faculty. Introduction:-
  • 6. This Photo by Unknown author is licensed under CC BY-NC-ND. VS code • Visual Studio Code is a free source-code editor made by Microsoft for Windows Open CV • It is an image and video processing library with bindings in C, C++, python and java. It will be used for our facial detection Pandas • Pandas is the most popular python library that is used for data analysis. It provides highly optimized performance with back- end. NumPy • NumPy is a python library used for working with arrays. It also has functions for working in domain of linear algebra, Fourier transform, and matrices OpenpyXL • Openpyxl is a Python library for reading and writing Excel files. The openpyxl module allows Python program to read and modify Excel files. 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. TOOLS and LIBRARIES USED:-
  • 7. The Algorithim has four stages Haar Feature Selection Creating Integral Images Adaboost Training Casading Classifirers Detection :- Detection is done by the help of OpenCV and Haas cascades This Photo by Unknown author is licensed under CC BY-SA.
  • 8. Detection : Detection is done by using HAAR CASCADE Algorithm. The detection of face is done by clicking on attendance button on portal interface. ON clicking the attendance button Web-cam or any integrated Camera gets open to capture the images. All the sample data of only face is taken and stored in the folder training images in the root folder of project. The haar -Cascade feature allows to only capture facial images and that is converted into Grey scale by using fuction of opencv2 library imported in our project. Gray= cv2.cvtColor(img, cv2.Color_BGR2GRAY) To train faces We will be using haarcascade_frontalface_default.xml file
  • 10. Recognition OpenCV has three built in face recognizers and thanks to OpenCV's clean coding, you can use any of them by just changing a single line of code. Below are the names of those face recognizers and their OpenCV calls. 1. Eigen Faces Face Recognizer - cv2.face.createEigenFaceRecognizer() 2. Fisher Faces Face Recognizer -cv2.face.createFisherFaceRecognizer() 3. Local Binary Patterns Histograms (LBPH) Face Recognizer - cv2.face.createLBPHFaceRecognition Local Binary Pattern (LBP) is a simple yet very efficient texture operator which labels the pixels of an image by thresholding the neighborhood of each pixel and considers the result as a binary number. In our project we will use Recognition by LBPH recognizer
  • 13. Local binary patterns histograms (LBPH) Face Recognizer Process • We know that Eigenfaces and Fisher faces are both affected by light and, in real life, we can't guarantee perfect light conditions. LBPH face recognizer is an improvement to overcome this drawback. • Take a 3×3 window and move it across one image. At each move (each local part of the picture), compare the pixel at the center, with its surrounding pixels. Denote the neighbors with intensity value less than or equal to the center pixel by 1 and the rest by 0. • After you read these 0/1 values under the 3×3 window in a clockwise order, you will have a binary pattern like 11100011 that is local to a particular area of the picture. When you finish doing this on the whole image, you will have a list of local binary patterns. • Now, after you get a list of local binary patterns, you convert each one into a decimal number using binary to decimal conversion (as shown in above image) and then you make a histogram of all of those decimal values. A sample histogram looks like this:
  • 18. •ON clicking on attendance button the Camera window pops up. •The window opens on the same screen and recognizes the face for marking attendance •On pressing button ‘q’, the attendance gets marked.
  • 20. Manage record in Excel files by GUI • By the help of GUI CRUD operations can be performed in excel files Tkinter and openpyxl. • With help of Tkinter we can make GUI which purpose is to insert record in excel sheet. • With the help of OpenPyxl we will access it. • We will use pandas to convert xlsx to • csv(Comma Separated Values) file for • convenience to code and for machine to understand.
  • 22. • •We will use pandas to convert xlsx to csv(Comma Separated Values) file for convenience to code and for machine to understand. • •The student details are being entered automatically in excel sheet one who registers them from GUI directly.