A MATLAB based system to take attendance in a classroom automatically using a camera. This project was carried out as a final year project in our Electronics and Communications Engineering course. The entire MATLAB code I've uploaded it in mathworks.com. Also the entire report will be available at academia.edu page. Will be delighted to hear from you.
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
Automated attendance system based on facial recognition
1. Project Guide : Asst. Prof. Chethan R
Team Members
Automated Attendance System
based on Facial Recognition
Rakshitha Suvarna
S R Dhanush
Shreeraksha Shetty
Sushmitha Acharya
4MW12EC059
4MW12EC065
4MW12EC075
4MW12EC088
2. • Objective
• Literature Survey
• Methodology
• MATLAB toolbox
• Viola-Jones algorithm
• Eigenface approach to face recognition
• System implementation
• Results and analysis
• Pros and cons
• Applications
• Future scope and conclusion
• References
Contents
3. In this project we aim to build an Attendance marking system with the
help of facial recognition owing to the difficulty in the manual as well as
other traditional means of attendance system.
Objective
4. • “Eigenfaces for Recognition” [1],(Matthew Turk and Alex Pentland)
• “Fast Face Recognition Using Eigen Faces” [2], (Arun Vyas, Rajbala
Tokas)
• “ Robust Real-Time Face Detection” [3], ( Paul Viola and Michael J.
Jones)
Literature Survey
6. • Camera captures the image of a classroom
• The faces are detected and cropped
• Cropped images are processed using Eigen face recognition algorithm
• The students whose faces are recognized are marked as present and the
results are transferred to an excel sheet automatically
7. MATLAB (matrix laboratory) is a
multi-paradigm numerical computing
environment and fourth-generation
programming language. Its one of the
easiest and most productive software
development environment for
engineers.
MATLAB
8. • Image processing toolbox
• Image acquisition toolbox
• Computer vision toolbox
• Spreadsheet Link Ex
MATLAB toolboxes used
9. • This is used for face detection process
Three basic steps of algorithm
1. Integral image for feature computation
2. Adaboost algorithm for feature selection
3. Cascade classifiers
Viola-Jones Algorithm
10. First step of the Viola-Jones face detection algorithm is to turn the input image into an integral
image. This is done by making each pixel equal to the entire sum of all pixels above and to the
left of the concerned pixel.
1 1 1
1 1 1
1 1 1
Input image
1 2 3
2 4 6 Sum of gray value = D-(B+B) + A
3 6 9
Integral image
Integral Image
11. • As stated above there can be calculated approximately 160.000 feature values within a
detector at base resolution.
• AdaBoost is a machine learning boosting algorithm capable of constructing a strong
classifier through a weighted combination of weak classifiers. A weak classifier is
mathematically described as:
h(x,f,p,t)=1 pf(x)>t
0 else
• Where x is a 24*24 pixel sub-window, f is the applied feature, p the polarity and t the
threshold that decides whether x should be classified as a positive (a face) or a
negative (a non-face)..
AdaBoost Algorithm
12. • In stead of finding faces, the algorithm should discard non-face
Cascade Classifiers
13. • Face is a typical multidimensional structure and needs good computational analysis for
recognition
• Many face features make development of facial recognition systems difficult.
• This problem is solved by the method called Principal Component Analysis or so called
eigen face approach.
• This approach transforms faces into a small set of essential characteristics, eigenfaces,
which are the main components of the initial set of learning images (training set).
• Recognition is done by projecting a new image in the eigenface subspace, after which the
person is classified by comparing its position in eigenface space with the position of known
individuals
Eigenface approach to Face Recognition
14. • The first thing we need to do is to form a training data set. 2D image Ii can be
represented as a 1D vector by concatenating rows . Image is transformed into a vector
of length N = mxn.
𝐼 =
𝑥11 𝑥12 ⋯ 𝑥1𝑛
𝑥21 𝑥22 ⋯ 𝑥2𝑛
⋮ ⋮ ⋱ ⋮
𝑥 𝑚1 𝑥 𝑚2 ⋯ 𝑥 𝑚𝑛 𝑚𝑥𝑛
𝐶𝑂𝑁𝐶𝐴𝑇𝐸𝑁𝐴𝑇𝐼𝑂𝑁
𝑥11
⋮
𝑥1𝑛
⋮
𝑥2𝑛
⋮
𝑥 𝑚𝑛
= 𝑥 (1)
• Let M such vectors xi (i = 1, 2... M) of length N form a matrix of learning images, X.
• First we determine the vector of mean values Ψ, and then subtract that vector from
each image vector.
• Ψ =
1
𝑀 𝑖=1
𝑀
𝑥𝑖 (2)
15. • Averaged vectors are arranged to form a new training matrix (size NxM)
• 𝐴 = Φ1, Φ2, Φ3, Φ4 … (4)
• The next step is to calculate the covariance matrix C, and find its eigenvectors and eigenvalues
Where 𝐶 = 𝐴𝐴 𝑇
(5)
• Covariance matrix C has dimensions NxN .
• From that we get N eigen values and eigenvectors.
• If νi and μi are eigenvectors and eigen values of matrix C, eigenvector associated with the highest
eigenvalue reflects the highest variance, and the one associated with the lowest eigenvalue, the
smallest variance.
• Therefore, the vectors should be sorted by eigenvalues so that the first vector corresponds to the
highest eigenvalue .
• These vectors are then normalized. They form the new matrix E so that each vector is a column
vector. The dimensions of this matrix are NXD, where D represents the desired number of
eigenvectors.
16. • The last step is the recognition of faces.
• Image of the person we want to find in training set is transformed into a vector P, reduced by
the mean value Ψ and projected with a matrix of eigenvectors (eigenfaces)
• 𝜔 = 𝐸 𝑇
𝑃 − Ψ (7)
• Classification is done by determining the distance, εi, between ω and each vector of matrix Y.
• Where 𝑌 = 𝐸 𝑇
𝐴 (8)
• The most common is the Euclidean distance.
• If A and B are two vectors of length D, the Euclidean distance between them is determined as
follows
• 𝑑 𝐴, 𝐵 = 𝑖=1
𝐷
(𝑎𝑖 − 𝑏𝑖)2 = 𝐴 − 𝐵 (9)
• If the minimum distance between test face and training faces is higher than a threshold θ, the
test face is considered to be unknown; otherwise it is known and belongs to the person in the
database.
17. • System Flowchart
System Implementation
Start
Image Processing
Update the attendance sheet in
MS Excel
26. The system we have developed has successfully able to accomplish the
task of marking the attendance in the classroom automatically and output
obtained in an excel sheet as desired in real time. Another important aspect
where we can work is towards creating an online data base of the
attendance and its automatic updating, keeping in mind growing
popularity of internet of things.
Future Scope
27. In the system we have implemented an attendance system for a lecture,
section or laboratory by which lecturer or teaching assistant can record
student attendance. Its saves time and effort, especially if it is a lecture
with huge number of students.
Conclusion
28. [1] M. T. a. A. Pentland, "Eigenfaces For Recognition," Journal of Cognitive Neuroscience, vol. 3, no. 1, 1991.
[2] A. V. a. R. Tokas, "Fast Face Recognition Using Eigen Faces," IJRITCC, vol. 2, no. 11, pp. 3615-3618, November 2014.
[3] Paul Viola and Michael J. Jones, "Robust Real-Time Face Detection," International Journal of Computer Vision, vol. 57, no. 2, pp.
137-154, May 2004.
[4] N. J. M. M. K. a. H. A. Mayank Agarwal, "Face Recognition Using Eigenface approach," IRCSE, vol. 2, no. 4, pp. 1793-8201,
August 2010.
References