0% found this document useful (0 votes)
56 views

Face Identification Using Haar Cascade Classifier

The document discusses face identification using the Haar cascade classifier and Viola-Jones detection algorithm. The Haar cascade classifier is trained on faces and non-faces to identify facial features using Haar-like features such as edges, lines and rectangles. AdaBoost is used to select the most useful features from over 160,000 possible options to construct a strong classifier for detection. Cascading is employed to quickly discard non-face windows and focus on potential face regions by dividing the strong classifier into multiple cascades that are applied sequentially.

Uploaded by

Hamza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views

Face Identification Using Haar Cascade Classifier

The document discusses face identification using the Haar cascade classifier and Viola-Jones detection algorithm. The Haar cascade classifier is trained on faces and non-faces to identify facial features using Haar-like features such as edges, lines and rectangles. AdaBoost is used to select the most useful features from over 160,000 possible options to construct a strong classifier for detection. Cascading is employed to quickly discard non-face windows and focus on potential face regions by dividing the strong classifier into multiple cascades that are applied sequentially.

Uploaded by

Hamza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Face Identification using Haar cascade

classifier

A facial identification system is a technology capable of identifying a face of


a person from a digital image or a video frame from a video source.

The Haar cascade classifier is based on the Viola-Jones detection algorithm,


which is trained by feeding a set of input faces and non-faces into a classifier
that can identify a face.

A Haar-Feature is just like a kernel in CNN, except that in a CNN, the values
of the kernel are determined by training, while a Haar-Feature is manually
determined.
Some Haar-Features are listed above. The first two are called "edge features"
since they are used to detect edges. The third is a "line feature," and the fourth
is a "four rectangle feature," both of which are most likely employed to detect
a slanted line.When haar features are applied to image to a girl.

Each feature results in a single value which is calculated by subtracting the


sum of pixels under a white rectangle from the sum of pixels under the black
rectangle.

Every haar feature bears some relation to a facial feature.


Viola-Jones uses 24*24 as base window size and calculates the above features
all over the image shifting by 1 PX.

If we consider all possible haar feature properties such as position, scale, and
type, we end up with almost 160,000 features. As a result, for each 24*24 PX,
we must analyse a large number of characteristics.

If we consider all possible haar feature properties such as position, scale, and
type, we end up with almost 160,000 features. As a result, for each 24*24 PX,
we must analyse a large number of characteristics.

AdaBoost:
As previously stated, a detector with 24*24 base resolution can have up to
160,000+ feature values that must be calculated. However, it must be
remembered that only a small subset of these features will be relevant in
identifying a face. AdaBoost is used to eliminate redundant features and
choose only those that are useful.

For example, feature detecting a vertical edge is useful detecting a nose but
irrelevant detecting a lip.

AdaBoost is used to select the best features from among the 160,000+
possible options. Weak classifiers are another name for these features.
Following the discovery of these features, a weighted mixture of all of these
features is used to evaluate and determine whether or not a specific window
has a face. Each of the chosen characteristics (weak classifiers) is considered
acceptable for inclusion if it can at least outperform random guessing (detects
more than half the cases). Each of the weak classifiers is useful for detecting a
different face feature. The output of a weak classifier is binary if it has
identified a part of the face or not.

Adaboost constructs a strong classifier as a linear combination of these weak


classifiers.

Strong classifier = linear sum of weak classifiers

F( x ) = ∑ ( αᵢ * fᵢ( x ) )

here αᵢ are corresponding weights to each weak classifier fᵢ(x)

Cascading:

For each 24*24 window, we must calculate 2,500 relevant features among
160,000 features selected by AdaBoost. We need to move our 24*24 window
all across the image, compute 2,500 features for each window, and then take a
linear combination of all outputs to determine whether it exceeds a particular
threshold.Even if an image should contain one or more faces it is obvious that
an excessively large amount of the evaluated sub-windows will still be
negatives (non-faces).
 So the algorithm should concentrate on discarding non-faces quickly
and spend more on time on probable face regions.

 Hence a single strong classifier formed out of the linear combination


of all best features is not good to evaluate on each window because
of computation cost

Cascades are used instead of calculating 2,500 characteristics per each


window. We sample 2,500 characteristics and divide them into x distinct
cascades. We can now detect whether or not there is a face in distinct cascades
in a linear manner. The image is forwarded to the next cascade if
cascade finds a face in it. We can move to the next window if no face is
detected in the cascade. This decreases the complexity of time..

Each stage's function is to decide if a given sub window is definitely not


a face or could be one. If a sub window fails in any of the stages, it is
instantly dismissed as not a face.
Weights are saved in the disc and the viola-Jones facial detection
algorithm is trained. We just apply the features from the file to our
image, and if the face is there, we obtain the face
location.

You might also like