Raspberry Pi based Face Recognition System

DOI : 10.17577/IJERTCONV8IS08028

Download Full-Text PDF Cite this Publication

Text Only Version

Raspberry Pi based Face Recognition System

Dr. J. Preetha1, M. Manirathnam2, A. Chaitanya3, R. Prakash Raj4

1Professor, Department of Computer Science and Engineering

2,3,4 Student of Computer Science Engineering, Muthayammal Engineering College(Autonomous), Rasipuram, India.

Abstract– Nowadays, computers and smart phones have significantly contributed our daily life where numerous computations and adjustments are being accomplished by such technologies. Securing homes has become one of the concerning issues that facing many people. With the expanded duration of leaving the home, homes are being more vulnerable for several threats especially being burgled. Apart from the threats, there are different cases where securing or monitoring the house is very critical such as the existence of elderly individuals or kids with baby sitter. For this manner, home security system or so-called Home OS has been proposed in order to provide more secure arrangements. Such concept aims to turn the home into a smart in which different tasks especially monitoring can be performed remotely. Monitoring and controlling some tasks inside the house would have the ability to provide maximum safety.

Recently, electronic door lock systems are one of the most popular security systems that is being installed for many residents and business places. The key characteristic behind such systems lies on the reliability in which the authorized individuals can gain the permission to access the doors throughout a secure system that has an interactive interface. Such analysis takes different forms such as analyzing facial image or video stream. The main goal is to develop a prototype thathas the ability to simulate the wireless tasks including monitoring and controlling digital door lock. Such system would have the capability to provide secure monitoring of houses.


    Machine learning (ML) is the scientific study of algorithms and statistical models that computer systems use to perform a specific task without using explicit instructions, relying on patterns and inference instead. It is seen as a subset of artificial intelligence. Machine learning algorithms build a mathematical model based on sample data, known as "training data", in order to make predictions or decisions without being explicitly programmed to perform the task. Machine learning algorithms are used in a wide variety of applications, such as email filtering and computer vision, where it is difficult or infeasible to develop a conventional algorithm for effectively performing the task.

    Face recognition systems are now providing the need for security to cope up with the current misdeeds. It is really influential with the market information that undoubtedly depicts the rising fascination of the face recognition system. In the present era, the threat of protecting the information or physical property is becoming more and more difficult and important. Now a day the crimes of computer hackings, credit card fraud or security violation in a company or government building has noticed

    to be increased . The face recognition system consists of two important steps, the feature extraction and the classification.

    Face recognition has a challenge to perform in real time. Raw face image may consume a long time to recognize since it go through from a huge amount of pixels. One needs to reduce the amounts of pixels. This is called dimensionality reduction or feature extraction, to save time for the decision step. Feature extraction refers to convert face space into a feature space. In the feature space, the face database is represented by a reduced number of features that retain most of the important information of the original faces.

    The most popular method to achieve this target is through applying the Eigenfaces algorithm. The Eigenfaces algorithm is a classical statistical method by using the linear KarhumenLoeve transformation (KLT) also known as Principal component analysis. The PCA calculates the eigenvectors of the covariance matrix of the input face space. These eigenvectors define a new face space where the images are represented. In contrast to linear PCA, N- PCA has been developed.


    Current scenario is that we manually go and open the door for any visitor and if we are not present when some our family member comes to our home this may lead them wait until we reach. To provide the good facility for the relative we provide them access to the doors even when we are absent, this may help to better experience for the visitors.

    The major disadvantage is that appearance of n- number of people at same time hard to detect the existed faces, the detection of face need some time to provide the access to the trained persons, the movement of person may result into wrong detection.

    So, we provide a machine learning approach which will be used to scan those who all are relatives or family. Then we provide the access to the detected faces by comparing with databases and we also provide the training process for new friends and salesmen.

    The trained model provides faster results when compared to the manual methods.The results are more accurate due to the supervised training of the detection model.The proposed system will reduce the human efforts and make sure no one enter the house without access and minimal possibilities of error.


    A pattern recognition task performed exclusively on faces is termed as face recognition. It can be described as classifying a face either known or unknown, after matching it with stored known individuals in a database. It is also advantageous to have a system that has the capability of learning to identify unknown faces. The outline of typical face recognition system implemented specifically for N- PCA.

    The working methodology is divided into 3 parts, namely Camera module, Raspberry Pi module and Electronic bolt lock as shown in figure 1.

    Figure 1 Hardware Architecture

    1. Face recognition:

      The implementation is executed in two phases. The phase 1 is related to saving the face portion. The flow chart shown in figure 2 explains the working of the module which uses the Raspberry Pi. Initially, the frame is taken and the face is detected. To capture the images, we are using open cv with raspberry Pi. After detecting the face, the process of extraction is done along with resizing the image. Then, the process of saving the extracted image is carried out. After saving the image the real time training is done, in which the respective names of the images are trained for correct analysis of the person. Finally, the faces of person will be saved in folder with the names of the persons. Those faces will then be used to recognize face.

      Figure 2 Flow Chart Model

      The phase 2 is the implementation of face recognition algorithm. The internal design of the proposed system is shown in figure 3. The Face Recognition system includes: An automated mechanism that scans and captures adigital or an analog image /of living personal characteristics (Enrollment module). Another entity which handles compression, processing,storage and compression of the captured data with stored data (Database). The third interfaces with the application system(Identification module).

      Figure 3 System Architecture

      The different Modules of Face Recognition System are:

      • User Interface: User interface captures the analog or digital image of the person's face. In this we take number of photos of a single person either in analog or in a digital form.

      • Enrollment Module: In the enrollment module the obtained sample is preprocessed and analyzed. This analyzed data is stored in the database for the purpose of future comparison.

      • Database: The database compresses the obtained sample and stores it properly. It should have retrieval property also so that it compares all the stored sample with the newly obtained sample and retrieves the matched sample for the purpose of verification of the user and determine whether the match declared is right or wrong.

      • Verification: The verification module also consists of a pre-processing system. Verification means the system checks as to who the person says he or she is and gives a yes or no decision. In this module the newly obtained sample is compared and pre-processed with the sample stored in the database.

    2. Text recognition

      Text recognition in images is a research area which attempts to develop a computer system with the ability to automatically read the text from images. These days there is a huge demand in storing the information available in paper documents format in to a computer storage disk and then later reusing this information by searching process.

      One simple way to store information from these paper documents in to computer system is to first scan the documents andthen store them as images. But to reuse this information it is very difficult to read the individual contents and searching the contents form these documents line-by-line and word-by-word.

      The challenges involved in this the font characteristics of the characters in paper documents and quality of images. Due to these challenges,computer is unable to recognize the characters while reading them. Thus there is a need of character recognition mechanisms to perform Document Image Analysis (DIA) which transforms documents in paper format to electronic format. In this paper we have discuss method for text recognition from images. The objective of this paper is to recognition of text from image for better understanding of the reader by using particular sequence of different processing module.

    3. Software and Techniques for Face Recognition

      This System is used Python 3.5+ software and python programming.WithOpenCV(OpenSourceComputerVision) isalibraryofprogrammingfunctionsmainlyaimedatreal- time computervision.

      • Haar CascadeClassifier

        ObjectDetectionusingHaarfeature- basedcascadeclassifiers is an effective object detection method proposed by Paul Viola and Michael Jones in their paper[5], "Rapid Object Detection using a Boosted Cascade of Simple Features" in 2001. It is a machine learning based approach where a cascade function is trained from a lot of positive and negative images. It is then used to detect objects in other images.

      • Local Binary Patterns HistogramsTechnique

        The Local Binary Patterns methodology has its roots in 2D textureanalysis.ThebasicideaofLocalBinaryPatternsisto summarize the local structure in an image by comparing

        eachpixelwithitsneighbourhood.Takeapixelascentreand thresholditsneighboursagainst.Iftheintensityofthecentre pixelisgreater-equalitsneighbour,thendenoteitwitpand 0 if not. Youll end up with a binary number for each pixel, justlike11001111.Sowith8surroundingpixels,youllend up with 2^8 possible combinations, called Local Binary PatternsorsometimesreferredtoasLBPcodes.ThefirstLBP operator described in literature actually used a fixed 3 x 3 neighbourhood just likethis.

  4. TESTING PROCEDURE AND RESULT The proposed system works are as follows:

    • Interface the camera to capture live faceimages.

    • Create a database of an authorized person by using Graphical user interface shown in belowimage.

    • Write name in the blank block in GUI model to store the personimageontheirnameinthedatabase.Andthenclick onstart.

    • After click on start one video frame window will open. It captures the images and creates thedatabase.

    • After competing capturing the images click onTrain. (Above two process images are following shown


    • After click on start one video frame window will open. It captures the images and creates thedatabase.

    • Finally, it checks with the database to provide the access for the peoples.


    It can be concluded that automated door lock system in home using human face recognition technique works quite well. Certainly, it can be improved for yielding a better result particularly by paying attention in feature extraction or recognition process. This improvement may help the recognition process become more robust. The success rate of the proposed system in recognizing facial images of the person who are standing in front of the door is about 82%. Also, face recognition systems have addedvalue to security and surveillance areas such as airports, schools, company, corporation etc.


    1. HteikHtarLwin, Aung SoeKhaing, HlaMyoTun, Automatic Door Access System Using Face Recognition, International Journal of Scientific & Technology Research Volume 4, Issue 06, June2015.

    2. Samuel Lukas, Aditya Rama Mitra, RirinIkanaDesanti, Dion Krisnadi "Student Attendance System in Classroom Using Face Recognition Technique" IEEE2016.

    3. Ratnawati Ibrahim, "Study of Automated Face Recognition System for Office Door Access Control Application", IEEE2011.

    4. Mrs. J. Preetha and Dr S.Selvarajan Computer aided diagnostic system for automatic cervical herniation classification Journal of medical imaging and health informatics , volume 6, ISSN: 2156-7018, 2156-7026 2016

    5. LeratoMasupha,TranosZuva,SelemanNgwira,OmobayoEsan, "Face Recognition Techniques, their Advantages, Disadvantages and Performance Evaluation", IEEE2015.

    6. Paul Viola, Michael J. Jones, "Robust Real- Time Face Detection",InternationalJournalofComputerVision57(2), 2004.

    7. Ayushi Gupta, Ekta Sharma, NehaSachan, and Neha Tiwari, "Door Lock System through Face RecognitionUsing MATLAB", International Journal of Scientific Research in Computer Science and Engineering, Vol-1, Issue-3, 30 June 2013.

Leave a Reply