FACE AND NUMBER RECOGNITION
by Robotics club of CEG in Circuits > Computers
535 Views, 11 Favorites, 0 Comments
FACE AND NUMBER RECOGNITION
With evolving Artificial Intelligence and the spectrum of its uses broadening drastically, it has found its importance in the modern security system. Parking areas and government institutions could incorporate Machine Learning to level up the security at real time.
Face and number plate recognition serves the purpose of a full – time monitoring system! By writing a Convolutional Neutral Network (CNN) code of your own from scratch and then learning the YOLO algorithm you could make a prototype model of your own! For more fun you can incorporate it with Internet of Things (IoT) and experiment your own security system!
LIBRARIES TO BE INSTALLED:
· EMNIST
· NUMPY
· MATPLOTLIB
· PIL
· TENSORFLOW 1
· H5PY
· PANDAS
EMNIST LETTER AND NUMBER RECOGNITION
The EMNIST dataset is used in the project for extraction of numbers and letters from the license plate. The X input is normalized and Y labels are to be resized in the format of one hot representation 36 classes – 10 digits and 26 alphabets.
Create a CNN model with depth as per the need. Pooling layers can be avoided due to the small size of the input. Add sufficient dense layers to accentuate the classification. With the depth of 4 CNN layers, 3 dense layers and a mini-batch gradient descent, an accuracy of 96% in the training and 89% in the test set was obtained. Adam optimization is used. You are free to try out various other optimization techniques.
FACE DETECTION USING YOLO
COCO is the dataset used for this step.
YOLO, that is, you look only once, is the algorithm used in this step. It requires a single forward propagation pass through the network to make predictions. After non-max suppression, it displays recognized objects together with the bounding boxes as the output. Only one cell, the one containing the midpoint the object is responsible for the detection. Make sure to mention the classes you want to display. Set the dimensions of the anchor boxes you require. Intersection over union used in non–max suppression discards excess boxes generated according to the threshold set (0.6 used here).
The same code is implemented for license plate detection with appropriate changes made and a fitting dataset.
FACE RECOGNITION
The face pixels are passed on to this step from step 2. The FaceNet architecture is used. The model maps from face images to a compact Euclidean space as “feature vectors".
The neural network used incorporates triplet loss function for training. By this, each image is encoded into a vector set and compared with the given input transformed into a face vector. The similarity between the vectors is the measure of comparison. Hence, distance correspond to a measure of face similarity.
The inputs I’ve used are two images of a man with low lighting. The faces have been matched successfully with a low threshold used. It is thus important to set the threshold according to the lighting.
CONCLUSION
With the versatility of Convolutional Neural Networks and the expanding interest in Artificial intelligence, there keep coming countless new and more efficient algorithms. YOLO has been chosen keeping in mind its success rate in self driving cars
Hence, with proper model usage, a successful system could be made with higher accuracy as well as speed compared to similar works manually. AI, henceforth, can be used as a reliable and fast security system.