fyp
TRANSCRIPT
Face Recognition via Quad Copter Using
Raspberry Pi
Furqan Arshad 101519065
Hassam Umer 101519087
Zain ul Abidin 101519***
Advisor:
Muhammad Ilyas Khan
Face recognition via quad copter using Raspberry pi
Face Detector
Detected face
RGB to greyscale
Face Recognition
System
Face Database
Found!
Capturing
Image
Detected Face
Introduction
Capturing and
processing images
Face Database
Face RecognitionQuadcopter
Raspberry pi
(programming)
Skills Required• Knowledge of Image Processing
• Knowledge of computer vision
• Raspberry pi
• Operating system “Raspicam” (Linux)
• Opencv C++
• Principle Component Analysis
• Quadcopter skills
SK450 Quadcopter specs
Specs:Frame: SK450Wheelbase or Motor to Motor Diagonal: 450mmWeight: 680g without batteryMotors: Multistar 2213 935kvESC: Multistar 20APropellers: 0845~1045 2xCW 2xCCWFlight Controller: KK2.0Radio: Turnigy 5ch FHSS 2.4GHzBattery: 170g 2200mA
KK board 2.0
Raspberry Pi
Wifi link for transmitting video
Methodology
• Learning image processing techniques for enhancement of images.
• Learning and implementing of face detection using Viola Jones Algorithm.
• Making of photo editor software using opencv having features as brightness, contrast,
sharpness, histogram equalization and saturation of image.
• Face Recognition using PCA algorithm using yale database for testing.
Yale FacesDatabase
Literature ReviewFace Recognition using PCA
• What is PCA ?
• Why and where it is used ?
• What is a principle component/eigenface ?
• Benefits of dimensionality reduction?
• How results of PCA are measured ?
Why and Where is PCA used ?
• Multivariate dataset (set of images) visualized as a set of coordinates in a high dimensional date space
• PCA can supply the user with a lower dimensional picture, a “shadow” of this object.
What is PCA and its relation to Face Recognition?
• Principal component analysis (PCA) is a mathematical procedure that uses an orthogonal transformation to convert a set of possibly correlated M variables (a set of images) into a set of values of K uncorrelated variables called principle components (Eigen Faces).
• The number of principle components is always less that or equal to the number of original variables. i.e K<M
• This transformation is defined is such a way that the first principle component shows the most dominant “features” of the dataset and each succeeding component in turn shows the next most dominant “features”, under the constraints that it be uncorrelated the preceding components.
• To reduce the calculations needed for the finding these principle components, the dimensionality of the original data set is reduced before they are calculated
PCA and tis relation to Face Recognition
• Since Principle Component show the “direction” of data, and each proceeding component shows less “directions” and more “noise”, Only few first principal components (say K ) are selected whereas the rest of last components are discarded.
• The K principal components can safely represent the whole original dataset because the depict the major features that makes up the dataset.
PCA and Face Recongition
• Each variable in the original dataset can be represented in terms of these principal components.
• Representing a data point reduces the number of values needed to recognize it by using PCA.
• This makes reorganization process faster and also more free of error.
• Images weight vector and weights assigned
How is PCA done ?
∑w1 w2 w3 w4 w5 w6 wk…..
+ mean image
Ω=
w1
w2
.
.wk
The PCA FACE RECOGNITION ALGORITHM
How it works ?
A Training set consisting of Total M images
N2 x 1 Images converted to
Vectors
Face Vector Space
Foreach (image in training set)
Training the recognizerStep 1: Convert face Images in Training Set to Face
Vectors
N x N
A Training set consisting of Total M images
Converted
Face Vector Space
Normalize face vectors:
Training the recognizerStep 2: Normalize the Face Vectors
Calculate average face vector
Then subtract he mean face vector from Each face vector to get the normalized face vectors
Normalized face vector
A= [φ1, φ2, φ3, φ4,… φm]
Φi=Гi - ψΦi
ψ
TAAC
A Training set consisting of Total M images
Converted
Face Vector Space N2 x M Mx N2=N2 by N2 (2500 x2500) if N=50
Each 2500 * 1 dimesnion
2500 eigenvectors
TAAC
A Training set consisting of Total M images
Converted
Face Vector Space
Each 2500 * 1 dimesnion
2500 eigenvectors
TAAC
Warning System may slow down or run out
of memoryComputations required are
hugeTraining the recognizerThe need for dimensionality reduction
A Training set consisting of Total M images
Converted
Face Vector Space
Training the recognizerStep 3: Reduce the dimensionality
Each 2500 * 1 dimesnion
2500 eigenvectors
Solution:Dimensionality reduction
TO reduce calculation and effect of noise on
the needed eigenvectors calculate them from a covariance matric of
reduced dimensionality
TAAC N2 x M Mx N2=N2
x N2
A Training set consisting of Total M images
Converted
Face Vector Space
Training the recognizerStep 3: Reduce the dimensionality
Each 2500 * 1 dimesnion
2500 eigenvectors
TAAC N2 x M Mx N2=N2
x N2
V/s
AAL TMx N2 N2 x M=M x
M
A Training set consisting of Total M images
Converted
Face Vector Space
Each 2500 * 1 dimesnion
2500 eigenvectors
TAAC N2 x M Mx N2=N2
x N2
V/s
AAL TMx N2 N2 x M=M x
M
Training the recognizerStep 4: Calculate the eigenvector from
covariance matrix L
Lower dimensional subspace
A Training set consisting of Total M images
Converted
Training the recognizerStep 5: Select K best eigenfaces such that K
< M
2500 eigenvectors
ui= A λi
=A
AAL TLower dimensional subspace
A Training set consisting of Total M images
Converted
Training the recognizerStep 5: Select K best eigenfaces such that K
< M
Selected K Eigen Faces
How is PCA done ?
∑w1 w2 w3 w4 w5 w6 wk…..
+ mean image
Ω=
w1
w2
.
.wk
Convert the input image to face
vector
Convert the input image to face
vector
Project Normalize face vector onto the Eigenspace
Weight vector of input image
Calculate distance between input weight vectors
and all the weight vectors
IfDista>thre
shld
No
Recognized as
Unknown person
Unknown person