Contents
2.
Implementation
2.1
Design
To
implement using BackPropagation Network for Face Recognition, Prof.
Mahmood advised me this idea. From the old project, faces give Face
Space Vectors or FSV. I create input data combining 2 parts. First
half is the face that we want to recognize, second half is the variety
of faces from database. Then I feed it to the network and if the result
is TRUE so the face is match to that face from the database. Then
repeat until we compare all the faces in the database.
2.2
Development History
In my project Phase I, I wrote the Backpropagation program in C# language
that user can set number of input neurons, hidden neurons and has
one output neuron. It was the Console Application not Windows Form.
I trained some sets of data that have the second half 10% more than
the first half such as 1.0, 2.0, 3.0, 1.1, 2.2, 3.3 for 6 input neurons
to has the desired output as 1 (or TRUE). I also trained some sets
of data that doesn't have this rule to have the desired output as
0 (or FALSE).
After I trained the network, it can give the corrected result as desired
for the new set of input that has the same rule or doesn't have the
same rule as I trained. So in project Phase II, I modified my program
to work with the Face Identification purpose.
2.3
Data Arrangement
I developed my program from other project that uses Eigenfaces method
for face recognition. Each face in the database has its own FSV (Face
Space Vector) values. In my project, there are 23 faces in the database.
I have to modify the FSV data before giving them to the training data
set because they have wide range of value. Because the 23rd value
of the FSV is so small, so I made it equal to zero. Then I divided
the rest of the FSV by the 22nd FSV value. So the 22nd FSV value will
be 1 and the 23rd FSV value will be 0.
This
is the format of input data that will be fed into the Backpropagation
network.
Example:
In training01.txt, there is a part of the file that is...
2929.40233806179
-51.4361114062965
56.1321060205546
104.851265783399
4.6816837982762
67.7544254149044
5.18655697340868
-2.54783010345697
6.44707353127381
-5.01252674627703
-0.466610899517431
6.45161353420436
-5.38171027569223
2.33287174453982
4.46719197491922
-1.9460090033352
1.53041278803324
-0.504651169432824
0.84543903175067
-1.39762430749671
-0.400483589394899
1
0
-2108.54060849247
23.8382718217281
-25.9480195460155
-93.4391107613473
-4.41128321021563
-48.5637142894588
-1.09781210120238
0.429298792252884
-6.60294898183857
2.83855820351398
-0.664481118667277
-5.15056774979179
2.10698159568315
-2.50264278237594
-0.727851156823915
-0.0598389079821044
0.0628651211649065
0.317441536496724
-0.948940909572675
0.88851153466049
0.151162033776204
1
0
1
Blue
is the FSV of the desired face. Green is the
FSV of the database face. Red is the desired
output (1 is TRUE, 0 is FALSE).
At
first, I wanted only 1 backpropagation network that can recognize
all of the faces in the database. (Or there will be only 1 weight
file for the rest of the database faces.) After I tried to train them,
I found that I couldn't train that sets of input. So I provided 23
set of weights for 23 database faces. Each database face has its own
backpropagation network. (Or weight file)
2.4 Training Face Database
I trained the database faces to recognize itself so there are 23 training
data set (training01.txt to training23.txt) that will give 1 for the
same person's face and 0 for another. I tried to finish true and false
training cases but I found that I couldn't do it. So I changed to
finish only when the true training was done. For example, in training01.txt,
let say it is the 1st database face of Miss A and also in the 2nd
database face, it is the face of Miss A in gray color. So in this
training file, I set output = 1 for the 1st and the 2nd face and output
= 0 for the rest. Another key to train is repeated set of data for
the true cases. At first I didn't think about this so I only have
1 set of data for each set of database faces and I found that it couldn't
finish the training process. When I gave the repeated time of true
cases for 7 times, the training time was faster and could be done.
2.5
Training New Faces
After I finished training all the database faces giving weight files
for each database face, then I created a program for adding a new
face that will be match with one or more faces from the database faces.
The way I did was I added the new face image's FSV and the matched
database face's FSV to the desired training file. Then train the network
until it can give the true case correctly.
2.6
Matching Process
Then I created a program for matching purpose. This program will get
the FSV of the selected face picture and create FSV for database 1st
face. Feeding the input to the network with weight01 and if the result
is true it will show that database face to the screen. Repeat the
same thing to the database 2nd face until the rest of the database
faces.
Copyright 2003.
All Rights Reserved.