ACKNOWLEDGEMENT
Firstly we would like to express our gratitude towards our guide- Dr. Varsha Turkar
for providing us with help and assistance whenever we asked for it. She allowed us to
experiment and encouraged creative thinking, thereby allowing us to grow and mature. She
would always point out areas where we can improve ourselves. Her expertise and time was of
immense importance to us and the project as a whole.
Secondly, we would like to acknowledge our college, Thakur College of Science and
Commerce, for providing us with the technical support as and when we required. Without
these support systems our presentations would have not been as effective.
Last but not the least, special thanks to our parents and all our class mates for being
such a support, they have contributed greatly with their supportive dialogues to nish the
project.
Finally, as our project -2D Face Detection and Recognition is an amalgamation of
knowledge acquired from various sources which garnered our creativity and ability to
experiment, we would like to acknowledge Google search engine.
Thanking you...
Khan Sana
Mital Motani
1 IDOL
ABSTRACT
2 IDOL
ABSTRACT
2D Face detection and Recognition is based on identifying a human face in images
regardless of size, position, and condition Simple features such as colors, motion, and texture
are used for the face detection in early researches. However, these methods break down easily
because of the complexity of the real world. Face detection proposed by Viola and Jones is
most popular among the face detection approaches based on statistic methods. Algorithm
introduced a method to accurately and rapidly detect faces within an image. This technique
can be adapted to accurately detect facial features. By regionalizing the detection area, false
positives are eliminated and the speed of detection is increased due to the reduction of the
area examined. Face is also a complex multidimensional structure and needs good computing
techniques for recognition. The approach treats face recognition as a two-dimensional
recognition. In this scheme face recognition is done by Principal Component Analysis (PCA).
The Eigen faces approach uses the PCA for recognition of the images. The system performs
by projecting pre extracted face image onto a set of face space that represents significant
variations among known face images. Face will be categorized as known or unknown face
after matching with the present database. If the user is new to the face recognition system
then his/her template will be stored in the database else matched against the templates stored
in the database. The variable reducing theory of PCA accounts for the smaller face space than
the training set of face.
3 IDOL
TABLE OF CONTENTS
SR NO.
Titles
PG NO.
Introduction
1.1
Problem Definition
8-10
11-12
1.2
Significance
13-14
1.3
Scope
15
1.4
Literature Review
16-17
1.5
18
1.6
Proposed System
19-23
1.7
Image Database
24
1.8
Assumptions
24
System Requirements
25-26
Technology Used
27-28
Design
Iterative Process Model
30-31
4.2
UML Diagram
32
4.2.1
Use-Case Diagram
33-34
4.2.2
Activity Diagram
35
4.2.3
Sequence Diagram
36
4.3
Flow Chart
37-38
4.4
Gantt Chart
39
Implementation Phase
40
Screen Shots
41-48
Testing
49-52
53-56
5
5.1
4 IDOL
Conclusion
57-59
8.1
Applications
58
8.2
Future Enhancement
59
Bibliography
60
References
61
9
9.1
5 IDOL
LIST OF FIGURES
Fig 1.5: Basic working model of proposed system.
Fig 4.1: Flow of Iterative Model.
Fig 4.2.1: Use-Case Diagram
Fig 4.2.2: Activity Diagram
Fig 4.2.3: Sequence Diagram
Fig 4.3: Flow chart Diagram
Fig 4.4: Gantt chart.
Fig 5.1: Shows the basic GUI for Face Detection and Recognition
Fig 5.2: Captures the image from the folder
Fig 5.3 Shows a person image for Face Detection that is been selected by
user
Fig 5.4: Detecting the face using the algorithm mentioned above
Fig 5.5: The user Face is been Detected successfully
Fig 5.6: The Detected Face is been matched with the Database for
Recognition process
Fig: 5.7: Redirect the user to Home screen for more process
6 IDOL
LIST OF TABLES
1.
2.
3.
4.
5.
Dynamic View
2D Face Detection and Recognition Condition Test (6.1)
2D Face Detection and Recognition Condition Test (6.2)
2D Face Detection and Recognition Condition Test (6.3)
2D Face Detection and Recognition Condition Test (6.4)
ABBREVIATIONS USED
PCA- Principal Component Analysis
FR -Face recognition
7 IDOL
INTRODUCTION
8 IDOL
1 INTRODUCTION
The propose a system for 2D Face Detection and Recognition that describes a systematic
approach by taking 2D image as input & then by applying an algorithm for 2D Face
Detection & Recognition.
Face detection is a preprocessing step for face Recognition algorithms. It is the localization of
face/faces in an image or image sequence. Face detection is a challenging computer vision
problem because of lighting conditions, a high degree of variability in size, shape,
background, color, etc. The existing methods for face detection can be divided into image
based methods and feature based methods. We have used an intermediate system, using a
algorithm to train a images which is capable of processing image rapidly while having high
detection rates. The family of simple classifiers contains simple rectangular wavelets which
are reminiscent of the Haar basis. Their simplicity and a new image representation called
Integral Image allow a very quick computing of these Haar-like features. For this, classifiers
with an increasingly complexity are combined sequentially. This improves both, the detection
speed and the detection efficiency. The detection of faces in input images is preceded using a
scanning window at different scales which permits to detect faces of every size.
The human face is not a unique rigid object. There are billions of different faces and each of
them can assume a variety of deformations. Inter-personal variations can be due to race,
identity, or genetics while intra-personal variations can be due to deformations, expression,
aging, facial hair, cosmetics and facial paraphernalia.
The detected face varies in rotation, brightness, size, and etc. in different images even for the
same person. After the face detection, face recognition process has been performed. Its main
objective is to detect a face which helps in increasing the face recognition rate.
Face recognition (FR) is the preferred mode of identity recognition by humans: It is natural,
robust and un-intrusive. The images are then compared with images in Database. If Image is
found then appropriate image is displayed.
The goal is to implement the system for a particular face and distinguish it from a large
number of stored faces with some real-time variations as well. The Eigenface approach uses
9 IDOL
Principal Component Analysis (PCA) algorithm for the recognition of the images. It gives us
efficient way to find the lower dimensional space.
The algorithm is based on an Eigenface approach which represents a PCA method in which a
small set of significant features are used to describe the variation between face images.
Experimental results for different numbers of Eigenface are shown to verify the viability of
the proposed method.
The output of the detection and recognition system has to be accurate. A recognition system
has to associate an identity for each face it comes across by matching it to a large database of
individuals. Simultaneously, the system must be robust to typical image-acquisition problems
such as noise, video-camera distortion and image resolution
10 IDOL
Face Recognition
A facial recognition system is a computer application for automatically identifying or
verifying a person from a digital image. One of the ways to do this is by comparing selected
facial features from the image and a facial database.
Therefore, face recognition is applied in many important areas such as security systems,
identification of criminals, and verification of credit cards and so on. Unfortunately, many
face features make development of facial recognition systems difficult.
This problem is solved by the method called Principal Component Analysis. PCA is a
projection technique that finds a set of projection vectors designed such that the projected
data retains the most information about the original data. The most representative vectors are
eigenvectors corresponding to highest eigenvalues of the covariance matrix. This method
reduces the dimensionality of data space by projecting data from M-dimensional space to Pdimensional space, where P<<M. search engine technologies.
11 IDOL
In combination with face detection systems, one could enable users to search for specific
people in images. This could be done by either having the user provide an image of the
person to be found, or simply providing the name of the person for well-known individuals. A
specific application of this technology is criminal mug shot databases. This environment is
perfectly suited for automated face recognition since all poses are standardized and lighting
and scale are held constant.
12 IDOL
1.2 SIGNIFICANCE
Recent developments in computer technology and the call for better security applications
have brought 2D Face Recognition & Detection into focus. A biometric is a physical
property; it cannot be forgotten or mislaid like a password, and it has the potential to identify
a person in very different settings: a criminal entering an airport, an unconscious patient
without documents for identification, an authorized person accessing a highly-secured
system. Be it for purposes of security or humancomputer interaction, there is wide
application to robust biometrics.
Two different scenarios are of primary importance. In the verification (Authentication)
scenario, the person claims to be someone, and this claim is verified by ensuring the provided
biometric is sufficiently close to the data stored for that person. In the more difficult
recognition scenario, the person is searched in a database. The database can be small (e.g.
criminals on the wanted list) or large
(E.g. photos on registered ID cards). The unobtrusive search for a number of people is called
screening.
The signature and handwriting have been the oldest biometrics, used in the verification of
authentication of documents. Face image and the fingerprint also have a long history, and are
still kept by police departments all over the world. More recently, voice, gait, retina and iris
scans, hand print, and 3D face information are considered for biometrics. Each of these have
different merits, and applicability. When deploying a biometrics based system, we consider
its accuracy, cost, ease of use, ease of development, whether it allows integration with other
systems, and the ethical consequences of its use. Two other criteria are susceptibility to
spoofing (faking an identity) in a verification setting, and susceptibility to evasion (hiding an
identity) in a recognition setting.
The purpose of the present study is to discuss the merits and drawbacks of 2D face
information as a biometric, and review the state of the art in 2D face recognition. Two things
make face recognition especially attractive for our consideration. The acquisition of the face
information is easy and non-intrusive, as opposed to iris and retina scans. This is important if
the system is going to be used frequently, and by a large number of users.
13 IDOL
The second point is the relatively low privacy of the information; we expose our faces
constantly, and if the stored information is compromised, it does not lend itself to improper
use like signatures and fingerprints.
Face recognition (FR) is the preferred mode of identity recognition by humans: It is natural,
robust and unobtrusive. With the availability of cheaper acquisition methods, 2D face
recognition can be a way out of these problems regarding conventional authentication
processes. We review the relevant work on 2D face recognition here, and discuss merits of
different representations and recognition algorithms.
2D Face recognition and Detection has a natural place in the present and the future
environment because its unobtrusive and passive in nature.
Our goal at the end of the project is to develop Human Face Recognition software which
works efficiently on input images that are taken either by webcam (real time) or from hard
disk and which is also simple to understand.
14 IDOL
1.3 Scope
Compute a "distance" between the set of image passed and each of the image face
stored in database.
It will then select the image stored in database thats closest to the new one as the
15 IDOL
Serbian journal of electrical engineering by Marijeta Slavkovic, Duravka Jevticstates that the
human face is an extremely complex and dynamic structure with characteristics that can
quickly and significantly change with time and many face features make development of
facial recognition systems difficult. They describe to uses the method called Principal
Component Analysis.(PCA) that is based on an Eigen faces approach which represents a PCA
method in which a small set of significant features are used to describe the variation between
face images.
Vinay Hiremath, Ashwini Mayakar approached for Face recognition using Eigen faces where
they step towards developing a face recognition system which can recognize static images. It
can be modified to work with dynamic images. In that case the dynamic images received
from the camera can first be converted in to the static ones and then the same procedure can
be applied on them. Information obtained is decomposes face images into a small set of
characteristic feature images called Eigenfaces, which are actually the principal components
of the initial training set of face images. Recognition could be carried out under widely
varying conditions like frontal view, a 45 view, scaled frontal view, subjects with spectacles
etc. are tried, while the training data set covers limited views. The algorithm models the realtime varying lighting conditions as well.
16 IDOL
Facial feature detection using Haar classifiers By Phillip Ian Wilson and Dr. John Fernandez
states an image is only a collection of colors and/or light intensity values. Analyzing these
pixels for face detection is time consuming and difficult to accomplish because of the wide
variations of shape and pigmentation within a human face. Pixels often require reanalysis for
scaling and precision. Viola and Jones devised an algorithm, called Haar Classifiers, to
rapidly detect any object, including human faces, using Adaboost classifier cascades that are
based on Haar-like features and not pixels.
17 IDOL
18 IDOL
2D image
2D Face
Detection
Face
Recognition
As shown in the above (Fig. 1.5) the entire process is divided into three major steps:
1. Take an image in 2D.
2. Face detection.
3. Recognition using Eigenfaces Principal Component Analysis (PCA).
The facial image of the person is in 2D. Second step is the Face detection of 2D image. Now
this 2D sample image is used for detection process. The detected face is then applied to image
and recognition method uses Eigenfaces Principal Component Analysis (PCA) where
dynamic images received from the camera can first be converted in to the static ones. it
decomposes face images into a small set of characteristic feature images called Eigenfaces,
which are actually the principal components of the initial training set of face images.
Recognition is performed by projecting a new image into the subspace spanned by the
Eigenfaces (face space) and then classifying the face by comparing its position in the face
space with the positions of the known individuals. The Eigenfaces approach gives us efficient
way to find this lower dimensional space. Any face can be expressed as linear combinations
of the singular vectors of the set of faces, and these singular vectors are eigenvectors of the
covariance matrices.
19 IDOL
2. 2D Face Detection:
Image pre-processing often takes the form of signal conditioning (such as noise removal,
and normalization against the variation of brightness). Filtering of given image is required
to achieve it.
In this application, it will employ the face detection method developed by Viola based on
an Adaboost and cascade algorithm which uses the rectangular Haar features. The selected
Haar-like features (masks) will effectively represent particular facial features. Using eyes
as one of the facial feature for face detection has the advantages of being easy to detect and
robust to image noises. After the detection of faces in a given image, extraction of these
faces will be carried out.
3. Face Recognition:
20 IDOL
( ) i
i=1
=( 1+ 2+ 3 ++ M ) / M
i = i
Covariance Matrix:
C=AA T , where
A=[1 , 2 , M ]
where N2XN2 .
Size of covariance matrix will be N2XN2 . Eigen vectors corresponding to this covariance
matrix is needed to be calculated, but that will be tedious task therefore, for simplicity we
calculate ATA which would be a 2X2 matrix.
Consider the eigenvectors vi of ATA such that,
A T AX i=i X i
The eigenvectors vi of ATA are X1 and X2 which are 2X1. Now multiplying the above equation
with A both sides we getAA T AX i= Ai X i
AA T ( AX )i =i ( AX )i
Eigen vectors corresponding to ATA can now be easily calculated now with reduced
dimensionality where AXi is the Eigen vector and i is the Eigen value.
21 IDOL
Recognition step:
The test image, , is projected into the face space to obtain a vector, as
=U T ( )
The distance of to each face is called Euclidian distance and defined by
2k = k
2;
A face is classified as belonging to class k when the minimum k is below some chosen
threshold c. Otherwise the face is classified as unknown.
c, is half the largest distance between any two face images:
22 IDOL
( 12 ) max
c =
j ,k
|| jk||; j, k =1, ., M
To find the distance between the original test and its reconstructed image from the Eigen
face f
2 =|| f||
2,
where
f =U+
If c then input image is not even a face image and not recognized.
If < c and k for all k the input image is a face image but it is recognized as unknown
face.
If < c and k < for all k then input images are the individual face image associated with
the class vector k.
23 IDOL
1.8 Assumptions
The physical appearance of the person remains the same eg : specks or bear are not
taken into account while detecting contour parts like eyes or while recognizing
person.
SYSTEM REQUIREMENTS
2 System Requirements
For every successful project proper use of its resources is the major factor. For the success of
software projects proper intelligent use of the available hardware and software is important.
Hardware Requirement:
The minimum required configuration:
Software Requirement:
JANUARY
3 MATLAB
MATLAB is a high-performance language for technical computing. It integrates computation,
visualization, and programming in an easy-to-use environment where problems and solutions
are expressed in familiar mathematical notation.
MATLAB is an interactive system whose basic data element is an array that does not require
dimensioning. This allows you to solve many technical computing problems, especially those
with matrix and vector formulations.
The MATLAB system consists of five main parts:
Development Environment: -This is the set of tools and facilities that help you use
MATLAB functions and files.
The MATLAB Mathematical Function Library:- This is a vast collection of computational
algorithms ranging from elementary functions to more sophisticated functions.
The MATLAB Language:-This is a high-level matrix/array language with control flow
statements, functions, data structures, input/output, and object-oriented programming
features.
Graphics: - MATLAB has extensive facilities for displaying vectors and matrices as graphs,
as well as annotating and printing these graphs. It includes high-level and low-level
functions.
The MATLAB Application Program Interface (API):- This is a library that allows you to
write C and FORTRAN programs that interact with MATLAB to work with MATLAB
implementations on several different computer systems, or need to transmit MATLAB
applications to users on other systems. MATLAB applications consist of M-files containing
functions and scripts, and MAT-files containing binary data. Both types of files can be
transported directly between machines: M-files because they are platform independent and
MAT-files because they contain a machine signature in the file header. MATLAB checks the
signature when it loads a file and, if a signature indicates that a file is foreign, performs the
necessary conversion.
In iterative model we can only create a high-level design of the application before we
actually begin to build the product and define the design solution for the entire
product. Later on we can design and built a skeleton version of that, and then evolved
the design based on what had been built.
In iterative model we are building and improving the product step by step. Hence we
can track the defects at early stages. This avoids the downward flow of the defects.
In iterative model we can get the reliable user feedback. When presenting sketches
and blueprints of the product to users for their feedback, we are effectively asking
them to imagine how the product will work.
In iterative model less time is spent on documenting and more time is given for
designing.
Costly system architecture or design issues may arise because not all requirements are
gathered up front for the entire lifecycle
Major requirements must be defined; however, some details can evolve with time.
Use Case is a description of a systems behavior from a users point of view. It is a set of
scenarios that describe an interaction between a user and a system. It also displays the
relationship among Actors and Use Cases.
Two main components of Use Case diagram are Use Cases and Actors.
Use case diagrams, which render the User View of the system describe the
functionality (Use Cases) provided by the system to its
users (Actors).
An Actor represents a user or another system that will interact with the system you
are modeling.
Capture Image
Select Face
Detection
User
Detect Faces in
Image
Select Face
Recognition
Recognize
faceFace
System
Sequence Diagrams are used to depict the time sequence of messages exchanged
between objects.
Start
Select?
Y
the Browser
N
Perform
face detection
Y
Click the Face Recognition button
26th Dec.
2015
7th Feb
2015
Project Initiation
Feasibility Study
Project Analysis
Project Design
Software Coding
Testing
Implementation
Documentation
Maintenance
Time
Duration
Fig.4.4: Gantt Chart
26th Feb
2015
11thMarch
2015
16th Mar.
2015
allotted time for each phase of the cycle and the actual time taken to go through a phase while working to
develop the system.
IMPLEMENTATION PHASE
1.1 SCREEN-SHOTS
Fig 5.1 shows the basic GUI for Face Detection and Recognition
Fig 5.3 Shows a person image for Face Detection that is been selected by user
Fig 5.4 Detecting the face using the algorithm mentioned above
Fig 5.6: The Detected Face is been matched with the Database for Recognition process
Fig: 5.7 redirect the user to Home screen for more process
Testing
6 TESTING
Test Case 1:
Sr
Imag
Detection
Recognition
Output
NO.
1
e
S4-1
Process
Face Detected
Process
Face
System
Recognized
properly
Face
System
Recognized
properly
Face
System
Recognized
properly
Face
System
Recognized
properly
S4-2
S4-3
S4-4
Face Detected
Face Detected
Face Detected
Conclusion
working Pass
working Pass
working Pass
working Pass
Test Case 2:
Sr
Image
Detection
Recognition
Output
NO.
1
S13-2
Process
Face Detected
Process
Face
System
S13-5
Face Detected
Recognized
Face
properly
System working Pass
Face Detected
Recognized
Face
properly
System working Pass
properly
System working Pass
S13-8
Conclusion
working Pass
S13-10
Face Detected
Recognized
Face
Negative
Face
Recognized properly
Face
not System working Pass
Image(Flower
not Detected
Recognized
properly
)
Table 6.2: 2D Face Detection and Recognition Condition Test
Test Case 3:
Sr
Image
Detection
Recognition
Output
NO.
1
S25-1
Process
Face Detected
Process
Face
System
working Pass
S25-3
Face Detected
Recognized
Face
properly
System
working Pass
Face Detected
Recognized
Face
properly
System
working Pass
Face Detected
Recognized
Face
properly
System
working Pass
Recognized
properly
3
4
S25-7
S25-9
Conclusion
Test Case 4:
Sr
NO.
1
Image
Detection
Recognition
Output
Conclusion
S33-1
Process
Face Detected
Process
Face
System
working Pass
properly
System
working Pass
S33-2
Face Detected
Recognized
Face
S33-3
Face Detected
Recognized
Face
properly
System
working Pass
Face Detected
Recognized
Face
properly
System
working Pass
S33-4
Recognized
properly
Table 6.4: 2D Face Detection and Recognition Condition Test
True Detection
True Detection
imhist
1
3
7
9
8
imadjust
6
10
8
10
10
In the table the row represents the number of times the face is detected in the subject image
using the technique in column heading.
Face Recognition accuracy is approx. ~ 100%
COST ESTIMATION
ANALYSIS
Ei a * ( KSLOC )
Where a & b are constants which are determined depending on the type of
project.
KSLOC is Thousand Single lines of Code.
2. Determine a set of 15 multiplying factors from different attributes of the
product which are: product, computer, personnel and technology attributes
(called project attributes).
Effort Adjustment Factor (EAF)
The Effort Adjustment Factor in the effort equation is simply the product of the effort
multipliers corresponding to each of the cost drivers for your project. Final effort
estimate is calculated by multiplying the initial estimate with EAF:
E=EAF * Ei (person-month)
Rating
Rating
High
1.15
Database Size
Nominal
1.00
Nominal
1.02
Nominal
1.00
Hardware Attributes
Run-time performance constraints
Memory Constraints
High
1.08
Low
0.87
High
2.01
Analyst Capability
Nominal
1.00
Nominal
1.00
Application experience
Nominal
1.00
Nominal
1.10
Nominal
1.00
Nominal
1.00
Nominal
1.00
Nominal
1.00
Personnel Attributes
Project Attributes
EAF=1.15*1.00*1.02*1.00*1.08*0.87*2.01*1.00*1.00*1.00*1.10*1.00*1.00*1.00*1
.00
=5.237
KSLOC = 0.900
Here ai=3.2 and bi=1.05
Ei = (3.2)*(0.90)1.05= 6.384
E = EAF * Ei= 5.237* 6.384= 33.433
E
Effort= 2 Person-Month
Estimation of Development and Cost
From the above data, we have inferred that the KSLOC is 0.900 and the effort
is 2 Person-Month. On the basis of this data, we can estimate the development time.
Development time=4 Months
Project cost per day is 200 so total cost of the project including all the third
party tools is
Total Cost = 4*33*200
Total Cost = 26,400/-
CONCLUSION
8 CONCLUSIONS
We have presented an approach for 2D Face detection and recognition which minimizes
computation time while achieving high detection and recognition accuracy. Face Detection
and recognition uses method Viola based on an adaboost and cascade algorithm which uses
the rectangular Haar features and eigenfaces as proposed. The used database of face images
which contains 420 images of 40 different persons (10 images per person). From the results,
it can be concluded that, for detection and recognition, it is sufficient to take about 10%
eigenfaces with the highest eigenvalues. It is also clear that the detection and recognition rate
increases with the number of training images per person. This system brings together new
algorithms, representations, and insights which are quite generic and may well have broader
application in computer vision and image processing. The system states that face detection
and recognition combined with other technologies and features can produce effective and
powerful applications.
8.1 APPLICATIONS
1. We have made a user friendly Browser which displays the files stored in the drives of a
particular system from which a user can select a file for insertion, then using our application
software for face detection in selected file.
2. Used in Industries for attendance system for an Employee using the Database.
3. Our software can be used at airports or any public places for detecting any suspicious person or
terrorist.
4. This application can be used in Network (LAN or Internet) where a user can upload an image
file to our system which will be running at server end and then it will perform intended function
and will return result to client who had inserted image to the application.
5. This application can be used in Laptops or PCs by using Webcam for user authentication as a
secondary part if user doesnt want to enter password.
3 BIBILOGRAPHY
9.1 REFERENCES
[1] Marijeta Slavkovic, Dubravka Jevtic Face Recognition Using Eigenface Approach
[2] Abhishek Singh, Saurabh Kumar Face Recognition Using PCA and Eigen Face Approach
[3] Paul Viola and Michael Jones Fast and robust Classification using Asymmetric AdaBoost and
a Detector Cascade
[4] David Cristinacce and Tim Cootes Facial feature detection using AdaBoost with shape
Constraints
[5] http://www.facedetection.com/facedetection/datasets.html - (The Database for Face
Detection and Recognition) [Accessed on 22 January 2015]