ࡱ> >@=@ \bjbjFF "$,,\$:^^^^^: lnnnnnn$ R"`n ^^n n ^^< < < n ^^l< n l< < H^ 6*D> $l08U# HU#(HU#H$<  $2 Introduction to Computer Vision CSE 152, Spring 2004 David Kriegman Assignment 5 Face Detection and Recognition using Eigenfaces (Due date: Thursday, June 3, 2004) The goal of this assignment is to implement the Eigenface method for recognizing faces. You will be using face images from the Yale Face Database B where there are 10 faces under 64 lighting conditions. (For more information on the database, see  HYPERLINK "http://cvc.yale.edu/projects/yalefacesB/yalefacesB.html" http://cvc.yale.edu/projects/yalefacesB/yalefacesB.html). You will evaluate the ability of the algorithm to handle lighting conditions of the probe images that differ from those in the training images. The training and test face images in the database will be preprocessed, to place them in a standard position with the eyes already aligned by an affine transformation. In addition, you will implement the distance from face space algorithm for face detection. Part A. Recognition with Eigenfaces You will take 50x50 pixel training images as input, vectorize them into an (2500) dimensional vector, and then perform principal component analysis (PCA) on them and retain the top d principal components. Note, rather than actually computing the huge covariance matrix, use SVD as described in class. You will have an 2500 x d matrix (W). The d basis vectors (when converted back to images) are the Eigenfaces, and you should show these in your report. Now take all of your training images, and project them to the Eigenspace. Each test image is then projected to the Eigenspace, and classification will be performed by nearest neighbor with the L2 metric in the Eigenspace. You will report error rates for d=9 (and also for d=30) You will evaluate your algorithm on the frontal pose of the ten people in the Yale Face Database B. We have already cropped and aligned these images for you (download at  HYPERLINK "http://www.cs.ucsd.edu/classes/sp04/cse152/hw5/faces.zip" http://www.cs.ucsd.edu/classes/sp04/cse152/hw5/faces.zip). For each individual, there are 5 subsets, indexed as below (for more information about these subsets, visit  HYPERLINK "http://cvc.yale.edu/projects/yalefacesB/subsets.html" http://cvc.yale.edu/projects/yalefacesB/subsets.html ). Set 1. personXX_01.png to personXX_07.png. Set 2. personXX_08.png to personXX_19.png. Set 3. personXX_20.png to personXX_31.png. Set 4. personXX_32.png to personXX_45.png. Set 5. the rest You should train your Eigenface algorithm (with d=9 and d=30) on all images in subset 1 (7x10 =70 images), evaluate on subsets 1-5, and report the error rates in both a table and plot (error rate as a function of the subset). For subset 1, you expect perfect recognition when evaluating on the training data. Matlab hint: reshape, subplot, plot. Use subplot to display multiple images/figures on the same page. You can also save intermediate result (using save command) into a file to avoid processing same routine repeatedly. Part B: Face Detection using distance to face space. A method for detecting the locations of faces of a fixed size in images can be built by scanning all 50x50 windows and classifying the window as face or non-face. Here, the classification decision will be based on the distance to the face space (i.e., the distance to the Eigenspace computed in part A). From part A, you have constructed a 9-D linear subspace represented by a matrix W which has size 2500x9. For each 50x50 window F of the input image (test_face.png), convert this to vector f of length 50x50, and make this unit length by computing f=f/||f||. The projection of f onto the face space is y=WTf, the reconstruction of the face is given y=Wy, and the distance between the window and the face space is: ||f-y||. For every window in the input image, compute the distance to face space, and show this as an image in your report. Additionally, find the five smallest local minima, and these are the five most likely locations of the face. Draw a rectangle on the input image at these five locations. What to Hand in You should hand in: A report with the items described above, any other figures, and comments/issues that you find relevant. Clearly label all figures. Submit your code using turning. The algorithm may run very long, so start early. There will be no exception for turn-in late. Grading will base on the content and readability of your report. G ! * + 4 5 < = rsvwgh Fۻ۴۴۬۴۴ۧۢۧۗیۈۧ hM|>*hM|jhUjUhU hH* h>*hM|h] h6] h5\ h0JjhUjhUh h\ h5h5CJ$aJ$h5CJaJmHsH3!7FGT <gh$a$\h\ & FF[qr"#9<STVWYC:JY\¸ϮϩϩϩϩϩϢϩϩϩϩϛϛ hM|>*hM|hM|>* h>*\ hH*\ h5hM|h5]h=oh=o>*\ h=o\h6\] h\h5CJaJ hM|5 hM|hhM|hM|hM|5h h5\2 1h/ =!"#$%UDyK 8http://cvc.yale.edu/projects/yalefacesB/yalefacesB.htmlyK phttp://cvc.yale.edu/projects/yalefacesB/yalefacesB.htmlYDyK 9http://www.cs.ucsd.edu/classes/sp04/cse152/hw5/faces.zipyK rhttp://www.cs.ucsd.edu/classes/sp04/cse152/hw5/faces.zipIDyK 5http://cvc.yale.edu/projects/yalefacesB/subsets.htmlyK jhttp://cvc.yale.edu/projects/yalefacesB/subsets.html@@@ NormalCJ_HaJmH sH tH DA@D Default Paragraph FontViV  Table Normal :V 44 la (k@(No List 6U@6 Hyperlink >*B*phFV@F FollowedHyperlink >*B* ph\$!7FGT < g h ^00000000000000000000000000000000000 0000000000 0 0 0 0F\ h\\ vg\XXX _Hlt73378045 _Hlt73378046^@@^*Atg^^8*urn:schemas-microsoft-com:office:smarttagsdate 200436DayMonthYear(*12Fy u#- UX^ !67E "pdj ' C R o ~ } ^333333333337!  /3#*78*+-./ T Y :<F[^^R)6Hu8%b OOG7Fv~JF>=H(gIFRegJvc^`o(. ^`hH. pLp^p`LhH. @ @ ^@ `hH. ^`hH. L^`LhH. ^`hH. ^`hH. PLP^P`LhH.88^8`o(. ^`hH.  L ^ `LhH.   ^ `hH. xx^x`hH. HLH^H`LhH. ^`hH. ^`hH. L^`LhH.^`o(. ^`hH. pLp^p`LhH. @ @ ^@ `hH. ^`hH. L^`LhH. ^`hH. ^`hH. PLP^P`LhH.hh^h`o(. 88^8`hH. L^`LhH.   ^ `hH.   ^ `hH. xLx^x`LhH. HH^H`hH. ^`hH. L^`LhH.^`o(. ^`hH. pLp^p`LhH. @ @ ^@ `hH. ^`hH. L^`LhH. ^`hH. ^`hH. PLP^P`LhH.^`o(. ^`hH. pLp^p`LhH. @ @ ^@ `hH. ^`hH. L^`LhH. ^`hH. ^`hH. PLP^P`LhH.h 88^8`hH.h ^`hH.h  L ^ `LhH.h   ^ `hH.h xx^x`hH.h HLH^H`LhH.h ^`hH.h ^`hH.h L^`LhH.OG7R)68%=HgIegJF         V                                                     =oM|@[[H[[\@@UnknownGz Times New Roman5Symbol3& z Arial"qhGЅfcۅ!24dTT 3AH(?=oComputer Vision kriegmanMCS(       Oh+'0t  0 < HT\dlComputer Vision domp kriegmanVisrierieNormalnMCS6SMicrosoft Word 10.0@@kB@*D՜.+,D՜.+,@ hp  UCSDcT Computer Vision Title8 8@ _PID_HLINKSA[5http://cvc.yale.edu/projects/yalefacesB/subsets.htmlVN9http://www.cs.ucsd.edu/classes/sp04/cse152/hw5/faces.zip?x8http://cvc.yale.edu/projects/yalefacesB/yalefacesB.html  !"#$%&'()*+,./012346789:;<?Root Entry F06*DAData 1Table}#WordDocument"$SummaryInformation(-DocumentSummaryInformation85CompObjj  FMicrosoft Word Document MSWordDocWord.Document.89q