- 快召唤伙伴们来围观吧
- 微博 QQ QQ空间 贴吧
- 文档嵌入链接
- 复制
- 微信扫一扫分享
- 已成功复制到剪贴板
Face Detection for Access Control
展开查看详情
1 .Face Detection for Access Control By Dmitri De Klerk Supervisor: James Connan
2 .Overview Haar-like features For the task of face detection AdaBoost Approach AdaBoost Weak or Base learning algorithm Training image weights Strong classifier Detection example Cascade classifier Tools and languages Face detection demo References Question & Answers
3 .Haar-like features Our object detection procedure classifies images based on the value of simple features. There are three kinds of Haar-Like features Two-rectangle feature: Difference between the sum of the pixels within two rectangular regions. Three-rectangle feature: The sum of the pixels within two outside rectangles subtracted from the sum in a center rectangle. Four-rectangle feature: The difference between diagonal pairs of rectangles. If this value is above a threshold (set during learning). that feature is said to be present .
4 .For the task of face detection Say we have a database of images… Where images are labeled ‘+1’ if it’s a face and ‘-1’ otherwise. Our goal is: given a new image, find its label. , +1 , +1 , +1 , +1 , -1 , -1 , -1 , -1
5 .AdaBoost approach Gather as many examples as possible of both faces and non-faces. Feed these examples together with labels indicating if their faces of not, to AdaBoost. AdaBoost will then produce a classification or prediction rule (WEAK CLASSIFIER) . Given a new, unlabeled image, such a rule attempts to predict if it’s a face or not. The goal, is to generate the most accurate prediction possible on new images.
6 .AdaBoost approach (continued) Building a highly accurate prediction rule is a difficult task. On the other hand, it is not hard at all to come up with very rough rules of thumb. An example of such a rule: Sure a rule like this will not come close to covering all faces… On the other hand, this rule makes prediction that are significantly better than random guessing. If is present, then predict it’s a face .
7 .AdaBoost AdaBoost – Ada ptive Boost ing Boosting is based on the observation that finding many rough rules of thumb can be a lot easier than finding a single highly accurate prediction rule. And producing a very accurate prediction rule by combining very rough inaccurate rules of thumb. Boosting algorithms combine weak classifiers in a meaningful way ( Schapire ‘89).
8 .Weak or Base learning algorithm The boosting algorithm calls the “weak” or “base” learning algorithm repeatedly. Which produces weak classifiers (rule of thumb). Each time feeding a different subset of the training examples. More precisely, a different distribution or weighting over the training examples. E.g. Weak or Base Learner Weak or Base Learner
9 .Weak or Base learning algorithm The boosting algorithm calls the “weak” or “base” learning algorithm repeatedly. Which produces weak classifiers (rule of thumb). Each time feeding a different subset of the training examples. More precisely, a different distribution or weighting over the training examples. E.g. Weak or Base Learner Weak or Base Learner
10 .Training image weights Each training images is assigned a weight. Start with a uniform distribution(“weights”) over training images. The weight tell the “Weak” algorithm, which examples are important. Obtain a weak classifier from the “Weak” algorithm, based on the training images weights. Increase the weights on training images in which the weak classifier is not present in. Decrease the weights on the training images in which the weak classifier is present in. Repeat T times. By doing this subsequent weak classifier will focus on different subsets of the training images.
11 .Strong classifier h(x) = 1 0 ∑ (weight weak classifier ) ≥ ½(∑ (weight weak classifier ) ) otherwise If half of the total weight of weak classifiers are present. Then predict, the image is a face.
12 .Detection example h 3 ( ) = +3 contains the weak classifier 0 otherwise h 2 ( ) = +4 contains the weak classifier 0 otherwise h 1 ( ) = +3 contains the weak classifier 0 otherwise f ( ) = sign[3 h 1 ( ) + 4 h 2 ( ) + 3 h 3 ( )] present present not-present = 3 + 4 + 0 = 7 ≥ 5 The images is a face.
13 .Cascade classifier Viola and Jones combined a series of weak classifiers as a cascade. If an image fails any stage. The image is immediately classified as “ Not Face ” If the image makes it through all the stages. The images is classified as a “ Face ”. Reasons for using the cascade classifier make the detector faster.
14 .Cascade classifier Viola and Jones combined a series of weak classifiers as a cascade. If an image fails any stage. The image is immediately classified as “ Not Face ” If the image makes it through all the stages. The images is classified as a “ Face ”. Reasons for using the cascade classifier make the detector faster.
15 .Face detection demo
16 .References AdaBoost http://en.wikipedia.org/wiki/AdaBoost Builds on the work of Desmond Van Wyk Face Recognition System for Access Control (2006) How face detection work http://www.cognotics.com/opencv/servo_2007_series/part_2/sidebar.html Fast Face Detection Using AdaBoost Julien Meynet [16 July 2003] The Boosting Approach to Machine Learning – An overview Robert E. Schapire [19 December 2001]
17 .Questions and Answers Thank you!