An Efficient Attendance Management Sytem based on...

8
71 Preeti Mehta, Dr. Pankaj Tomar International Journal of Engineering Technology Science and Research IJETSR www.ijetsr.com ISSN 2394 3386 Volume 3, Issue 5 May 2016 An Efficient Attendance Management Sytem based on Face Recognition using Matlab and Raspberry Pi 2 Preeti Mehta, M.tech Student Mechanical and Automation Department IGDTUW , New Delhi, India Dr. Pankaj Tomar, Assistant Professor Mechanical and Automation Department IGDTUW , New Delhi, India AbstractA facial recognition system is an application of computer vision which is capable of performing two basic tasks of identification and verification of person. With the advent of image processing techniques automatic face recognition is a popular research topic. Conventionally attendance in schools, institutes and universities are taken by professors and records are stored in registers. This approach waste a lot of time. The objective of this paper is to instigate a new approach for taking attendance automatically. Local features are extracted by using two techniques Local Binary Pattern (LBP) and Histogram of Oriented Gradients (HOG) which are used for recognition of faces of respective students from stored database for attendance marking. Support vector machine (SVM) classifier is used for comparing database stored features with extracted features from captured images of students. Keywordslocal binary pattern, histogram of oriented gradients, matlab, raspberry pi, support vector machine, viola- jones algorithm. 1. INTRODUCTION The face is not merely a set of facial features but it is rather something meaningful. It is an identity of a person and people adapt to response more to face than other body parts of human. Among the available biometric techniques face recognition is a popular research topic with number of applications in several industrial areas including surveillance and security, entertainment and virtual reality and human-machine interactions. With the advent in image processing technology making computers perform face recognition has become easier. Maintaining attendance record in educational institutes is an important part of enhancing the quality of education as attendance points are added at the end of semester. Traditionally attendance is marked manually by teachers and they must make sure correct attendance is marked for respective student. This whole process waste a lot of time of lecture duration and due to large strength of students fraudulent and proxy cases are not intercepted. Every institute has its own way of taking attendance. Some uses this old manual way for marking attendance some uses RF Id for marking attendance [1]. Other biometric techniques such as iris, retina, thumb impression, palm identification, ear recognition [2] is used. But all these methods also waste students’ time as long queues are formed for marking attendance. Face recognition on the other hand advantage over these above mentioned techniques as it is nonintrusive, contact-free and has natural acquisition. Universality, permanence, uniqueness, performance and measurability are the factors which need to be satisfied by a biometric identifier [3]. Many ideas have been proposed by researchers for biometric attendance system. G. Lakshmi et al. developed a system for managing students with Open CV and raspberry pi module that is interfaced with fingerprint device [1]. Aziza Ahemdi et al. [4] proposed an automatic attendance structure using techniques such as Adaboost for face detection and local binary pattern and histogram of orientation for features extraction. In paper [5], embedded attendance management system on linux is presented which skin classification and histogram normalization techniques. Similarly in paper by Naveed Khan Balcoh et al. image enhancement and skin classification techniques have been used. Abhishek Jha in paper [7] describes the working of automated attendance system using different color based techniques for face detection and Principal Component Analysis (PCA) for face recognition. In paper [8] also PCA and Eigen face algorithm is used for recognition of face. In paper by Prabhhjot Singh, PCA technique in Matlab has been implemented successfully [9]. There are plenty of face recognition algorithm are available and Chaoyang et al. in [10] has

Transcript of An Efficient Attendance Management Sytem based on...

Page 1: An Efficient Attendance Management Sytem based on …ijetsr.com/images/short_pdf/1462951082_giit259_ijetsr.pdfRecognition using Matlab and Raspberry Pi 2 Preeti Mehta, M.tech Student

71 Preeti Mehta, Dr. Pankaj Tomar

International Journal of Engineering Technology Science and Research

IJETSR

www.ijetsr.com

ISSN 2394 – 3386

Volume 3, Issue 5

May 2016

An Efficient Attendance Management Sytem based on Face

Recognition using Matlab and Raspberry Pi 2

Preeti Mehta,

M.tech Student

Mechanical and Automation Department

IGDTUW , New Delhi, India

Dr. Pankaj Tomar,

Assistant Professor

Mechanical and Automation Department

IGDTUW , New Delhi, India

Abstract—A facial recognition system is an application of computer vision which is capable of performing two basic

tasks of identification and verification of person. With the advent of image processing techniques automatic face

recognition is a popular research topic. Conventionally attendance in schools, institutes and universities are taken by

professors and records are stored in registers. This approach waste a lot of time. The objective of this paper is to

instigate a new approach for taking attendance automatically. Local features are extracted by using two techniques

Local Binary Pattern (LBP) and Histogram of Oriented Gradients (HOG) which are used for recognition of faces of

respective students from stored database for attendance marking. Support vector machine (SVM) classifier is used for

comparing database stored features with extracted features from captured images of students.

Keywords—local binary pattern, histogram of oriented gradients, matlab, raspberry pi, support vector machine, viola-

jones algorithm.

1. INTRODUCTION

The face is not merely a set of facial features but it is rather something meaningful. It is an identity of a person

and people adapt to response more to face than other body parts of human. Among the available biometric

techniques face recognition is a popular research topic with number of applications in several industrial areas

including surveillance and security, entertainment and virtual reality and human-machine interactions. With

the advent in image processing technology making computers perform face recognition has become easier.

Maintaining attendance record in educational institutes is an important part of enhancing the quality of

education as attendance points are added at the end of semester. Traditionally attendance is marked manually

by teachers and they must make sure correct attendance is marked for respective student. This whole process

waste a lot of time of lecture duration and due to large strength of students fraudulent and proxy cases are not

intercepted.

Every institute has its own way of taking attendance. Some uses this old manual way for marking attendance

some uses RF Id for marking attendance [1]. Other biometric techniques such as iris, retina, thumb

impression, palm identification, ear recognition [2] is used. But all these methods also waste students’ time as

long queues are formed for marking attendance. Face recognition on the other hand advantage over these

above mentioned techniques as it is nonintrusive, contact-free and has natural acquisition. Universality,

permanence, uniqueness, performance and measurability are the factors which need to be satisfied by a

biometric identifier [3]. Many ideas have been proposed by researchers for biometric attendance system. G.

Lakshmi et al. developed a system for managing students with Open CV and raspberry pi module that is

interfaced with fingerprint device [1]. Aziza Ahemdi et al. [4] proposed an automatic attendance structure

using techniques such as Adaboost for face detection and local binary pattern and histogram of orientation for

features extraction. In paper [5], embedded attendance management system on linux is presented which skin

classification and histogram normalization techniques. Similarly in paper by Naveed Khan Balcoh et al. image

enhancement and skin classification techniques have been used. Abhishek Jha in paper [7] describes the

working of automated attendance system using different color based techniques for face detection and

Principal Component Analysis (PCA) for face recognition. In paper [8] also PCA and Eigen face algorithm is

used for recognition of face. In paper by Prabhhjot Singh, PCA technique in Matlab has been implemented

successfully [9]. There are plenty of face recognition algorithm are available and Chaoyang et al. in [10] has

Page 2: An Efficient Attendance Management Sytem based on …ijetsr.com/images/short_pdf/1462951082_giit259_ijetsr.pdfRecognition using Matlab and Raspberry Pi 2 Preeti Mehta, M.tech Student

72 Preeti Mehta, Dr. Pankaj Tomar

International Journal of Engineering Technology Science and Research

IJETSR

www.ijetsr.com

ISSN 2394 – 3386

Volume 3, Issue 5

May 2016

shown the collation of three face recognition algorithms namely PCA, Linear Discriminant Analysis (LDA)

and Elastic Bunch Graph Matching (EBGM) implemented with Matlab. Paper [11], [12] uses the idea of

continuous observation and integral validation process which enhance the reliability and performance of the

system. There are many papers available for automatic attendance management system that uses PCA

algorithm for face recognitions including papers [13] and [14] which implement the program on Open CV and

light tool kit.

In this paper, our purpose is to obtain an automatic attendance system implemented with raspberry pi camera

module and Matlab R2014a version. This paper is divided into following sections as section I includes the

introduction and literature survey, section II includes the system description, section III

goes with the used algorithm explanation, section IV with the practical implementation with section V and VI

ending with the results and future scopes.

2. SYSTEM DESCRIPTION

2.1. Hardware

The system includes raspberry pi 2 model B module with raspberry pi camera module for capturing the

classroom image/ video. Raspberry pi 2 is a credit card sized minicomputer. It has 900 MHz quad-core ARM

Cortex-A7 CPU, ram of 1 GB, 4 USB ports out of which one port is connected for Wi-Fi connector, 40 GPIO

pins for interfacing external devices, CSI (camera serial interface) port for camera connection. Raspberry pi

have its own camera which is light in weight and small in size. It has a still resolution of 5 MP. It can operate

in both image capturing and video mode with the resolution of 1080p30, 720p60, 640p480. The properties of

camera such as region of interest, frame rate, mode of operation etc. can be changed in Matlab when setting

up connection. Figure (1), shows the raspberry pi 2 with camera module.

Figure 1: Raspberry Pi 2 and Camera Module

2.2 Software

The Matlab R2014a is used for implemented the algorithms Viola-Jones, Local Binary Pattern and histogram

of Oriented Gradient. Matlab support package for raspberry pi hardware is installed for building up a

communication link between Matlab and microcontroller. This will help in acquiring data from sensors and

imaging devices connected to the controller board and process them in Matlab. The connection between the

hardware and software can be wired or wireless as per our need.

Page 3: An Efficient Attendance Management Sytem based on …ijetsr.com/images/short_pdf/1462951082_giit259_ijetsr.pdfRecognition using Matlab and Raspberry Pi 2 Preeti Mehta, M.tech Student

73 Preeti Mehta, Dr. Pankaj Tomar

International Journal of Engineering Technology Science and Research

IJETSR

www.ijetsr.com

ISSN 2394 – 3386

Volume 3, Issue 5

May 2016

2.3. Flow Chart

3. ALGORITHMS

This section describes the algorithms used for the system. The system is divided into four sections as:

Face detection by Viola-Jones algorithm.

Pre-processing of image.

Features extractions using LBP and HOG.

Face Recognition using Support Vector Machine (SVM).

3.1. Viola – jones Algorithm for Face Detection

The image processing is mainly divided into two tasks, detection and recognition. Detection is defined as

identification of faces and/or extraction of faces from an image. Recognition on the other hand is retrieval of

similar images from a give database of face images. Viola-Jones technique is a most popular technique used

for detecting objects but mainly used for face detection. Rectangular features selection with classified training

and feature selection using Adaboost technique is used. In the end degenerative tree of classifier is formed.

Four main steps are used in this algorithm. Haar feature selection, creating integral image, Adaboost training

followed by cascade classifiers in the end [15].

Haar features are similar to that of kernel convolutions. There are total five types of haar features used for

face detection. The Each feature results in single value which is calculated by subtracting the sum of pixels

under white region from the sum of pixels under black region. Figure (2), show the commonly used haar

features.

Figure 2: Haar Features

Integral image is to reduce the computational time. In this the value at any pixel cell is the addition of

pixels above and to the left of it. Then the sum of all pixels in a rectangle can be calculated easily form the

four values at the corner rectangle of integral image.

Camera

Face Detection

Pre- Processing

Features Extraction

Face Recognition

Attendance Marking

Database

Page 4: An Efficient Attendance Management Sytem based on …ijetsr.com/images/short_pdf/1462951082_giit259_ijetsr.pdfRecognition using Matlab and Raspberry Pi 2 Preeti Mehta, M.tech Student

74 Preeti Mehta, Dr. Pankaj Tomar

International Journal of Engineering Technology Science and Research

IJETSR

www.ijetsr.com

ISSN 2394 – 3386

Volume 3, Issue 5

May 2016

Adaboost also know as adaptive boost is used for relevant features selection from the 160,000+

features calculated from 24x24 window size. Adaboost contruct a strong classifier from a linear combination

of weighted weak classifiers and is a machine learning algorithm given by eq. (1)

F(x) = a1f1(x) + a2f2(x) + a3f3(x) + ……. (1)

Where,

F(x) is strong classifier, f1(x), f2(x) and so on are weak classifiers, a1, a2 and so on are weighted values and x is

an image.

Cascade classifier is used in the end of Viola Jones Algorithm. In this stages are formed which

composes of strong feature classifier formed by Adaboost technique. These stages are used to identify whether

the sub window is a face or non face. It forms a degenerated tree as shown in figure (3).

Figure 3: Cascade Classifier

3.2. Local Binary Pattern

It is a most popular feature descriptor used for face recognition and texture classification. LBP value each

pixel value into binary digits i.e. either 0 or 1. Mathematically, it can be explained as follow [16]:

Given a central pixel valued Pc in an image, its neighboring pixels (P0, P1, P2,… Pi-1) is selected by using

radial filter. The response at Pc is calculated by:

LBP = 𝑠(𝑃𝑖 − 𝑃𝑐)𝑖−1𝑖=0 2𝑖 (2)

Where,

s(x) = { 1, x ≥ 0

0, x < 0

The coordinates for each sampling iteration is calculated by circular coordinate system with center Pc and

coordinates given by (Rcos (2πi / P), (Rsin (2πi/P)) where P is the total number of involved neighboring pixels

and R is the radius around centered pixel. mixed units, clearly state the units for each quantity that you use in

an equation.

Value of D pixel

is given by,

D+A – (B+C) D

C

A B

1 2 3

All sub windows

Processing

Rejected sub windows

F

F F

Page 5: An Efficient Attendance Management Sytem based on …ijetsr.com/images/short_pdf/1462951082_giit259_ijetsr.pdfRecognition using Matlab and Raspberry Pi 2 Preeti Mehta, M.tech Student

75 Preeti Mehta, Dr. Pankaj Tomar

International Journal of Engineering Technology Science and Research

IJETSR

www.ijetsr.com

ISSN 2394 – 3386

Volume 3, Issue 5

May 2016

Histogram is then built to represent the features by using the above calculated LBP value as :

H (k) = 𝑓(𝐿𝑃𝐵𝑃,𝑅 𝑖, 𝑗 ,𝑘)𝑗𝑗=0

𝑖𝑖=0 (3)

Where k € [0, K]

F(x, y) = {1, x = y

0, otherwise.

K is the maximum LBP value.

3.3. Histogram of Orientation Gradients

It is another most popular feature descriptor used for face recognition [17]. The functioning of this algorithm

is simple. First it computes the gradient of a grey image which is obtained by calculating the x and y direction

derivatives using convolution functions as:

Ix = I × Dx (4)

Iy = I × Dy

Where Dx and Dy are kernels as [-1 0 1] and [1 0 -1] T

respectively.

Then the magnitude, M and orientation angle, Ɵ is calculated:

M = √ Ix2 +Iy

2 and Ɵ = tan

-1 Iy/Ix (5)

The orientation returns a value in between [-180°, 180°]. The next step is to calculate the cell histograms

which is computed for 9 bins varying from [0°, 180°] interval for cell size of 8x8 pixels which will be used for

block descriptors.

The cells are grouped into blocks and normalization of histograms is computed and arranged into 1-D

array.

4. IMPLEMENTATION

An attendance management system is proposed here using Matlab R2014a and Raspberry pi 2 using computer

vision toolbox as:

Formation of students’ database.

Capturing of class room video.

Frame selection from the video.

Face detection by Viola-Jones algorithm

Features extraction by LBP and HOG algorithms.

Face recognition by comparing with database stored features.

Marking of attendance in database.

Following are the screenshots of the implemented project.

4.1. Video Acquisition

The video is record with Raspberry Camera module connected in class room such that the region of interest

captures all the student faces. The camera is connected to the controller board and will transmit the video via

wireless connection using wifi dongle to the Matlab for processing.

Identify applicable sponsor/s here. If no sponsors, delete this text box (sponsors).

Page 6: An Efficient Attendance Management Sytem based on …ijetsr.com/images/short_pdf/1462951082_giit259_ijetsr.pdfRecognition using Matlab and Raspberry Pi 2 Preeti Mehta, M.tech Student

76 Preeti Mehta, Dr. Pankaj Tomar

International Journal of Engineering Technology Science and Research

IJETSR

www.ijetsr.com

ISSN 2394 – 3386

Volume 3, Issue 5

May 2016

Figure 4: Group Photo of Students

4.2. Image conversion

A frame will be selected from the video. The selected image will be in RGB format that will be converted into

grey-scale image for further processing.

Figure 5: RGB to Grey Conversion

4.3. Face Detection

The faces will be detected by Viola-Jones Algorithm. The Matlab provides an inbuilt system object from

Computer Vision Toolbox vision.CascadeObjectDetector for face detection application [15].

Figure 6: Detected Faces

4.4. Pre- Processing of Image

The features will be extracted from the cropped detected faces after pre-processing of images. The pre-

processing step will include the contrast improvement using function imadjust, background removal using

strel function, and converting the grey-scale image into black and white image with removal of small objects

from binary image with bwareaopen function

Page 7: An Efficient Attendance Management Sytem based on …ijetsr.com/images/short_pdf/1462951082_giit259_ijetsr.pdfRecognition using Matlab and Raspberry Pi 2 Preeti Mehta, M.tech Student

77 Preeti Mehta, Dr. Pankaj Tomar

International Journal of Engineering Technology Science and Research

IJETSR

www.ijetsr.com

ISSN 2394 – 3386

Volume 3, Issue 5

May 2016

Figure 7: Pre-Processing of Cropped Faces

4.5. Features Extraction

The features will be extracted from the processed image. Total six features will be extracted, three features

nose, mouth and eyes each with two algorithms LBP and HOG and will be stored in the database for face

recognition.

Figure 8: (a) Mouth, (b) Nose, (c) Eyes Feature Extraction

4.6. Face Recognition

The features extracted from the image will be compared with the stored features in database with the help of

SVM. If the system recognizes the features, corresponding name with the features stored will be marked will

present attendance in the database of students detailed.

5. CONCLUSIONS

Despite the low accuracy of face recognition as compared to other biometric techniques our automatic

attendance marking system is functioning with accuracy of 92% as out of 12 faces, 11 faces are recognized

successfully and preserve time wastage when attendance is performed manually. The system is user friendly,

easy to use and reliable which provides more security, privacy and well organized data on board. The system

supports multi-model biometric system which other biometric techniques do not support. The scope of

improvement is always there by improving the images quality and increasing the processor speed for real-

time implementation.

Page 8: An Efficient Attendance Management Sytem based on …ijetsr.com/images/short_pdf/1462951082_giit259_ijetsr.pdfRecognition using Matlab and Raspberry Pi 2 Preeti Mehta, M.tech Student

78 Preeti Mehta, Dr. Pankaj Tomar

International Journal of Engineering Technology Science and Research

IJETSR

www.ijetsr.com

ISSN 2394 – 3386

Volume 3, Issue 5

May 2016

6. FUTURE SCOPE

The speed of RAM can improve. More features can be extracted or hybrid feature method can be used for face

recognition. Database management languages can be used for online availability of attendance record which

can be accessed by parents and students individually. Mobile application software can be developed for easy

assessment of records. Multi- cameras can be used so that efficiency can be increased.

REFERENCES

[1] G. Lakshmi Priya, M. Pandimadevi, G. Ramu Priya, and P. Ramya, “Implementation of Attendance

Management Systen using SMART-FR,” Intenational Journal Of Advnce Research Computer And

Communcation Engineering, vol. 3, issue 11, pp. 8532-8536, November 2014.

[2] Muhammad Fuzail, Hafiz Muhammad Fahad Nouman, Muhammad Omer Mushtaq, Binish Raza, Awais

Tayyab, and Muhammad Waqas Talib, “Face Detection System for Attendance of Class’ Students”,

International Journal Of Multidisciplinary Sciences And Engineering, vol. 5, no. 4, April 2014

[3] Adrian Rhesa Septian Siswanto, Anto Satriyo Nugroho, Maulahikmah Galinium, “Implementation of Face

Recognition Algorithm for Biometrics Based Time Attendance System”, IEEE Conference.

[4] Aziza Ahmedi , 2Dr Suvarna Nandyal, “An Automatic Attendance System Using Image processing”, The

International Journal Of Engineering And Science (IJES), vol. 4, issue 11.

[5] T Muni Reddy1, V Prasad1, N V Ramanaiah, “Face Recognition Based Attendance Management System By

Using Embedded Linux”, IJERST, vol. 4, no, 2, may 2014.

[6] Naveed Khan Balcoh, M. Haroon Yousaf, Waqar Ahmad and M. Iram Baig, “Algorithm for Efficient

Attendance Management: Face Recognition based approach”, IJCSI International Journal of Computer Science

Issues, Vol. 9, Issue 4, No 1, July 2012

[7] Abhishek Jha, “Class Room Attendance System Using Facial Recognition System”, The International Journal of

Mathematics, Science, Technology and Management, Vol. 2 Issue 3.

[8] Priyanka Wagh, Jagruti Chaudhari, Roshani Thakare, Shweta Patil, “Attendance System based on Face

Recognition using Eigen face and PCA Algorithms”, ICGCloT, IEEE conference, 2015.

[9] Prabhjot Singh1 and Anjana Sharma, “Face Recognition Using Principal Component Analysis in MATLAB”,

International Journal of Scientific Research in Computer Science and Engineering,vol. 3, issue 1.

[10] Chaoyang Zhang, Zhaoxian Zhou, Hua Sun, and Fan Dong, “Comparison of Three Face Recognition

Algorithms”, International Conference on Systems and Informatics (ICSAI 2012), IEEE, pp. 1896-1900.

[11] Yohei Kawaguchi, Tetsuo Shoji, Weijane Lin, Koh Kakusho, And Michihiko Minoh, “Face Recognition-based

Lecture Attendance System”, IEEE Conference Publicaton.

[12] Mashhood Sajid, Rubab Hussain, Muhammad Usman, “A Conceptual Model for Automated Attendance

Marking System Using Facial Recognition”. IEEE Conference Publicaton, pp. 7-10, 2014.

[13] Nirmalya Kar, Mrinal Kanti Debbarma, Ashim Saha, and Dwijen Rudra Pal, “Study of Implementing

Automated Attendance System Using Face Recognition Technique”, International Journal of Computer and

Communication Engineering, Vol. 1, No. 2, July 2012.

[14] Ajinkya Patil,and Mrudang Shukla, “Implementation Of Classroom Attendance System Based On Face

Recognition In Class”, International Journal of Advances in Engineering & Technology, Vol. 7, Issue 3, pp.

974-979 July, 2014.

[15] Elena Alionte, Corneliu Lazar, “A Practical Implementation of Face Detection by Using Matlab Cascade Object

Detector, ICSTCC, pp. 785790, 2015.

[16] Mohammed Bennamoun, Yulan Guo, and Ferdous Sohel, “Feature Selection for 2D and 3D Face Recognition”,

Research Gate, January 17, 2015.

[17] O. Déniz, G. Bueno, J. Salido, F. and De la Torre, “Face recognition using Histograms of Oriented Gradients”,

Elsevier, pp. 1598–1603, 20 January 2011.