Fyp

31
Face Recognition via Quad Copter Using Raspberry Pi Furqan Arshad 101519065 Hassam Umer 101519087 Zain ul Abidin 101519*** Advisor: Muhammad Ilyas Khan

Transcript of Fyp

Page 1: Fyp

Face Recognition via Quad Copter Using

Raspberry Pi

Furqan Arshad 101519065

Hassam Umer 101519087

Zain ul Abidin 101519***

Advisor:

Muhammad Ilyas Khan

Page 2: Fyp

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

Page 3: Fyp

Introduction

Capturing and

processing images

Face Database

Face RecognitionQuadcopter

Raspberry pi

(programming)

Page 4: Fyp

Skills Required• Knowledge of Image Processing

• Knowledge of computer vision

• Raspberry pi

• Operating system “Raspicam” (Linux)

• Opencv C++

• Principle Component Analysis

• Quadcopter skills

Page 5: Fyp

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

Page 6: Fyp

KK board 2.0

Page 7: Fyp

Raspberry Pi

Page 8: Fyp

Wifi link for transmitting video

Page 9: Fyp

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.

Page 10: Fyp

Yale FacesDatabase

Page 11: Fyp

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 ?

Page 12: Fyp

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.

Page 13: Fyp

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

Page 14: Fyp

• 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

Page 15: Fyp

• 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.

Page 16: Fyp

PCA and Face Recongition

Page 17: Fyp

• 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

Page 18: Fyp

How is PCA done ?

∑w1 w2 w3 w4 w5 w6 wk…..

+ mean image

Ω=

w1

w2

.

.wk

Page 19: Fyp

The PCA FACE RECOGNITION ALGORITHM

How it works ?

Page 20: Fyp

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

Page 21: Fyp

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

Page 22: Fyp

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

Page 23: Fyp

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

Page 24: Fyp

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

Page 25: Fyp

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

Page 26: Fyp

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

Page 27: Fyp

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

Page 28: Fyp

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

Page 29: Fyp

How is PCA done ?

∑w1 w2 w3 w4 w5 w6 wk…..

+ mean image

Ω=

w1

w2

.

.wk

Page 30: Fyp

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

Page 31: Fyp