A slides presentation on the Viola Jones Face Detection algorithm. The presentation includes information about the algorithm and implementation in the OpenCV Library

© All Rights Reserved

72 views

A slides presentation on the Viola Jones Face Detection algorithm. The presentation includes information about the algorithm and implementation in the OpenCV Library

© All Rights Reserved

- Call for Book Chapters: DEEP LEARNING FOR IMAGE PROCESSING APPLICATIONS
- Ched Cmo 25 s 2015 BSCS BSIS BSIT With Sample Curricula
- Vision Inspection Applied to Leather Quality Control
- Importance of Post Processing for Improved Binarization of Text Documents
- List of Book - Computer Science
- Sparse Representation-based Human Action Recognition using an Action Region-aware Dictionary
- Thesis - Object based Mapping
- Unit 4 Association Rule Mining
- winter1516_lecture1
- jd
- Land rover original
- cse420fa08_PA3
- Nvidia GPU V2
- Major Fields Computer Science
- 9. ERROR CONTROL.pdf
- ads samples.pdf
- Improved Performance of Image Fusion by MSVD (3)
- 23DemoPartitioning.pdf
- Code
- week1

You are on page 1of 33

Augusto Morgan

Institute of Computing - University of Campinas

augusto.morgan@students.ic.unicamp.br

June 9, 2014

June 9, 2014

1 / 22

Overview

Object Detection

Haar-like features and the integral image

AdaBoost

Cascade of Weak Classifiers

June 9, 2014

2 / 22

Object Detection

June 9, 2014

3 / 22

Object Detection

We can use a classifier:

Given an image, is it the object we are looking for or not?

But what if the images contains a lot of other objects?

We are interested in finding where in the image are the objects.

June 9, 2014

3 / 22

Sliding Window

We slice the image in small subwindows and apply the classifier on each

one of them.

Problems?

June 9, 2014

4 / 22

It discards a great number of negative samples before applying too

much processing time on them, achieving high frame-rates

How does it achieve that?

June 9, 2014

5 / 22

The classifier used in the paper is bases on Haar-like features.

Haar wavelet

function:

1 0 t < 21 ,

(t) = 1 12 < t 1,

0 otherwhise.

Figure: Haar wavelet

June 9, 2014

6 / 22

Haar-like Features

Rectangles representing a score based on positive areas and negative areas.

Three kind of features: 2, 3 and 4 rectangles.

Each feature is calculated by:

X

X

f (i) =

IWhite

IBlack

Features

Augusto Morgan (IC)

June 9, 2014

7 / 22

Haar-like Features

Rectangles representing a score based on positive areas and negative areas.

Three kind of features: 2, 3 and 4 rectangles.

Each feature is calculated by:

X

X

f (i) =

IWhite

IBlack

Problem: The number of

Haar-Like Features is too large!

For a 24x24 pixels window there

are more than 160,000 distinct

Haar-Like Features.

Augusto Morgan (IC)

Features

June 9, 2014

7 / 22

New intermediate representation of

the image, similar to the Summed

Area Table used in CG.

Each pixel (x,y) contains the sum of

the original pixels above and to the

left of (x,y), inclusive.

ii(x, y ) =

i(x 0 , y 0 )

x 0 <x

y 0 <y

the original image.

June 9, 2014

8 / 22

be calculated using the integral

image in four array references.

Sum(R) = ii(A)ii(B)ii(D)+ii(C )

Figure: The sum of one

rectangle using the integral

image

calculated in a few array

references.

June 9, 2014

9 / 22

However they are really fast!

June 9, 2014

10 / 22

However they are really fast!

They can be calculated at different scales without the need to calculate a

Gaussian Pyramid and each level integral image, wich speeds up its use

with multiscale detection.

Every other feature strategy that need the Pyramid to be calculated for

multiscale runs slower than this approach.

June 9, 2014

10 / 22

Given the features and the set of positive and negative examples, any

classifier can be trained.

There are, however, a huge number of features.

A very small number of features can be combined to create an effective

classifier.

How to find these features?

June 9, 2014

11 / 22

A weak classifier

The weak classifier used in the paper takes as input a sub-window (x) and

consists of a feature (f ), a threshold () and a polarity (p) indicating the

direction of the following inequality:

1 pf (x) < p,

h(x, f , , p) =

0 otherwhise.

The weak classifier used can be viewed as a single node decision tree, a

stump.

For each feature, an optimal threshold is associated, which is used to

minimize the number of missclassifications.

June 9, 2014

12 / 22

AdaBoost

It combines weak classification functions, to create a more powerfull one.

June 9, 2014

13 / 22

AdaBoost

It combines weak classification functions, to create a more powerfull one.

At each round the examples are re-weighted to emphasize those which

were incorrectly classified by the previous weak classifier.

The final strong classifier is a weighted combination of weak classifiers

followed by a threshold.

June 9, 2014

13 / 22

AdaBoost

AdaBoost is actually selecting a small set of good features.

June 9, 2014

14 / 22

AdaBoost

AdaBoost is actually selecting a small set of good features.

This way, the weak learning algorithm tries to select the single rectangle

that best separate the positive and negative examples.

June 9, 2014

14 / 22

Training

June 9, 2014

15 / 22

Training

All examples start with the same weight.

June 9, 2014

15 / 22

Training

All examples start with the same weight.

At each round it searches over a large set of features and thresholds,

choosing the feature/threshold that minimize the weighted error.

June 9, 2014

15 / 22

Training

All examples start with the same weight.

At each round it searches over a large set of features and thresholds,

choosing the feature/threshold that minimize the weighted error.

The examples wrongly classified have their weight changed and the process

is repeated.

June 9, 2014

15 / 22

Considerations

Huge set of possible features and related thresholds (NK , where N is the

number of examples and K the number of features).

For 20000 samples and 160000 features (the number for the 24x24 pixels

subwindow) contains 3.2 billion distincts classifiers!

If using M rounds, AdaBoost takes O(MKN).

June 9, 2014

16 / 22

Considerations

Huge set of possible features and related thresholds (NK , where N is the

number of examples and K the number of features).

For 20000 samples and 160000 features (the number for the 24x24 pixels

subwindow) contains 3.2 billion distincts classifiers!

If using M rounds, AdaBoost takes O(MKN).

For each subwindow, all the classifiers are used and combined to get the

final answer.

What if we could eliminate subwindows earlier?

June 9, 2014

16 / 22

The insight is that smaller, and therefore more efficient, boosted classifiers

can be constructed which reject many of the negative sub-windows while

detecting almost all positive instances.

June 9, 2014

17 / 22

The insight is that smaller, and therefore more efficient, boosted classifiers

can be constructed which reject many of the negative sub-windows while

detecting almost all positive instances.

This can be done by adjusting the threshold in the AdaBoost algorithm, to

minimize false-negatives.

June 9, 2014

17 / 22

They achieved 100% Hit Rate, and 50% False Positive in the first 2

feature classifier.

Far from acceptable, but, with a few operations they can discard around

50% of the non-face sub-windows. And this is only the first classifier.

June 9, 2014

18 / 22

They achieved 100% Hit Rate, and 50% False Positive in the first 2

feature classifier.

Far from acceptable, but, with a few operations they can discard around

50% of the non-face sub-windows. And this is only the first classifier.

A cascade of classifiers is built this way, with the positive output of each

one, activating the next one, using the more complex classifiers only in the

sub-windows that are more likely a face.

Since the great majority of sub-windows of an image are negative, the

cascade tries to eliminate as many sub-windows as possible at the earliest

stage possible.

June 9, 2014

18 / 22

the same face, to have no duplicates.

Augusto Morgan (IC)

June 9, 2014

19 / 22

Proposed by Rainer Lienhart and Jochen Maydt in 2002.

Same principle, more variability.

June 9, 2014

20 / 22

June 9, 2014

21 / 22

References

Viola, P. and Jones. M., CVPR 2001, Rapid Object Detection using a

Boosted Cascade of Simple Features

Viola, P. and Jones. M., International Journal of Computer Vision

v. 57 2004, Robust Real-Time Face Detection.

Lienhart, R. and Maydt, J., IEEE ICIP 2002, An Extended Set of

Haar-like Features for Rapid Object Detection

Weisstein, Eric W. Haar Function. From MathWorldA Wolfram

Web Resource. http://mathworld.wolfram.com/HaarFunction.html

June 9, 2014

22 / 22

- Call for Book Chapters: DEEP LEARNING FOR IMAGE PROCESSING APPLICATIONSUploaded byVania V. Estrela
- Ched Cmo 25 s 2015 BSCS BSIS BSIT With Sample CurriculaUploaded byJonathan Japson Pastera
- Vision Inspection Applied to Leather Quality ControlUploaded bychainleigh
- Importance of Post Processing for Improved Binarization of Text DocumentsUploaded byesatjournals
- List of Book - Computer ScienceUploaded bylibranhitesh7889
- Sparse Representation-based Human Action Recognition using an Action Region-aware DictionaryUploaded byWesley De Neve
- Thesis - Object based MappingUploaded byantoniohps
- Unit 4 Association Rule MiningUploaded byAllison Collier
- winter1516_lecture1Uploaded byIresh
- jdUploaded byBijaya Basanta
- Land rover originalUploaded byVenkatesh Emandi
- cse420fa08_PA3Uploaded byJimmy Bronco
- Nvidia GPU V2Uploaded byIvan Galeana Aguilar
- Major Fields Computer ScienceUploaded byshu2u
- 9. ERROR CONTROL.pdfUploaded byabi
- ads samples.pdfUploaded byAnonymous tVTA5g2RhN
- Improved Performance of Image Fusion by MSVD (3)Uploaded byInternational Journal of Innovative Science and Research Technology
- 23DemoPartitioning.pdfUploaded bybui ton
- CodeUploaded byAfzalkhansk
- week1Uploaded byBalachandra Mallya
- SanchezL_IJISUploaded bylsramos@telefonica.net
- Lecture14 Anshul Gupta 07CS3020Uploaded byMark
- Human Detector and Counter Using Raspberry 2017Uploaded byHarshvardhanUpadhyay
- 1-s2.0-S1877050917316599-mainUploaded byeric smith
- 335-1221-1-PBUploaded byDewi Syahputri
- Nozzle arrangements by jakijakiUploaded bySachin
- AICTE Books Catalog.xlsxUploaded byTripti Gupta
- Survey on Image Fusion TechniquesUploaded byGRD Journals
- linked list ppt cs a levelUploaded bylouisa
- Bca 3 Sem Data Structures Summer 2017Uploaded bySaurabh Raut

- Genetic Algorithm ClassNotes(All in ONE)Uploaded byKishore Chand
- L3-1Uploaded byT uohz
- active suspension system lab course manualUploaded byasad_asghar_janjua
- What is the Comparison Among Newtonian, Lagrangian, Hamiltonian, And Quantum Mechanics? - QuoraUploaded byGodwin Larry
- 1134Uploaded byGilberto Ardila Ruiz
- FEM 14Uploaded byLakshmiNarayana Adari Lucky
- learningFromDocs.pdfUploaded bytnmartist
- A Learning Adaptive Bollinger Band SystemUploaded bySaeed Ebrahimijam
- Public Key CryptographyUploaded byHarneet Singh Chugga
- Rr210504 Design and Analysis of AlgorithmsUploaded byVam Si
- Quiz3-2017Uploaded bynorbihaver
- Load forecasting class (2).pptxUploaded bySumit Dhingra
- Modern Control TheoryUploaded bykartheek427
- Data Structure and Algorithms AssignmentUploaded byMajid Yaseen
- Snn&DbscanUploaded byvnh
- Chapter_6 (1)Uploaded bykomal singh
- Eu 14 Apvrille Hide Android Applications in Images WpUploaded byShivam Baliyan
- Soft Computing Class1Uploaded bySherinPm
- Matrix NormsUploaded byulbrich
- An investigation into RSAUploaded byDonald Church
- 2.- Eigenvalues and Eigenvectors (Part 1)Uploaded byAna Juárez
- Three-Dimensional Crane Modelling and ControlUploaded byAna Musra
- 04_classification_basics.pdfUploaded byWang Chen Yu
- DFA MinimizationUploaded byAditya
- branson linear recursion taskUploaded byapi-298215585
- NS Question BankUploaded byshinde_jayesh2005
- matlab_ref.pdfUploaded byMehmed Uyar
- MILP for ControlUploaded bynarendra
- Decision Making Under UncertaintyUploaded byayushdixit
- Augustine Resume New 3Uploaded byimastine2003

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.