Smart Face Recognition Analysis Report- Optimization, Response Time & Efficiency Introduction: Face Recognition using opencv python to detect face & recognize all facial features of particular person can be achieved with more than 90% efficiency in opencv-3.1.0. The results depends on trained model & the database of grayscale images supplied. Purpose of Analysis: The objective is to find the best face recognition model/algorithm for less memory utilization & low processing from servers possible i.e, millions of images can be processed much faster by segmentation, multi-threading or parallel processing. Also, explore & test best computational models like knn(k Nearest Neighbour), cnn(Computational Neural Network), dnn(Deep Neural Network). Hypothesis: From the official documentation of Computer Vision[1] , the currently available algorithms for opencv2 & later versions are: ● Eigenfaces (see createEigenFaceRecognizer() ) ● Fisherfaces (see createFisherFaceRecognizer() ) ● Local Binary Patterns Histograms (see createLBPHFaceRecognizer() ) We choose LBPHFaceRecognizer() for our project as this algorithm can recognize at different angles, color modes, ambiance(lights) for all trained datasets. The basic idea of Local Binary Patterns is to summarize the local structure in an image by comparing 1 Smart Face Recognition System
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Smart Face Recognition Analysis Report- Optimization, Response Time & Efficiency
Introduction: Face Recognition using opencv python to detect face & recognize all facial features of particular person can be achieved with more than 90% efficiency in opencv-3.1.0. The results depends on trained model & the database of grayscale images supplied.
Purpose of Analysis: The objective is to find the best face recognition model/algorithm for less memory utilization & low processing from servers possible i.e, millions of images can be processed much faster by segmentation, multi-threading or parallel processing. Also, explore & test best computational models like knn(k Nearest Neighbour), cnn(Computational Neural Network), dnn(Deep Neural Network). Hypothesis: From the official documentation of Computer Vision[1], the currently available algorithms for opencv2 & later versions are:
● Eigenfaces (see createEigenFaceRecognizer()) ● Fisherfaces (see createFisherFaceRecognizer()) ● Local Binary Patterns Histograms (see createLBPHFaceRecognizer())
We choose LBPHFaceRecognizer() for our project as this algorithm can recognize at different angles, color modes, ambiance(lights) for all trained datasets. The basic idea of Local Binary Patterns is to summarize the local structure in an image by comparing 1 Smart Face Recognition System
each pixel with its neighborhood. Take a pixel as center and threshold its neighbors against. If the intensity of the center pixel is greater-equal its neighbor, then denote it with 1 and 0 if not. You’ll end up with a binary number for each pixel, just like 11001111. So with 8 surrounding pixels you’ll end up with 2^8 possible combinations, called Local Binary Patterns or sometimes referred to as LBP codes. The first LBP operator described in literature actually used a fixed 3 x 3 neighborhood just like this:
By definition the LBP operator is robust against monotonic gray scale transformations. We can easily verify this by looking at the LBP image of an artificially modified image (so you see what an LBP image looks like!):
Watch this video for better idea about feature extraction: https://vimeo.com/12774628 Problem Statement: Required a face recognition model that can capture image from wireless camera and if the user’s face exists in database then allow him/her to enter else display option to train than face & put it to existing database by the permission of admin else trigger an alarm for unauthorized entry. This whole thing must be further
implemented to android application & the face recognition model can be processed via backend servers. Further, optimize the whole process and increase the response time Methodology: One possible approach/solution to the above problem can be as follows.
● Create database for facerec with possible structure as table facerec{id,name,dob,time}
● Get image from camera over wireless network(IP & PORT) only if motion of human is detected then capture face.
● Get image sent over network then process it: ○ Get ID from facerec_database & if ID of image received is same then
process image for that ID dataset available from trained model ○ Get the prediction & confidence of result.
● Start the server and return the results in json format (ID, result).
○ ID: image ID from the database ○ result: true/false
● Get the json result in android application & display the name corresponding to that image ID from facerec database.
Flow Chart: All possible flow charts of face recognition models
3 Smart Face Recognition System
Deploy in cloud-servers:
1. Using Google Cloud: VM instances (https://console.cloud.google.com) VM Instance- Ubuntu 16.4 4Gb RAM, 375 GB Storage, 3 Years Usage Cost- 45.60$ per month Benefits: All kinds of servers can be installed LAMP, Apache Tomcat, WAMP etc.
Multiple Camera Tests: Connected USBCam & WebCam Using opencv multiple streaming is achieved
IP Camera: Video stream can be captured from multiple IP Cameras over WiFi network & further can be converted into frames to numpy array for processing.
After mapping the HTTP video stream of IP Camera to video driver /dev/video* videoCapture(1) will work for that mapped device ID & all opencv processing is possible with the same.
7 Smart Face Recognition System
Problems/Parameters for IP Camera: ● Bandwidth required to process multiple cameras: Video CODEC (Compression),
Streaming Mode, Frame Rate, Resolution, Video Quality. ● Network topology
● Resource calculation for servers to process & capture streams of ip camera from
http to /dev/video*
Using IP Camera Simulation Software to get above parameters for 100+ cameras. IP Video System Design Tools by Vivotek: To monitor the network & check for all parameters. http://www.vivotek.com/ip-video-system-design-tool/#downloads
Using this tool we can estimate everything & plan a efficient systems for cctv monitoring & processing wireless through servers.
9 Smart Face Recognition System
WebCam Streaming: using opencv https://github.com/benhowell/examples/tree/master/WebcamStreamingOpenCV
Face Detection using IP Camera connected to Netgear Router is tested and found some frame lags and error detection. Now, training of data sets should be done with same situation, lightning conditions & camera. Python Client Server Connection: To deploy in My Attendance App
● Create php web service to upload image and store to database. ● Get images in python.