Anda di halaman 1dari 61

2D Face Detection and Recognition

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

2D Face Detection and Recognition

ABSTRACT

2 IDOL

2D Face Detection and Recognition

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

2D Face Detection and Recognition

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

Existing System Overview

18

1.6

Proposed System

19-23

1.7

Image Database

24

1.8

Assumptions

24

System Requirements

25-26

Technology Used

27-28

Structured Approach For System Analysis And 29-39


4.1

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

Cost Estimation Analysis

53-56

5
5.1

4 IDOL

2D Face Detection and Recognition

Conclusion

57-59

8.1

Applications

58

8.2

Future Enhancement

59

Bibliography

60

References

61

9
9.1

5 IDOL

2D Face Detection and Recognition

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

2D Face Detection and Recognition

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

2D Face Detection and Recognition

INTRODUCTION

8 IDOL

2D Face Detection and Recognition

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

2D Face Detection and Recognition

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

2D Face Detection and Recognition

1.1 PROBLEM DEFINITION


Face Detection
Face detection is an essential application of visual object detection and it is one of the main
components of face analysis and understanding with face localization and face recognition.
Automatic face detection is a complex problem which consists in detecting one or many
faces in an image. Faces are non-rigid objects. Face appearance may vary between two
different persons but also between two photographs of the same person, depending on the
lightning conditions, the emotional state of the subject and pose. That is why so many
methods have been developed during last few years.
Facial expression is also directly affected by a person's facial expression.
Faces may be partially occluded by other objects. Orientation of face appearance directly vary
for different rotations about the camera's optical axis
Imaging conditions such as lighting (spectra, source distribution and intensity) and camera
characteristics (sensor response, gain control, lenses), resolution

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

2D Face Detection and Recognition

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

2D Face Detection and Recognition

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

2D Face Detection and Recognition

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

2D Face Detection and Recognition

1.3 Scope

Take a 2d image file

Apply face detection and get the detected face.

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

most likely known person.


If the distance to that face image is above a threshold, "recognize" the image as that
person, otherwise, classify the face as an "unknown" person.

15 IDOL

2D Face Detection and Recognition

1.4 Literature Review


Many researchers have proposed numerous methods for 2D Face Detection and Recognition
since the human face poses even more problems than other objects although the human face
is a dynamic object that comes in many forms and colors. Using Face Detection approach, a
photo is searched to find any face, or it is captured through webcam then the image
processing cleans up the facial image for easier recognition. Later Face Recognition is used,
where that detected and processed face is compared to a database of known faces, to decide
who that person is.

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

2D Face Detection and Recognition

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

2D Face Detection and Recognition

1.5 Existing System Overview


Every face or image that we can see on machine is in its 2 dimensional form. There are many
different technologies available today to uniquely identify a persons identity. Many of which
like Password/PIN known as Personal Identification Number systems are the most common
in practice today. However these systems have their own intrinsic drawbacks. Passwords can
be forgotten and worse if they are lost or stolen, person identity can be misused by somebody
else. In order to overcome these problems there has been a considerable interest in
"biometrics" identification systems, which use pattern recognition techniques to identify
people using their unique characteristics. Some of those methods are fingerprints and retina
and iris recognition. But these are obtrusive and expensive.
Face Recognition is one of the simplest and most effective PCA approaches used in face
recognition systems is the so-called Eigenfaces approach. This approach transforms faces into
a small set of essential characteristics, Eigenfaces, which are the main components of the
initial set of learning images (training set).
2D face recognition gives best result when image is frontal and effect of illumination is
negligible.

18 IDOL

2D Face Detection and Recognition

1.6 Proposed System

2D image

2D Face
Detection

Face
Recognition

Figure 1: Block Diagram of proposed system

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

2D Face Detection and Recognition

Figure-1 can explained as follows


1. 2D Image:
The 2D image is a .jpg files extension 2d image. It contains X, Y co-Coordinates, Color
indices & Vectors.

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:

Face Image Representation


Training set of m images of size NXN are represented by vectors of size N2.
Each face is represented by 1,2,3,M.
Feature vectors of a face are stored in NXN matrix. Now, this two-dimensional vector is
changed to one dimensional vector.
Each face image is represented by the vector i.

20 IDOL

2D Face Detection and Recognition

Mean and Mean Centered Images:


Average face image is calculated by
1
=
M

( ) i
i=1

=( 1+ 2+ 3 ++ M ) / M

Each face differs from the average by

i = i

which is called mean centered image.

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

2D Face Detection and Recognition

Eigen faces space:


The Eigen vector of the covariance matrix ATA is AXi which are denoted by Ui. Ui
resemblance facial images which look ghostly and are called Eigen faces. Eigen vectors
correspond to each Eigen face in the face space and discard the faces for which Eigen values
are zero thus reducing Eigen face space to an extent. The Eigen faces are ranked according to
their usefulness in characterizing the variation among the images.
A face image can be projected into this face space by
T

k =U ( k ) , where k=1.M, (k ) is the mean centered image. Hence the projection


of each image can be obtained as 1 for projection of image1 and 2 for projection of image2
and hence forth.

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;

k=1M where k is the vector describing the kth face class.

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

2D Face Detection and Recognition

( 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

2D Face Detection and Recognition

1.7 Image Database


For evaluation of the proposed method, it has been implemented using Matlab2010 and tested
on a general purpose. The database is containing 400 images in JPEG format of size 384 x
256 or 256 x 384. The image set comprises 10 images in each of 40 categories of folder [1].In
particular, a retrieved image is considered a match if and only if it is recognized from the
database or in real-time captured image.

1.8 Assumptions

The facial expressions of the person remain constant.

Database is complete and stores sufficient images

Ageing characteristics of person is not considered.

Surrounding characteristics not considered.


The image is taken in such a way that contour features are detected.

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.

2D Face Detection and Recognition

SYSTEM REQUIREMENTS

2D Face Detection and Recognition

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:

X-86 based Personal Computer (P-IV or above recommended)


512 MB RAM
80 GB Hard Disk
SVGA Color Monitor (800 x 600 recommended)
Mouse
Multimedia System.

Software Requirement:

Matlab R2010a OR Above

2D Face Detection and Recognition

TECHNOLOGY USED FOR


DEVELOPING 2D FACE
DETECTION AND
RECOGNITION

2D Face Detection and Recognition

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

2D Face Detection and Recognition

signature when it loads a file and, if a signature indicates that a file is foreign, performs the
necessary conversion.

STRUCTURED APPROACH FOR


SYSTEM ANALYSIS AND DESIGN

2D Face Detection and Recognition

4.1 PROCESS MODEL SYSTEM


4.1.1 Iterative Enhancement Model
The incremental model (also known as iterative enhancement model) comprises the features
of waterfall model in an iterative manner. The waterfall model performs each phase for
developing complete software whereas the incremental model has phases similar to the linear
sequential model arid has an iterative nature of prototyping. During the implementation
phase, the project is divided into small subsets known as increments that are implemented
individually. This model comprises several phases where each phase produces an increment.
These increments are identified in the beginning of the development process and the entire
process from requirements gathering to delivery of the product is carried out for each
increment.
The basic idea of this model as shown in below Figure 2 is to start the process with
requirements and iteratively enhance the requirements until the final software is
implemented. In addition, as in prototyping, the increment provides feedback from the user
specifying the requirements of the software. This approach is useful as it simplifies the
software development process as implementation of smaller increments is easier than
implementing the entire system.
Each stage of incremental model adds some functionality to the product and passes it on to
the next stage. The first increment is generally known as a core product and is used by the
user for a detailed evaluation. This process results in creation of a plan for the next increment.
This plan determines the modifications (features or functions) of the product in order to
accomplish user requirements. The iteration process, which includes the delivery of the
increments to the user, continues until the software is completely developed.
Advantages of Iterative model:

2D Face Detection and Recognition

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.

Disadvantages of Iterative model:

Each phase of an iteration is rigid with no overlaps

Costly system architecture or design issues may arise because not all requirements are
gathered up front for the entire lifecycle

When to use iterative model:

Requirements of the complete system are clearly defined and understood.

When the project is big.

Major requirements must be defined; however, some details can evolve with time.

2D Face Detection and Recognition

Figure 2: Flow of Iterative Model.

4.2 UML DIAGRAM


The Unified Modeling Language (UML) is a graphical language for visualizing, specifying,
constructing, and documenting the artifacts of a software-intensive system. The UML offers
a standard way to write a system's blueprints, including conceptual things such as business
processes and system functions, as well as concrete things such as programming language
statements, database schemas, and reusable software components.

2D Face Detection and Recognition

4.2.1 USE CASE DIAGRAMS

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.

2D Face Detection and Recognition

Use Case Diagram


Browse Files

Capture Image
Select Face
Detection

User

Detect Faces in
Image
Select Face
Recognition

Recognize
faceFace

System

2D Face Detection and Recognition


Fig.4.2.1 Use-Case Diagram
Following figure is overview of use case in 2D Face Detection and recognition. The use-case are
described more detail in specific condition.

4.2.2 Activity Diagram

2D Face Detection and Recognition

Fig.4.2.2 : Activity Diagram


The following diagram is workflow of 2D Face Detection and Recognition to show system workflow

4.2.3 Sequence Diagram


A Sequence diagram describes interactions among classes in terms of an exchange of
messages over time.
Some of the facts related to Sequence Diagrams are:

Sequence Diagrams are used to depict the time sequence of messages exchanged
between objects.

Messages can correspond to operation on class or an event trigger.

As detailed as a method, which includes parameters passed and values returned.

Fig.4.2.3: Sequence Diagram

2D Face Detection and Recognition


The following diagram is sequence diagram which is core section in the system.
1. User selects specific image to perform face detection
2. Once face detected is done then face is been recognized.

4.3 Flow chart Diagram:


A flowchart is a diagram that describes a process or operation. It includes multiple steps,
which the process "flows" through from start to finish. Common uses for flowcharts include
developing business plans, and designing mathematical algorithms. Flowcharts typically use
standard symbols to represent different stages or actions within the chart. For example, each
step is shown within a rectangle, while each decision is displayed in a diamond.

2D Face Detection and Recognition

1. Flow chart Diagram

Start

Select?
Y

User Select Capture button

User selects the File/Folder from

from web- cam

the Browser

Click the Face Detection button

N
Perform
face detection

Y
Click the Face Recognition button

Display Matched Image


Stop
Fig.4.3: Flow chart Diagram

2D Face Detection and Recognition


The following diagram flowchart is a 2D Face Detection and Recognitions graphic
representation of how a process works, with the sequence of steps.

4.4 GANTT Chart:


Gantt chart is named its developer Henry Gantt. It is useful for scheduling, budgeting and
resource planning. A Gantt chart is a special type of bar chart where which bar consists of
white part and shaded part. The white part of the bar shows the length of time, each task is
slack time, i.e. the latest time by which a task must be finished.
The timeline chart is represented by a horizontal bar and the milestone achieved is marked on
the bar with the arrows representing the completion or start of an event. The horizontal bar is
divided into the time intervals or duration period; month by month, day by month, month by
year, etc.
Activities

26th Dec.
2015

13th Jan 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

2D Face Detection and Recognition


The (Fig. 4.4) the above Gantt chart shows the development life cycle of the proposed system. It shows the

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

2D Face Detection and Recognition

1.1 SCREEN-SHOTS

2D Face Detection and Recognition

Fig 5.1 shows the basic GUI for Face Detection and Recognition

2D Face Detection and Recognition

Fig 5.2 Captures the image from the folder

2D Face Detection and Recognition

Fig 5.3 Shows a person image for Face Detection that is been selected by user

2D Face Detection and Recognition

Fig 5.4 Detecting the face using the algorithm mentioned above

2D Face Detection and Recognition

Fig 5.5 the user Face is been Detected successfully

2D Face Detection and Recognition

Fig 5.6: The Detected Face is been matched with the Database for Recognition process

2D Face Detection and Recognition

Fig: 5.7 redirect the user to Home screen for more process

2D Face Detection and Recognition

Testing

2D Face Detection and Recognition

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

Table 6.1: 2D Face Detection and Recognition Condition Test

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:

2D Face Detection and Recognition

Table 6.3: 2D Face Detection and Recognition Condition Test

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

Face Detection Result:


The overall face detection performance is over 40 subjects is 73.78% using only imhist for
pre-processing, while it is 90% using imadjust for pre-processing. The significance
improvement issue to better contrast adjustment of imadjust as opposed to imhist.
The confusion matrix for the test data of 5 images is shown in the table:

2D Face Detection and Recognition

Each subjective in test has 10 images.


Subject
1
2
3
4
5

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

2D Face Detection and Recognition

7 CONSTRUCTIVE COST MODEL-COCOMO


MODEL
For any given set of requirements it is essential to know how much it will cost
to develop the application software to satisfy the given requirements and how much
time it will take for the development
The project has been developed considering the COCOMO (Constructive

2D Face Detection and Recognition

Cost Model) model which computes software development effort as a function of


program size and set of "Cost Drivers" that include product, hardware, personnel and
project attributes. Effort is calculated in terms of Person-Month.
Steps in the Analysis: 1. Obtain an initial estimate of development effort as follows:
b

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)

Following is a basic COCOMO model of the system based on ORGANIC MODE.


Product Attributes

Rating

Rating

Requires software reliability

High

1.15

Database Size

Nominal

1.00

Complexity of the product

Nominal

1.02

Nominal

1.00

Hardware Attributes
Run-time performance constraints

2D Face Detection and Recognition

Memory Constraints

High

1.08

Volatility of the virtual machine environment

Low

0.87

Computer turnaround time

High

2.01

Analyst Capability

Nominal

1.00

Software engineer capability

Nominal

1.00

Application experience

Nominal

1.00

Virtual Machine Experience

Nominal

1.10

Programming language experience

Nominal

1.00

Use of software tools

Nominal

1.00

Application of Software engineering methods

Nominal

1.00

Required development schedule

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

2D Face Detection and Recognition

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

2D Face Detection and Recognition

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

2D Face Detection and Recognition

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.

8.2 FUTURE ENHANCEMENT


Like any worldly commodity, every application-software needs to be maintained and enhanced to
be with the current times. It needs to be modified to add more and more features in it.
Since, we have made this application-software to only with images, it can also be integrated to
work with frames of images in videos or capture directly through cameras (real-time). Also, this
software is platform dependent and could work only under windows operating system, it should
be made platform independent using any programming language that is platform independent like
Java.
This would prove to be the additional usage of this application-software apart from just running
under a single operating system.

2D Face Detection and Recognition

Sometimes underlying images corresponds to differences between individual faces. This


assumption is, unfortunately, not always valid but shows faces from two individuals. More
training and research is required for smooth working.

3 BIBILOGRAPHY

2D Face Detection and Recognition

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]

2D Face Detection and Recognition

[6] http://wiki.expertiza.ncsu.edu/images/1/1c/Iterative.gif [Accessed on March 12 2015]


[7] http://www.technofist.in/cs/Image%20Processing/ircse09_submission_17.pdf [Accessed on
February 16 2015]
[8] http://www.cognotics.com/opencv/servo_2007_series/part_4/page_3.html [Accessed on March
8 2015]
[9] A. K. Jain, Fundamentals of Digital Image Processing. Englewood Cliffs, NJ: Prentice-Hall,
1991
[10] Oge Marques. Practical Image and Video processing using Matlab, Jhon Wiley and Sons,
Inc., Hoboken New Jersey, 2011.
[11] Matthew Turk and Alex Pentland- face-rec. algorithms-PCA A review

Anda mungkin juga menyukai