Subject-Oriented Image Classification based on Face Detection and Recognition

Similar documents
Face Recognition Using Boosted Local Features

Face Tracking in Video

Face Detection Using Look-Up Table Based Gentle AdaBoost

Face Detection on OpenCV using Raspberry Pi

Discriminative Feature Co-occurrence Selection for Object Detection

Active learning for visual object recognition

Detection of a Single Hand Shape in the Foreground of Still Images

Classifier Case Study: Viola-Jones Face Detector

Face Detection and Alignment. Prof. Xin Yang HUST

Detecting Pedestrians Using Patterns of Motion and Appearance

Lecture 4 Face Detection and Classification. Lin ZHANG, PhD School of Software Engineering Tongji University Spring 2018

Skin and Face Detection

Fast and Robust Classification using Asymmetric AdaBoost and a Detector Cascade

FACE DETECTION BY HAAR CASCADE CLASSIFIER WITH SIMPLE AND COMPLEX BACKGROUNDS IMAGES USING OPENCV IMPLEMENTATION

Window based detectors

Face detection and recognition. Detection Recognition Sally

Detecting People in Images: An Edge Density Approach

Machine Learning for Signal Processing Detecting faces (& other objects) in images

Efficient and Fast Multi-View Face Detection Based on Feature Transformation

Detecting Pedestrians Using Patterns of Motion and Appearance

Detecting Pedestrians Using Patterns of Motion and Appearance (Viola & Jones) - Aditya Pabbaraju

Viola Jones Simplified. By Eric Gregori

Face detection. Bill Freeman, MIT April 5, 2005

Face and Nose Detection in Digital Images using Local Binary Patterns

Criminal Identification System Using Face Detection and Recognition

Out-of-Plane Rotated Object Detection using Patch Feature based Classifier

Face Verification with Aging Using AdaBoost and Local Binary Patterns

A Hybrid Face Detection System using combination of Appearance-based and Feature-based methods

Study of Viola-Jones Real Time Face Detector

Face Recognition Using Ordinal Features

Object and Class Recognition I:

Detecting Pedestrians Using Patterns of Motion and Appearance

Short Paper Boosting Sex Identification Performance

Hand Posture Recognition Using Adaboost with SIFT for Human Robot Interaction

Face detection and recognition. Many slides adapted from K. Grauman and D. Lowe

Face Detection in Digital Imagery Using Computer Vision and Image Processing

Detecting Faces in Images. Detecting Faces in Images. Finding faces in an image. Finding faces in an image. Finding faces in an image

Generic Object Class Detection using Feature Maps

Face detection, validation and tracking. Océane Esposito, Grazina Laurinaviciute, Alexandre Majetniak

Recognition problems. Face Recognition and Detection. Readings. What is recognition?

Previously. Window-based models for generic object detection 4/11/2011

Face Recognition-based Automatic Tagging Scheme for SNS

Face Alignment Under Various Poses and Expressions

Part-based Face Recognition Using Near Infrared Images

A Convex Set Based Algorithm to Automatically Generate Haar-Like Features

Part-based Face Recognition Using Near Infrared Images

Assessment of Building Classifiers for Face Detection

Face Recognition for Mobile Devices

Categorization by Learning and Combining Object Parts

Mouse Pointer Tracking with Eyes

Three Embedded Methods

A Study on Similarity Computations in Template Matching Technique for Identity Verification

Boosting Sex Identification Performance

Recap Image Classification with Bags of Local Features

Face Detection and Recognition in an Image Sequence using Eigenedginess

Eye Detection by Haar wavelets and cascaded Support Vector Machine

Rapid Object Detection Using a Boosted Cascade of Simple Features

A Survey of Various Face Detection Methods

Color Model Based Real-Time Face Detection with AdaBoost in Color Image

Object Category Detection: Sliding Windows

An Image Region Selection with Local Binary Pattern based for Face Recognition

Progress Report of Final Year Project

Image enhancement for face recognition using color segmentation and Edge detection algorithm

Parallel Tracking. Henry Spang Ethan Peters

Component-based Face Recognition with 3D Morphable Models

A Distance-Based Classifier Using Dissimilarity Based on Class Conditional Probability and Within-Class Variation. Kwanyong Lee 1 and Hyeyoung Park 2

Learning to Recognize Faces in Realistic Conditions

Face Recognition Using Vector Quantization Histogram and Support Vector Machine Classifier Rong-sheng LI, Fei-fei LEE *, Yan YAN and Qiu CHEN

Haresh D. Chande #, Zankhana H. Shah *

Computer Vision Group Prof. Daniel Cremers. 8. Boosting and Bagging

Disguised Face Identification Based Gabor Feature and SVM Classifier

Mobile Face Recognization

Fast Face Detection Assisted with Skin Color Detection

Principal Component Analysis and Neural Network Based Face Recognition

Viola Jones Face Detection. Shahid Nabi Hiader Raiz Muhammad Murtaz

ii(i,j) = k i,l j efficiently computed in a single image pass using recurrences

Spatial Frequency Domain Methods for Face and Iris Recognition

Haar Wavelets and Edge Orientation Histograms for On Board Pedestrian Detection

A Real Time Facial Expression Classification System Using Local Binary Patterns

Computer Vision Group Prof. Daniel Cremers. 6. Boosting

Capturing People in Surveillance Video

Fast Learning for Statistical Face Detection

NIST. Support Vector Machines. Applied to Face Recognition U56 QC 100 NO A OS S. P. Jonathon Phillips. Gaithersburg, MD 20899

Applications Video Surveillance (On-line or off-line)

Rotation Invariant Neural Network-Based Face Detection

On Modeling Variations for Face Authentication

Detection of Multiple, Partially Occluded Humans in a Single Image by Bayesian Combination of Edgelet Part Detectors

Ego-Motion Compensated Face Detection on a Mobile Device

Human Detection. A state-of-the-art survey. Mohammad Dorgham. University of Hamburg

Multi-angle Face Detection Based on DP-Adaboost

Using the Forest to See the Trees: Context-based Object Recognition

Bayes Risk. Classifiers for Recognition Reading: Chapter 22 (skip 22.3) Discriminative vs Generative Models. Loss functions in classifiers

Generic Object-Face detection

A STUDY OF FEATURES EXTRACTION ALGORITHMS FOR HUMAN FACE RECOGNITION

Learning to Fuse 3D+2D Based Face Recognition at Both Feature and Decision Levels

Large-Scale Traffic Sign Recognition based on Local Features and Color Segmentation

Detecting and Reading Text in Natural Scenes

An Efficient Face Detection and Recognition System

Face Objects Detection in still images using Viola-Jones Algorithm through MATLAB TOOLS

Computation of Rotation Local Invariant Features using the Integral Image for Real Time Object Detection

Transcription:

000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 051 052 053 Subject-Oriented Image Classification based on Face Detection and Recognition Anonymous Author(s) Affiliation Address email Abstract In this work, a subject-oriented image classification is implemented where images are classified based on the detection of a target face within the images. This is a binary classification problem which is broken down into two phases. In the first phase, the faces within an input image are detected and segmented from the background. In the second phase, which is the focus of this work, the extracted face images are passed to a face recognition module which is implemented in Python using the AdaBoost algorithm. The performance of the face recognition module is evaluated independently on the provided test set. Finally, the face recognition module is used in conjunction with the face detection and segmentation unit to perform the image classification on the provided example set of images. 1 Introduction Face detection and recognition systems are currently one of the most important and widely used applications of image understanding and pattern recognition. They have a wide range of application in service and rescue robots, biometrics, information security, and surveillance [1]. Face detection is considered as a binary classification problem with different approaches. One is the sampling-based approach where local visual descriptors are extracted directly from the training data and do not typically conform to any template. A renowned sampling-based learning framework was proposed by Viola and Jones [2] that uses boosting to learn discriminant features. Based on their work, many improvements or extensions have been proposed [3]. There is no single state-of-the-art face recognition system. The main reason for this is because there are many different face recognition applications that each have different requirements and constraints [4]. One widely influential face recognition algorithm is that of Moghaddam and Pentland [5]. They use a statistical approach where the intra-personal and extra-personal distributions are assumed to be Gaussian, and are approximated with principal eigenvectors which are global. One key advantage of this approach is that learning is used to focus on important differences between individuals. Another widely influential algorithm is that produced by von der Malsburg and colleagues [6]. They use a set of complex image features they call Gabor Jets. Since this approach does not use learning it is immediately applicable to new types of images. However, it cannot learn to ignore intrapersonal variations. The method used in this work is based on Jones and Viola s work [7] for face recognition which is similar to their renowned face detection AdaBoost method [2]. Their system learns to distinguish between intrapersonal and extrapersonal variations without any distributional assumption. Unlike von der Malsburg s work, they use simple features where their scale, orientation, and form is learned by boosting. 1

054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 069 070 071 072 073 074 075 076 077 078 079 080 081 082 083 084 085 086 087 088 089 090 091 092 093 094 095 096 097 098 099 100 101 102 103 104 105 106 107 In this work, a subject-oriented image classification problem is investigated as an application of face detection and recognition techniques. Searching for images of a particular subject among a large set of images can be an exhaustive task. The motivation behind this work is automated classification of images without human intervention. A binary classification problem is considered where the images are categorized in two different classes. The desired images are the ones that contain the target face. 1.1 Our Approach The solution to the problem described above is broken into two steps; (1) Face detection and extraction and (2) classifying faces using a face recognition algorithm. The algorithm takes a face image of the target identity along with an input image for classification. In the first phase, the faces within the input image are detected and segmented from the background. Each cropped face is saved as a face image with a label that indicates its source image. Several face images may be extracted from an input image. The second step is classification of extracted faces. If any of the faces within the original input image is classified as the target face, the image is classified as the desired image. For classifying the faces, each face image together with the target face image is passed to a face recognition module. The face recognition algorithm decides whether the extracted face belongs to the target person. The focus of this work is more on implementing the face recognition module. For the implementation of the face detection in the first step, the existing open source SNFaceCrop software is used. The software is developed in C++ and can detect and extract the faces in an image. It uses a Haar cascade classifier method based on the work by Viola and Jones [2]. In section 2, the face recognition method is described. The implementation results are provided in section 3. Section 4 includes conclusions and discussion on the results. 2 Face Recognition Once the faces in the input image are detected and segmented using the SNFaceCrop software, each one of them is passed to the face recognition module as a probe face to determine if it belongs to the target person. The face recognition module comprises a binary classifier which takes a pair of a probe face and a target face as input. The image pair (I 1, I 2 ) is classified as a positive or negative pair based on a face similarity function that is constructed by the learning algorithm. The face similarity function is a real valued function denoted by F (I 1, I 2 ). The pair (I 1, I 2 ) is classified as sign(f (I 1, I 2 )) where +1 means that the face images in the pair belong to the same person. In this paper, the face similarity function is obtained as a sum of weak classifiers by using an AdaBoost learning algorithm. The method is based on Jones and Viola s method on face recognition [7]. They use an AdaBoost method based on the work of Schapire and Singer [8] that uses confidence-rated predictions. In section 2.1, the AdaBoost learning algorithm is described. The weak classifiers and selected features are introduced in section 2.2. 2.1 The Learning Algorithm In the most popular boosting algorithm AdaBoost.M1 [9], the weak classifier has the restricted range [ 1, 1] whereas the AdaBoost that uses confidence-rated predictions [8] considers weak classifiers that can range over all R. The sign of the weak classifier is the predicted label 1 or +1 and the magnitude is interpreted as the confidence in this prediction. Here, the confidence-rated AdaBoost method is considered in this paper. In the face recognition module, the face similarity function F (I 1, I 2 ) is a sum of weak classifiers N h n (I 1, I 2 ) expressed as F (I 1, I 2 ) = h n (I 1, I 2 ). Each weak classifier h n (I 1, I 2 ) consists of a n=1 filter φ n that acts on both face images. Let f n (I 1, I 2 ) = φ n (I 1 ) φ n (I 2 ), (1) 2

108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 Then the weak classifier h n (I 1, I 2 ) is defined as { αn, f h n (I 1, I 2 ) = n (I 1, I 2 ) t n β n, otherwise, (2) where t n R is a feature threshold, φ n is a scalar filter and α n and β n are constants. The predicted label by the weak classifier is sign(h n (I 1, I 2 )). When the output of the weak classifier h n is α n, the predicted label is +1 and the absolute value of α n measures the confidence in this prediction. The absolute value of β n measures the confidence in predicting the label 1. Consider S training sample pairs (x i, y i ) where x i (I (i) 1, I(i) 2 ) and y i { 1, +1} for i {1,..., S}. The sample weights in the round n of the boosting algorithm are denoted by {w i } S i=1. The best weak classifier h n which is characterized by (φ n, t n, α n, β n ) is selected such that the exponential loss function is minimized: h n = arg min h S i=1 w i exp( y i h(x i )) (3) Similar to the AdaBoost.M1 method, the above optimization is broken into two major parts [10]. Initially, the filter φ n and the feature threshold t n is selected by minimizing the weighted error. To this end, for each filter φ, the threshold t is optimized by minimizing the weighted error ɛ obtained as ɛ = i:y i= 1, f(x i) t α n = 1 ( W ++ 2 log n W + n w i + i:y i=+1, f(x i)>t w i, (4) where f( ) is defined in (1) and x i = (I (i) 1, I(i) 2 ). Then, the best filter φ n is selected as the filter with minimum error among all the filters. Once the best filter φ n and its threshold t n are obtained, the optimal values for α n and β n are obtained by minimizing the exponential loss function defined in (3). The optimal values of α and β for the optimal filter φ n and threshold t n are obtained as [7] ), β n = 1 ( ) W + 2 log n, (5) where W n ++, Wn +, W n +, and Wn are defined as W n ++ = wi, Wn + = and f n (x i ) = AdaBoost algorithm: W + n = i : y i = +1, f n(x i ) t n i : y i = +1, f n(x i ) > t n wi, Wn = W n i : y i = 1, f n(x i ) t n i : y i = 1, f n(x i ) > t n wi, wi φ n (I (i) 1 ) φ n(i (i) 2 ). The steps of the AdaBoost algorithm are described as follows: Given S samples (x 1, y 1 ),..., (x S, y S ) where y i { 1, +1} and x i = (I (i) pair of face images, Initialize weights wi 1 = 1 S. Let R be the number of rounds to boost before resampling. For n = 1,..., N: 1, I(i) 2 ) is a 1. For each filter φ j in the filter library, compute the optimal threshold t j that minimizes the error ɛ in (4) for each potential filter. 2. Choose φ n with the lowest error and save the corresponding threshold t n. 3. Choose α n and β n according to (5). The weak classifier h n in (2) is now defined. 4. If n is a multiple of R, then resample to generate a new training set with new weights. Otherwise update the weights and normalize them: w (n+1) i = w i exp( h n (x i )y i ) and w (n+1) i w(n+1) i. S i=1 w(n+1) i ( N The final strong classifier is F (x) = sign n=1 h n(x) ) 3

162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 Figure 1: The types of rectangle filters [7] used in this work. The complete set of filters ranges over all scales, aspect ratios and locations in the analysis window. 2.2 Feature Selection The potential filters φ, defined in (1), in the construction of face similarity function are a set of rectangle features similar to those described by Viola and Jones [2]. A rectangle filter is a type of Haar filter which quantizes an image region to a scalar [11]. The set of rectangle filters used in this work are shown in figure 1. A rectangle filter is computed by summing the intensities of all pixels in the dark regions and subtracting the sum of the intensities of all pixels in the light regions. A multiplier may be factored in to make the total number of pixels in the dark rectangles equal to the total number of pixels in the light rectangles. The computation of rectangle features are sped up by using the integral image representation of the input image [2]. The integral image of all the images in the database can be computed and stored once. Using the stored integral values, the computation of rectangle filters can be performed in constant time. The goal in face recognition is to distinguish between the intrapersonal and extrapersonal variations in the images. The form, scale, orientation, and location of the rectangle features is learned using the training images so that the final constructed filter can distinguish between the intrapersonal and extrapersonal variations. In each round of the boosting algorithm, the rectangle filter that best classifies the intrapersonal and extrapersonal variations is selected among the library of rectangle filters. Each filter measures a particular property, at a given location, scale, and aspect ratio, and is assigned a weight. The feature thresholds determine which variations are acceptable [7]. If a region of the face, such as the hair, is not a good indicator of face similarity in the training images, then it is likely that no filter will be chosen in this region by the learning algorithm. 3 Results The face recognition algorithm is trained and tested using the face database of AT& T Laboratories Cambridge available at [12]. The images are taken at different times, illumination, and facial expressions. All the images were taken against a dark homogeneous background with the subjects in an upright, frontal position. After training the face recognition algorithm, we used it in conjunction with the SNFaceCrop software for face detection to classify 210 pictures from a personal database. 3.1 Face Recognition Results The AT& T face database includes 40 distinct subjects each with 10 different images. The images are taken at different times with different illumination. Also the facial expression changes from open to closed eyes, smiling to not smiling. Some facial details are also varying. For example, there are glasses in some of the images of some subjects. The subjects are in an upright, almost frontal position. The pose angle varies in the range [ 23, 23] degrees where the zero reference point is the frontal position. In this work, the images are cropped to 102 pixels high and 80 pixels wide to focus on more informative regions. Half of the database is used for training. There are 20 subjects each one with 10 images in the training set. Therefore, the training set yields only 20 ( ) ( 10 2 = 900 same pairs out of 200 ) 2 = 19900 total pairs. In order to keep the balance in the training process, at any round only 900 different pairs and all 900 same pairs are used for training. At each resampling round in the algorithm, 900 4

216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 Figure 2: The first and second rectangle filters learned in the AdaBoost algorithm: The scale and location of these filters are demonstrated on two images of the training set. The filters examine the eye and the areas around it. The first filter is a two-rectangle filter and the second one has three rectangular regions. TPR 1 0.8 0.6 0.4 0.2 B A Line of no discrimination 0 0 0.2 0.4 0.6 0.8 1 FPR A B FPR 0.10 0.05 TPR 0.80 0.89 T 200 400 R 50 100 Figure 3: The false positive rate (FPR) and true positive rate (TPR) of the implemented face recognition algorithm is evaluated for two cases. The number of total rounds or total weak classifiers in the AdaBoost algorithm is denoted by T. The number of boosting before resampling is R. In the algorithm, when the round number is a multiple of R, 900 different pairs are resampled from 19000 different pairs in the training set. The 900 same pairs remain unchanged in the rounds. different-pair samples are taken from the total 19000 different pairs in the training set. After training, the entire database of 40 subjects which includes a total of 400 images is used as the test set. There are five types of rectangle filters shown in figure 1. The first two filters learned by boosting are shown in figure 2. These filters examine the eye and parts of cheek below the eye. The first filter is a two-rectangle filter and the second one has three rectangular regions. For evaluating the classification performance, the false positive rate (FPR) and the true positive rate (TPR) should be evaluated. TPR determines a classifier performance on classifying positive instances correctly among all positive samples available during the test. FPR, on the other hand, defines how many incorrect positive results occur among all negative samples available during the test. Different values of TPR and FPR can be obtained by changing the boosting rounds R and T in the algorithm. These values are illustrated in the ROC space [13] in figure 3. In a binary classification problem, the best theoretical prediction method would yield a point in the upper left corner or coordinate (0,1) of the ROC space, representing 100 % sensitivity and 100 % specificity. A completely random guess would give a point along a diagonal line from the left bottom to the top right corners. The distance from the random guess line is the best indicator of how much predictive power a method has. The entire AT & T database is used as the test set in evaluating the TPR and FPR values. Two cases are considered in evaluating the error rates. In case A, the number of total boosting is equal to N = 200 and the sum of 200 filters are used for classification. The number of boosting R before resampling is set to R = 50 in this case. Case B corresponds to N = 400 and R = 100. The obtained TPR and FPR values are shown in figure 3. 3.2 Subject-Oriented Image Classification Results The test images for the original image classification problem are selected from a personal database where there are more than 20 subjects in a total of 210 photos. Initially, all the faces in all images 5

270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 are detected, segmented and saved using the SNFaceCrop software in batch mode. The file name of each saved face has a label that indicates the source image. Then each face image and the target face image are provided to the face recognition algorithm obtained in case B in section 3.1. The program categorizes the source images in two different directories by saving each image into the directory of the predicted class. There are 32 desired images that contains the target face. Out of this number, 21 images are classified properly which infers that the true detection rate is almost 0.7 in this case. Also, 18 undesired images are miss-detected. 4 Conclusions and Discussion In this work, a subject-oriented image classification problem is solved by implementing an AdaBoost algorithm for face recognition. Rectangle filters are used as the features to obtain the best weak classifier in each round of the AdaBoost algorithm. To provide the face recognition module with face images, an existing face detection software is used to extract face images from background. The results in section 3 show that the implemented face recognition algorithm has acceptable error rates on the provided test set. The performance improves by increasing the number of boosting rounds in the algorithm from 200 to 400. Regarding the classification results in section 3.2 for the original problem, the face recognition performance is not as strong as it was evaluated in section 3.1. This is due to the fact that the face detection error is added to the classification. Besides, the face recognition algorithm is introduced to a new set of images which is different from the AT & T face database used for training. References [1] V. BELLE. Detection and recognition of human faces using random forests for a mobile robot. Master s thesis, RWTH Aachen University, Aachen, 2008. [2] P. Viola and M. Jones. Rapid object detection using a boosted cascade of simple features. In Proc. of IEEE Conference on Computer Vision and Pattern Recognition, pages I 511 I 518, Kauai, HI, December 2001. [3] B. Wu, C. Huang, and S. Lao. Fast rotation invariant multi-view face detection based on real adaboost. In Proc. of IEEE Conf. on Automatic Face and Gesture Recognition, pages 79 84, Seoul, Korea, 2004. [4] M.J. Jones. Face recognition: Where we are and where to go from here. IEEJ Trans. on Electronic, Information and Systems, 129(5):770 777, January 2009. [5] Baback Moghaddam and Alex Pentland. Beyond euclidean eigenspaces: Bayesian matching for visual recognition, 1998. [6] K. Okada, J. Steffens, T. Maurer, Hai Hong, E. Elagin, H. Neven, and C. von der Malsburg. The bochum/usc face recognition system and how it fared in the feret phase iii test, face recognition: From theory to applications. Springer-Verlag, pages 186 205, 1998. [7] M. J. Jones and P. Viola. Face recognition using boosted local features. Technical report, TR 2003-25, MERL, April 2003. [8] R. E. Schapire and Y. Singer. Improved boosting algorithms using confidence-rated predictions. Journal of Machine Learning, 37:297 336, December 1999. [9] Y. Freund and R. E. Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. Journal of Computer and System Sciences, 55(1):119 139, August 1997. [10] T. Hastie, R. Tibshirani, and J.H. Friedman. The elements of statistical learning: data mining, inference, and prediction. Springer series in statistics. Springer, 2008. [11] C.P. Papageorgiou, M. Oren, and T. Poggio. A general framework for object detection. In International Conf. on Computer Vision, pages 555 562, Bombay, India, January 1998. [12] http://www.cl.cam.ac.uk/research/dtg/attarchive/facedatabase.html. [13] http://gim.unmc.edu/dxtests/seriesof.htm. 6