Robust real time object detection


Published on

  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Robust real time object detection

  1. 1. Robust Real-Time Object DetectionAuthor: Paul Viola, Michael J. JonesInternational Journal of Computer Vision 57(2), 137–154, 2004Presented by ERLI – M10115801
  2. 2. Background & Motivation• Detecting object on real time• Detecting face
  3. 3. OutlineIntroductionImage Representation – Integral ImageLearning Algorithm – AdaBoostCascade ClassifierExperiment and Result
  4. 4. IntroductionObject DetectionDetection System
  5. 5. Object Detection>> Face DetectionPaul Viola Michael J. JonesIntroduction
  6. 6. Detection System24x24DetectionWindowThe size ofdetection windowwill be enlargedwith a certain scaleIntroduction
  7. 7. ImageRepresentationIntegral ImageIntegral Image Feature
  8. 8. Integral Image• Image representation• Feature• The integral image at location x,ycontains the sum of the pixelsabove and to the left of x,yIntegral Image | AdaBoost | CascadeSum of pixelvalue in this area(x,y)
  9. 9. Integral Image• Image representation• Feature• The integral image at location x,ycontains the sum of the pixelsabove and to the left of x,yIntegral Image | AdaBoost | CascadeSum of pixelvalue in this area(x,y)How to calculate D ?A BC D1 23 4
  10. 10. Integral Image• Image representation• FeatureIntegral Image | AdaBoost | CascadeHow to calculate D ?D = (1+4) – (2+3)A BC D1 23 41234
  11. 11. Integral Image FeatureIntegral Image | AdaBoost | CascadeDetection windowABCDDetection windowDetection window Detection windowThe value of integral imagefeature is the difference betweenthe sum of the pixels within thetwo rectangular regions.S1 S2 |S1-S2|
  12. 12. Integral Image FeatureIntegral Image | AdaBoost | CascadeThe size and position of feature can bedifferent.• The eye region is darkerthan the upper-cheeks.• The nose bridge region isbrighter than the eyes.
  13. 13. Integral Image• Different size and position of integral image give so many possiblefeatures• How do we obtain the best representing features possible?• How can we refrain from wasting time on image background? (i.e.non-object)Integral Image | AdaBoost | CascadeGood Feature Not Good FeatureAdaBoost…
  14. 14. AdaBoostWeak ClassifierStrong ClassifierAdaBoost
  15. 15. Weak Classifier• Consist of just 1 feature• 1 feature that can separate the image data with error rate less than 0.5Feature 1Feature 2Feature 3θ 1θ 2θ 3WeakClassifier 1WeakClassifier 2WeakClassifier 31/10 = 0.16/10 = 0.63/10 = 0.3Integral Image | AdaBoost | Cascade
  16. 16. Strong Classifier• Set of features/weak classifierIntegral Image | AdaBoost | Cascade1 1 1strong11 ( ) ( )( ) 20 otherwisen n nh hhx xx Weak ClassifierHow to build the strong classifier?AdaBoost
  17. 17. AdaBoostPseudo Code• T = number of feature we choose• h(x, f,p,θ)) = A weak classifier• f = feature• θ = threshold• p = polarity indicating the direction of theinequality (less than or greater than θ)Integral Image | AdaBoost | Cascade
  18. 18.  AdaBoost starts with a uniform distributionof “weights” over training examples. Select the classifier with the lowest weightederror (i.e. a “weak” classifier) Increase the weights on the trainingexamples that were misclassified. (Repeat) At the end, carefully make a linearcombination of the weak classifiers obtainedat all iterations.AdaBoost Ilustration1 1 1strong11 ( ) ( )( ) 20 otherwisen n nh hhx xx Slide taken from a presentation by Qing Chen, Discover Lab, University of OttawaIntegral Image | AdaBoost | Cascade
  19. 19. Classifier• By increasing the number of features per classifier, we:◦ Increase detection accuracy.◦ Decrease detection speed.• Experiments showed that a 200 feature classifiermakes a good face detector:◦ Takes 0.7 seconds to scan an 384 by 288 pixel image.• Problem: Not real time! (At most 0.067 secondsneeded).Integral Image | AdaBoost | CascadeCascade of Classifier…
  20. 20. Cascade ClassfifierCascade
  21. 21. Cascade of Classifier• Classifier is structured as several layer/hierarchy• Each layer consist of 1 strong classifier (set of weakclassifiers/features)• Evaluating all input window• Ignore non-face window• Continue for processing “suspected” face windowIntegral Image | AdaBoost | Cascade
  22. 22. Cascade of Classifier• The number of feature/weak classifier in every layer is based on thevalue of false positive rate and detection rate determined by user• Previous layers have simpler classifier than next layerIntegral Image | AdaBoost | CascadeStage 1 Stage 2 Stage 3 …FurtherProcessingInput ImageWindowIgnore/RejectInputIgnore/RejectInputIgnore/RejectInputIgnore/RejectInputYNYNYNYN
  23. 23. Cascade of ClassifierIntegral Image | AdaBoost | CascadeStage 1(2 feature)NY Stage 2(2++ feature)
  24. 24. Cascade ofClassifierPseudo CodeIntegral Image | AdaBoost | Cascade
  25. 25. Experiment• Training set• Face: 4916 labeled frontal faces•Testing / Real-time test• Face: MIT + CMU frontal face test set• Contain: 130 images with 507 labeled frontal faces
  26. 26. ResultCascade Classifierv.sNon Cascade ClassifierCascade classifiernearly 10x faster.
  27. 27. ResultThey use dataset MIT+CMU with 5 images removedVoting (Using 3 Viola-Jones Classifier with different parameter)++- : Face--+ : Non Face
  28. 28. Failure Mode• Informal observation suggests that the face detector can detectfaces that are tilted up to about ±15 degrees in plane and about ± 45degrees out of plane• Harsh backlighting in which the faces are very dark while thebackground is relatively light sometimes causes failures• Proposed algorithm will also fail on significantly occluded faces