42
EE462 MLCV Lecture 5-6 Object Detection Boosting Tae-Kyun Kim

Lecture 5-6 Object Detection – Boosting

Embed Size (px)

DESCRIPTION

Lecture 5-6 Object Detection – Boosting. Tae- Kyun Kim. Face Detection Demo. Multiclass object detection [ Torralba et al PAMI 07]. A boosting algorithm, originally for binary class problems, has been extended to multi-class problems. Object Detection. - PowerPoint PPT Presentation

Citation preview

Semantic Texton Forests for Image Classification and Segmentation

Lecture 5-6 Object Detection Boosting Tae-Kyun KimEE462 MLCV1Face Detection Demo2EE462 MLCV3

Multiclass object detection [Torralba et al PAMI 07]A boosting algorithm, originally for binary class problems, has been extended to multi-class problems. EE462 MLCV3Object Detection4

Input: A single image is given as input, without any prior knowledge.EE462 MLCV4Object Detection5

Output is a set of tight bounding boxes (positions and scales) of instances of a target object class (e.g. pedestrian). EE462 MLCV5

6Object DetectionScanning windows: We scan every scale and every pixel location in an image.EE462 MLCV6

Number of Hypotheses7Number of Windows: e.g. 747,666x# of scales# of pixelsIt ends up with a huge number of candidate windows .EE462 MLCV7

Time per window8

or raw pixels

dimension D

Num of feature vectors: 747,666

Classification:What amount of time is given to process a single scanning window?SIFTEE462 MLCV8

Time per window9

or raw pixels

dimension D

Num of feature vectors: 747,666Time per window (or vector): 0.00000134 secIn order to finish the task say in 1 secNeural Network?Nonlinear SVM?EE462 MLCV9Examples of face detection10

From Viola, Jones, 2001EE462 MLCV10By Integrating Visual Cues [Darrell et al IJCV 00].

Face pattern detection output (left).Connected components recovered from stereo range data (mid).Regions from skin colour (hue) classification (right).

11

More traditionallyThe search space is narrowed down. EE462 MLCV11Since about 2001 (Viola &Jones 01) Boosting Simple Features has been a dominating art.Adaboost classification

Weak classifiers: Haar-basis features/functionsThe feature pool size is e.g. 45,396 (>>T)12

Weak classifierStrong classifier

EE462 MLCV12Introduction to Boosting Classifiers- AdaBoost (Adaptive Boosting)EE462 MLCV13Boosting14Boosting gives good results even if the base classifiers have a performance slightly better than random guessing.

Hence, the base classifiers are called weakclassifiers or weaklearners.EE462 MLCVBoosting15

For a two (binary)-class classification problem, we train with

training data x1,, xN target variables t1,, tN, where tN {-1,1}, data weight w1,, wN weak (base) classifier candidates y(x) {-1, 1}.EE462 MLCVBoosting doesIteratively, 1) reweighting training samples, by assigning higher weights to previously misclassified samples,2) finding the best weakclassifier for the weighted samples.16

1 round2 rounds3 rounds4 rounds5 rounds50 roundsEE462 MLCV16

17In the previous example, the weaklearner was defined by a horizontal or vertical line, and its direction. -1+1EE462 MLCVAdaBoost (adaptive boosting)18

: the number of weak classifiers to choose1. Initialise the data weights {wn} by wn(1) = 1/N for n = 1, ,N.2. For m = 1, ,M(a) Learn a classifier ym(x) that minimises the weighted error, among all weak classifier candidateswhere I is the impulse function.(b) EvaluateEE462 MLCV1819

and set(c) Update the data weights3. Make predictions using the final model byEE462 MLCVBoosting20

EE462 MLCVBoosting as an optimisation framework21EE462 MLCVMinimising Exponential Error22

AdaBoost is the sequential minimisation of the exponential error functionwhere tn {-1, 1} and fm(x) is a classifier as a linear combination of base classifiers yl(x)We minimise E with respect to the weight l and the parameters of the base classifiers yl(x).EE462 MLCV2223

Sequential Minimisation: suppose that the base classifiers y1(x) ,. , ym-1(x) and their coefficients 1, , m-1 are fixed, and we minimise only w.r.t. am and ym(x).

The error function is rewritten bywhere wn(m) = exp{tn fm-1 (xn)} are constants.

EE462 MLCV24

Denote the set of data points correctly classified by ym(xn) by Tm, and those misclassified Mm , then

When we minimise w.r.t. ym(xn), the second term is constant and minimising E is equivalent to EE462 MLCV25

By setting the derivative w.r.t. m to 0, we obtain

where

From

AsThe term exp(-m/2) is independent of n, thus we obtain

EE462 MLCV26

Pros: it leads to simple derivations of Adaboost algorithms.Cons: it penalises large negative values. It is prone to outliers.Exponential Error FunctionThe exponential (green)rescaled cross-entropy (red)hinge (blue), and misclassification (black) error ftns.EE462 MLCVExistence of weaklearnersDefinition of a baseline learnerData weights:SetBaseline classifier: for all xError is at most .

Each weaklearner in Boosting is required s.t.

Error of the composite hypothesis goes to zero as boosting rounds increase [Duffy et al 00].27

EE462 MLCV27Robust real-time object detectorViola and Jones, CVPR 01

http://www.iis.ee.ic.ac.uk/icvl/mlcv/viola_cvpr01.pdf

EE462 MLCV28Boosting Simple Features [Viola and Jones CVPR 01]Adaboost classification

Weak classifiers: Haar-basis like functions (45,396 in total feature pool)29

Weak classifierStrong classifier

24 pixels24pixelsEE462 MLCV2930

Learning (concept illustration)Face imagesNon-face imagesResized to 24x24weaklearners

Output: Resized to 24x24EE462 MLCVEvaluation (testing)31

Non-local maxima suppressionThe learnt boosting classifier i.e. is applied to every scan-window. The response map is obtained, then non-local maxima suppression is performed.

EE462 MLCV31Receiver Operating Characteristic(ROC)Boosting classifier score (prior to the binary classification) is compared with a threshold.

The ROC curve is drawn by the false negative rate against the false positive rate at various threshold values:

False positive rate (FPR) = FP/NFalse negative rate (FNR) = FN/P

where Ppositive instances, Nnegative instances, FP false positive cases, and FN false negative cases.32

> ThresholdClass 1 (face)Class -1 (no face)< ThresholdFPR FNR011EE462 MLCVHow to accelerate the boosting training and evaluationEE462 MLCV33Integral ImageA value at (x,y) is the sum of the pixel values above and to the left of (x,y).

The integral image can be computed in one pass over the original image.

34

EE462 MLCV34Boosting Simple Features [Viola and Jones CVPR 01]Integral imageThe sum of original image values within the rectangle can be computed: Sum = A-B-C+D

This provides the fast evaluation of Haar-basis like features35

645321(6-4-5+3)-(4-2-3+1) EE462 MLCV35Evaluation (testing)36

xyii(x,y)*In the coursework2, you can first crop image windows, then compute the integral images of the windows, than of the entire image.EE462 MLCV36Boosting as a Tree-structured ClassifierEE462 MLCV37Boosting (very shallow network) The strong classifier H as boosted decision stumps has a flat structure

Cf. Decision ferns has been shown to outperform trees [Zisserman et al, 07] [Fua et al, 07]38

c0 c1c0 c1c0 c1c0 c1c0 c1c0 c1

xEE462 MLCV38

Boosting -continued

Good generalisation is achieved by a flat structure.It provides fast evaluation.It does sequential optimisation.39A strong boosting classifierBoosting Cascade [viola & Jones 04], Boosting chain [Xiao et al]It is very imbalanced tree structured.It speeds up evaluation by rejecting easy negative samples at early stages. It is hard to design

A strong boosting classifierT = 25102050100EE462 MLCV39A cascade of classifiersThe detection system requires good detection rate and extremely low false positive rates.False positive rate and detection rate are

fi is the false positive rate of i-th classifier on the examples that get through to it.The expected number of features evaluated is

pj is the proportion of windows input to i-th classifier.40

EE462 MLCV40Demo video: Fast evaluation41

EE462 MLCV41Object Detection by a Cascade of Classifiers42

Romdhani et al. ICCV01 It speeds up object detection by coarse-to-fine search.EE462 MLCV42