Cvpresentation 190812154654
Cvpresentation 190812154654
Cvpresentation 190812154654
Presented By:
• Akash Satamkar (31672)
• Krupali Rana (31668)
Introduction
2
Goals
3
Software Analysis
• Anaconda IDE
• SpyDer studio with Python 3.7
version
• Open CV libraries
4
Haar Cascade Classifier
5
Positive and Negative images
6
detectMultiscale() Module
Computation of Features - To create rectangle around the faces
detected in image.
Parameters :
scaleFactor = Adjust the size of image
minNeighbors = Specify how many
neighbors person can have
Cascade of Classifiers
Features are grouped together into stages
of classifiers.
If a window fails at 1st stage , it is discarded.
Else it is passed to 2nd stage of features.
The window which passes all stages is face
region.
7
• Local Binary Pattern is simple but
efficient texture operator.
LBPH Algorithm • It is combined with HOG (Histogram of
Gradients) to recognize faces in image.
LBP Operation:
It uses sliding window concept based on
parameters Radius and Neighbours.
8
• Extracting a portion of this grayscale image (3 x 3 pixels)
• Represented in a matrix of 3 x 3 of pixel intensities with each pixel intensity in range (0 – 255)
• Using centre value as threshold and perform thresholding. (0 = < threshold, 1 = > threshold)
• Obtain binary values and concatenate in clockwise manner.
• Convert binary value to decimal value and set it to centre value.
• In the end , we have obtained a new image with better characteristics.
9
Image Reference : https://towardsdatascience.com/face-recognition-how-lbph-works-90ec258c3d6b
LBP combined with Histogram to predict faces:
• Now we divide the new image generated into grids with Grid X and Grid Y parameters.
• Obtain the histogram of each grid .
• Now concatenate the individual histograms to obtain a new and bigger histogram.
• The final histogram represents characteristics of original image.
10
Image Reference : https://towardsdatascience.com/face-recognition-how-lbph-works-90ec258c3d6b
• The algorithm is trained and each histogram is used to represent each image of training
dataset.
• We compare the two histograms and return the image with closest histogram.
• The output is the ID with closest match and the calculated Euclidean distance can be a
confidence measurement.
▪ Confidence level :
The lower the value of confidence the better is the match which means the distance
between two histograms is closer.
Then we can use this confidence level to predict the face by defining the threshold.
11
Some important OpenCV functions :
1. FaceDetection function
12
3. Draw Rectangle function
13
Our Process is easy
14
Flowchart
15
16
Testing and Results
Case 1: Single face detection and recognition
17
Case 2: Multiple faces
18
Case 3: Multiple faces with unknown labelled person
19
Case 4: Using different props on face
20
Case 4: Using different props on face
21
Case5: Masking certain regions of Face
22
Further Enhancements
23
References
24
😉
THANKS!
Any questions?
25