Research Paper
Engineering
E-ISSN No : 2454-9916 | Volume : 4 | Issue : 6 | June 2018
FACE DETECTION AND RECOGNITION FOR AUTOMATIC ATTENDANCE SYSTEM 1
1
1
1
Amulya S | Nisarga | Pilli Siva Gowtham Reddy | Dr. Hariprasad S A | Sunil M P 1
1
Department of Electronics and Communication Engineering, School of Engineering and Technology, Jain University, Bangalore, India.
ABSTRACT Authentication is that the basic issue in the field of computer primarily based communication. Face recognition is widely utilized in many applications reminiscent of system security and door system. The proposed work describes the way to take student's act victimization face recognition .The face recognition is enforced with the help of Camera and Open CV formula. The system will acknowledge the face of specific student and saves the response in information automatically. The system additionally includes the feature of retrieving the list of students who are absent during a explicit day. The various information is recorded with the assistance of a camera connected as a part of front of the classroom which is able to be continuously taking footage of students, detect the faces in image and it distinguishes appearances alongside the information and mark the attendance. This work initial audit the connected works in the field of participation administration conjointly the face acknowledgment. At that time, it presents our framework structure and plan. Finally, the experiments area unit enforced and it shows the advance of the performance of the attendance system. In this work using Raspberry pi and is employed to find the face with the assistance of OpenCv. KEYWORDS: OpenCv, Raspberry Pi, Pi Camera. I. INTRODUCTION: With the tremendous development within the field of pattern recognition and its applications in numerous areas like biometric authentication, face recognition so on arises the importance of this technology in numerous areas in giant organizations. For a company to be effective it desires correct and quick means that of recording the performance of the individuals within the organization .Biometric recognition has the potential to become Associate in nursing irreplaceable a part of the identification systems used for analysis of the performance of these folks operating among the organization. Face recognition could be a technique of biometric recognition. it's thought-about to be one in every of the foremost prospering applications of image analysis and process, that is that the main reason behind the nice attention that has been given within the past years. The face recognition method is similar to the overall biometric recognition method, within the face biometric systems detection method like alignment, feature extraction, and matching surface. The face recognition method is often divided into 2 main stages: process before detection wherever face detection and alignment occur (localization and normalization), and later on recognition occur through feature extraction and matching steps. II. LITERATURE REVIEW: The paper attendance system the automatic attendance was proposed [1], the system consists of a camera that captures the images of the classroom and sends it to the image enhancement module. Algorithm is trained for the images of faces and then applied on the class room image for detection of multiple faces in the image. The detected faces are cropped from the image and compared with the face database using an opencv algorithm. [3] The face database consists of templates of face images of individual students that was collected and stored by an enrolment process. In this way the faces of students are verified one by one and the attendance is marked on the server. A time table module is attached to the system to obtain the subject, class, date and time. Teachers come in the class and just press a button to start the attendance process. The system [2] has been enforced in 3 basic steps. The primary step is face detection and extraction. The image is captured by exploitation camera which is taken as input. The frontal face is captured by mistreatment the Open CV Haar Cascade methodology. Once the face is detected, it's regenerate into a gray scale image of 50x50 pixels. The second step is to seek out and train face footage. The system has got to be initialized by feeding it a bunch of training footage of faces. The third step is that face recognition part and identification. Throughout this step the frontal face that is to be recognized, test face, which is then extracted from the respective image. If it's matched means that the student attending is registered with time. Though no current models of Raspberry Pi include Wi-Fi networking hardware on-board, it's attainable to feature wireless. III. PROPOSED SYSTEM: The proposed attendance system chiefly consists of 3 phases; Image acquisition, Face Detection, Face Recognition. The operating of the system is represented as follows: 1.
Image Acquisition: The system consists of a pi camera that captures the pictures of the schoolroom and sends it to the image pre-processing. Then that image is sends for face detection.
2.
Face Detection: This method separates the facial space from the remainder of the background image. The faces area unit keep within the information and detected, when that Face extraction is additionally administered.
3.
Face Recognition: The face image is then compared with the keep image. If the face image is matched with the s1tored image then the face is recognized .Then for that individual student the attending is recorded.
Fig.1. Block diagram of Student attendance report IV. IMPLEMENTATION: Face recognition are often passively refrained from any specific action or participation on the part of the user since face pictures are often acquired from a distance by a camera. this can be significantly useful for security and surveillance functions. Face could be a advanced multidimensional structure and needs smart computing techniques for recognition. There could also be variations in faces because of aging and distractions like beard, modification of hairstyles or glasses etc. features extracted from a face are processed and compared with equally processed faces that are present within the info. If a face is recognized it's bestknown or the system might show an analogous face existing in info else it's unknown .In general, face recognition techniques are often divided into 2 teams supported the face illustration they use appearance-based, that uses holistic texture options and is applied to either whole of the face or specific regions during a
Copyright© 2018, IERJ. This open-access article is published under the terms of the Creative Commons Attribution-NonCommercial 4.0 International License which permits Share (copy and redistribute the material in any medium or format) and Adapt (remix, transform, and build upon the material) under the Attribution-NonCommercial terms.
International Education & Research Journal [IERJ]
9
Research Paper
E-ISSN No : 2454-9916 | Volume : 4 | Issue : 6 | June 2018
face image and feature-based, that uses geometric facial expression like mouth, eyes, brows, cheeks etc. . The student needs to be ahead of a camera at a minimum distance .The system can find the image of the student consistent with the Eigan face and Open CV algorithmic program converts it into a grey scale and stores it in a very file. Once the student reappears before the camera, faces are recognized by comparison the Eigen faces of current and keep images. Then the names of the detected faces are kept in info. This project effectively defines the automatic attendance system based on face recognition to implement on schools/colleges. The system takes attendance for particular quantity of your time and when the time expires the system mechanically closes the attendance. The results of the experiment shows improved performance within the estimation of attending compared to ancient pen and paper kind attending system. The present work is principally focused on face detection and extraction by Open CV within the pictures exploitation wireless mode Wi-Fi. In any work we are going to be supposed to enhance face recognition’s limitations and additionally by comparing 3D face pictures with second face pictures (Real time).Also we have a tendency to ar supposed to enhance on multiple face recognition at a similar time in order that the effectiveness of your time will still be managed and take a look at to enhance on the portability of the system
adding every candidate’s personal details.2.Student Face detection: The freshly registered candidate’s face gets detected for the very 1st time and hold on within the info. Attendance System: This constitutes the second section of our project module. The popularity of every individual student takes place by extracting the common options of every individual by exploitation image integral technique. Then the face image is matched with the image hold on within the info and therefore the attendance is marked for the candidate providing the facial feature of the freshly captured image matches with the already hold on image. Exit: It takes the system out of the module.
A. OpenCV: OpenCV (Open source computer Vision) could be a common computer vision library started by Intel in 1999. This cross platform library mainly setup its unique and specialize in real-time image processing and this also a part of patent free implementations of the upcoming latest computer vision algorithms. OpenCV comes with a packages and programming connection with respect to C, C++, Python and android. B. Raspberry Pi 3: The Raspberry pi is a single computer board with mastercard size, which will be used for several tasks that your computer does, like games, data processing, spreadsheets and conjointly to play HD video. It had been established by the Raspberry pi foundation from the United Kingdom. It’s been prepared for public consumption since 2012 with the concept of constructing a affordable academic personal computer. The main purpose of planning the raspberry pi board is, to encourage learning, experimentation and innovation for college level students. The raspberry pi board could be a transportable and low price.
Fig.2. Raspberry Pi 3 C. Pi Camera: The Raspberry Pi Camera Module is a customized add-on for Raspberry Pi. This interface uses the dedicated CSI interface that was designed particularly for interfacing to cameras. The CSI bus is capable of very high information rates, and it completely carries pixel information. Raspberry pi Camera Board plugs directly into the CSI connector on the Raspberry Pi. It's able to deliver a crystal clear 5MP resolution image or 1080p HD video at 30fps with latest v1.3. Board options a 5MP (2592 × 1944 pixels) Omnivision 5647 sensor in a very mounted focus module. The module attaches to Raspberry Pi, by manner 1of a fifteen pin Ribbon Cable, to the dedicated fifteen pin MIPI Camera Serial Interface (CSI) that was designed particularly for interfacing to cameras. The CSI bus is capable of very high information rates, and it solely carries pixel information to the BCM2835 processor.
Fig.4. Flow Chart A. Face Count Algorithm: Ÿ The detect MultiScale function is a general function that detects objects. Since we are calling it on the face cascade, that’s what it detects. Ÿ
The first option is the grayscale image.
Ÿ
The second is the scale Factor. Since some faces may be closer to the camera, they would appear bigger than the faces in the back. The scale factor compensates for this.
Ÿ
The detection algorithm uses a moving window to detect objects. Min Neighbors defines how many objects are detected near the current one before it declares the face found. Min Size, meanwhile, gives the size of each window.
B. Template Matching: Template Matching is a method for searching and finding the location of a template image in a larger image. OpenCV comes with a function cv2. matchTemplate () for this purpose. It simply slides the template image over the input image (as in 2D convolution) and compares the template and patch of input image under the template image. Several comparison methods are implemented in OpenCV. It returns a greyscale image, where each pixel denotes how much does the neighbourhood of that pixel match with template. If input image is of size (WxH) and template image is of size (wxh), output image will have a size of (W-w+1, H-h+1). Once you got the result, you can use cv2.minMaxLoc() function to find where is the maximum/minimum value. Take it as the top-left corner of rectangle and take (w,h) as width and height of the rectangle. That rectangle is your region of template. It has two primary componentsSource image (I): The image in which we expect to find a match to the template image. Template image (T): The patch image which will be compared to the template image. C. Approach to Solve Template Matching: There have been two approaches to solve template matching problem: Ÿ
Full Search (FS): This algorithm computes the distance between q and all template-sized sub-windows in the image and returns either the patch with the smallest distance or all the patches with distance below a threshold T.
Ÿ
Fast Fourier Transform (FFT) approach: This algorithm has been traditionally used for accelerating pattern matching in the L2norm(vector norm) especially for large pattern sizes where the idea is based on L2norm observations between two M pixels-sized sub-windows.
Fig.3. Raspberry PI Camera module V. METHODOLOGY: Student Management: This constitutes the primary section of our project module. This section consists following parameters: 1.Student Registration type, the student seems as a brand new candidate for registration. Registration consists of
10
D. Working of Template matching: The template image simply slides over the input image (as in 2D convolution)
Ÿ
International Education & Research Journal [IERJ]
Research Paper Ÿ
E-ISSN No : 2454-9916 | Volume : 4 | Issue : 6 | June 2018
The template and patch of input image under the template image are compared.
Ÿ
The result obtained is compared with the threshold.
Ÿ
If the result is greater than threshold, the portion will be marked as detected.
Ÿ
I n t h e f u n c t i o n c v 2 . m a t c h Te m p l a t e ( i m g _ g r a y, t e m p l a t e , cv2.TM_CCOEFF_NORMED) the first parameter is the main image, second The Matching Methods Available in Open CV:
ex: select(1) ('hello', 'P') ('hi', 'P') ('how', 'N') select(2)
Ÿ
Parameter is the template to be matched and third parameter is the method used for matching.
OpenCV implements Template matching in the function match Template. The available methods are 6: Ÿ method=CV_TM_SQDIFF Ÿ
method=CV_TM_SQDIFF_NORMED
Ÿ
method=CV_TM_CCORR
Ÿ
method=CV_TM_CCORR_NORMED
Ÿ
method=CV_TM_CCOEFF
Ÿ
method=CV_TM_CCOEFF_NORMED
('hello', 'N') ('hi', 'N') ('how', 'N') VI. RESULTS AND ANALYSIS: A. Face Detection:
E. Face Recognition: To make a face recognition program, initial we need to coach the recognizer with dataset of antecedently captured faces alongside its ID, to Illustrate we've 2 person then person can have ID one and second person can have ID 2, in order that all the photographs of person one within the dataset can have ID one and every one the photographs of the 2d person within the dataset can have ID 2, then we are going to use those dataset pictures to coach the recognizer to predict the one of associate degree freshly conferred face from the live video frame. F. Algorithm for Face Recognition: 1. Dataset Creator. 2. Trainer. 3. Detector. Ÿ
Starts capturing frames from the camera object
Ÿ
Convert it to Gray Scale
Ÿ
Detect and extract faces from the images
Ÿ
Use the recognizer to recognize the Id of the user
Ÿ
Put predicted Id/Name and Rectangle on detected face
Fig. 5. Detection of Faces By running the OpenCV python Code detected number of faces-8 faces found. A. Template Matching:
G. Database Using SQLITE: Database Using SQLITE: Here we have created a python program that connects to sqlite database. Sqlite database does not require any pre installation and saves database as file in the current working directory. So the database.py consists of three functions init, update, select init()-> it takes one argument i.e list of names and it creates a datbase with names and time period 1,2,3,4 with all the time eriod values set to N meaning not available (absent). Once database is created and values insert it displays the database. You can pass any length of list of names it will create the database with that much records
Fig. 6. Source image
Fig. 7. Template image
ex: from database import * init(['hello','hi','how']) ('hello', 'N', 'N', 'N', 'N') ('hi', 'N', 'N', 'N', 'N') ('how', 'N', 'N', 'N', 'N') Update()-> it takes two arguments first is list of names of students who are present and second is which hour in integer. it will update the database and make those names present for that hour which you have passed. ex: update(['hi','hello'],1) select()-> it takes one argument i.e is which hours data u want to see. once you give the argument it will display the data of all the names for that hour.
International Education & Research Journal [IERJ]
Fig.8.Matched Template
11
Research Paper
E-ISSN No : 2454-9916 | Volume : 4 | Issue : 6 | June 2018 rithm for efficient attendance management:face recognition based approach”,in IJCSI International Journal of Computer Science Issues, Vol. 9, Issue 4, No 1, July 2012.
Here Face is detected and recognised and Template Matching is done where Source and Template are matched. 8.
P. Sinha, B. Balas, Y. Ostrovsky, and R. Russell, “Face Recognition by Humans: Nineteen Results All Computer Vision Researchers Should Know About,” in Proceedings of the IEEE, vol. 94, Issue 11, 2006.
9.
Y.-W. Kao, H.-Z. Gu, and S.-M. Yuan “Personal based authentication by face recognition,” in proc. Fourth International Conference on Networked Computing and Advanced Information Management, pp 81-85, 2008.
C. Face Recognition: 1. Dataset Creater:
10. G.. RoshanTharanga , S. M. S. C. Samarakoon , T. A. P. Karunarathne , K. L. P. M. Liyanage , M. P. A. W. Gamage, D. Perera. “Smart Attendance Using Real Time Face Recognition (SMART - FR) “, SAITM Research Symposium on Engineering Advancements, pp. 41-43, (SAITM – RSEA 2013) 11. W. Zhao, R. Chellappa, P. J. Phillips, and A. Rosenfeld, “Face recognition: A literature survey,” ACM Computing Surveys, vol. 35, no. 4, pp. 399-458, 2003.
Fig. 9. DataSet Creator
Fig. 10. Recognised faces with the name display Train the recognizer with dataset of previously captured faces and faces are recognized with their names VII. CONCLUSION: In this system we have implemented an attendance system for a lectures or laboratory by which lecturer or teaching assistant can record student's attendance. It saves time and effort. The complete system is implemented with OpenCV and raspberry pi. This attendance system shows the use of facial recognition techniques for the purpose of student attendance. The result of the experiment shows the detection and Recognition part. This method can also detect multiple faces and can be easily used in a classroom. Then the detected faces are then verified with face database. The precision of face recognition is almost more than 90%, only the limitation of the system is if the image is out of the database it produces the faulty result. The further process this record of students can be used in exam related issues. REFERENCES: 1.
Abhishek jha,“class room attendance system using facial recognition system”,The International Journal of Mathematics, Science, Technology and Management,Vol. 2 Issue 3,Page4, May 2017
2.
Dr. Nita Thakare, Meghna Shrivastava, Nidhi Kumari, Neha Kumari, Darleen Kaur, Rinku Singh, “Face Detection And Recognition For Automatic Attendance System” International Journal of Computer Science and Mobile Computing, Vol.5 Issue.4, pg. 74-78, April-2016
3.
Naeema Mohamed Kutty, Shelmy Mathai, “Face Recognition - A Tool for Automated Attendance System”, International Journals of Advanced Research in Computer Science and Software Engineering ISSN: 2277-128X (Volume-7, Issue-6),August 201
4.
D. Santhi Priya and Mr.M.Umasankar,Lingayas,“Modern Attendance System Using Raspberry Pi”,Institute Of Management and Technology,Vijayawada,Andhra Pradesh. International Research journal of Engineering and Technology (IRJET) Volume 03,Issue :08 August 2016 .
5.
Mathana Gopala Krishnan, Balaji, Shyam Babu Guided by: Mr.K.Rajesh AP-II CSE & Supported by: Dr.A.Uma makeswari AD, “Implementation of Automated Attendance System using Face Recognition” CSE International Journal of Scientific & Engineering Research,Volume 6, Issue 3, March-2015 30 ISSN 2229-5518 IJSER © 2015
6.
Nirmalya Kar, Mrinal Kanti Debbarma, Ashim Saha, and Dwijen Rudra Pal,“ Study of Implementing Automated Attendance System Using Face Recognition Technique”,in proc. International Journal of Computer and Communication Engineering, Vol. 1, No. 2, July 2012.
7.
Naveed Khan Balcoh, M. Haroon Yousaf,Waqar Ahmad and M. Iraam Balg, “Algo-
12
International Education & Research Journal [IERJ]