DOC PREVIEW
UCLA STAT 231 - Project II

This preview shows page 1-2 out of 5 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Project II: Human face detection by BoostingtechniquesThis document:1. Objectives. Boosting is a general method for improving the accuracy of any given learningalgorithm. One can use it to combine simple “rules” (or weak learner), eachperforming only slightly better than random guess, to form an arbitrarily goodhypothesis. Viola and Jones employed Adaboost (an adaptive boosting method) forobject detection and got good performance when applying to human face detection[1].In this project, you are required to implement an Adaboost algorithm for frontal human face detection following Viola and Jones’ method, but cascade is not required.We provide a face dataset of 3,000 face images and a non-face dataset of 3,000 samples. Each image has 16 x 16 pixels. The project includes the following steps.(1) Construction of weak learnersCompute the value of each rectangle featurefor each sample. Each feature corresponds toa weak learner. Determine the thresholdbetween face samples and non-face samples forall the weak learners. Calculate theclassification error for each weak learner anddraw the best ten features (before boosting) asFigure 3 in [1].(2) BoostingImplement Adaboost algorithm following Table 1 in [1] to boost the weak learnersyou got in (1). Ranging the number of weak learners the algorithm selects (T inTable 1) from 2 to 200, plot the training errors (both false positives and falsenegatives). Draw the best ten features (after boosting) as Figure 3 in [1] andcompare them with the features in (1).(3) Cross validationThe above two steps deal with the whole dataset. Now randomly divide the datasetinto 5 equal size non-overlapped subsets, use each set as testing set and the otherfour sets as training set, select T as 50, 100, 200, run the algorithm, record trainingand testing errors into a table.2. DatasetsFace data: download from course webpage face.zipNonface data: download from course webpage non_face.zip3. AdviceStart small. Write a program using only a small number of weak classifiers – like the two illustrated above. Train and test the program on a small set of face and non-face images. At every stage, check to make sure that your results make intuitive sense. For example, see if your program selects the same first two features that Viola found (see above).Be very careful about how your program scales with the number of weak classifiers and the number of face/non-face images. (This will depend on the details of how you write the code and the type of computer you are using). If your program scales badly, then onlyuse a limited number of weak classifiers and a small number of faces/non-face images.The classic mistake for this type of problem is to write a large amount of code and then try testing it with 50,000 weak classifiers on all the face and non-face images. Check the code first with only a few classifiers – so that you have a good guess of what classifier should be selected. Then try scaling up – and stop if the program scales badly or ceases togive intuitive results.4. References[1] P.Viola, M.Jones, "Rapid Object Detection using a Boosted Cascade of Simple Features", CVPR 2001.URL: http://www.ai.mit.edu/~viola/research/publications/CVPR-2001.pdfAlgorithm Description(Alex Chen) 1. Rectangular featuresFigure 1: Rectangular features. Example: for A, The value of a two-rectangle feature is the difference between the sums of the pixels within two rectangular regions.Set minimum rectangular size as 4 by 4 (for example: 4 by 5, 8 by 4, 10 by 11), there are in total nearly 6,000 features.2. Integral imagePreprocess: normalize each image by dividing each pixel value by the STD of the image.The value of the integral image at point (x; y) is the sum of all the pixels above and to theleft.where ii(x; y) is the integral image and i(x; y) is the original image (see Figure 2). Using the following pair of recurrences:the integral image can be computed in one pass over the original image.Figure 2: The sum of the pixels within rectangle D can be computed with four arrayreferences. The value of the integral image at location 1 is the sum of the pixels inrectangle A. The value at location 2 is A + B, at location 3 is A + C, and at location 4 is A+ B + C + D. The sum within D can be computed as 4 + 1 - (2 + 3).Using the integral image, the rectangular features can be calculated more efficiently.3. Construction of weak learnersTwo suggestions:(1) Assume faces and non-faces follow Gaussian distribution, find the threshold with minimum error.(2) Exhaustive search for the threshold by discretization of the valid value range.4. Adaboost algorithm5. Sample Matlab code for reading all bitmap images in a directory function X = ReadBmps(strDir);Bmps = dir([strDir '/*.bmp']);[NBmps, NCols] = size(Bmps);for i=1:NBmps, image = double(imread([strDir '/' Bmps(i).name])) / 255; X(i,:,:) =


View Full Document

UCLA STAT 231 - Project II

Download Project II
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Project II and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Project II 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?