CSSE463: Image Recogto Da 27 Ths week Toda: Alcatos of PCA Suda ght: roject las ad relm work due Questos?
Prcal Comoets Aalss weght grth c ( )( ) ( )( ( )( ) ) heght sze Gve a set of samles, fd the drecto(s) of greatest varace. We ve doe ths! Eamle: Satal momets Prcal aes are egevectors of covarace matr Egevalues gave relatve mortace of each dmeso Note that each ot ca be rereseted 2D usg the ew coordate sstem defed b the egevectors The D reresetato obtaed b rojectg the ot oto the rcal as s a reasoabl-good aromato
Covarace Matr (usg matr oeratos) Place the ots ther ow colum. Fd the mea of each row. Subtract t. Multl N * N T You wll get a 22 matr, whch each etr s a summato over all ots. You could the dvde b c ) )( ( ) )( ( ) )( ( F...... 3 2 3 2 N...... 3 2 3 2 Q
Geerc rocess The covarace matr of a set of data gves the was whch the set vares. The egevectors corresodg to the largest egevalues gve the drectos whch t vares most. Two alcatos Egefaces Tme-elased hotograh
Egefaces Questo: what are the rmar was whch faces var? What haes whe we al PCA? For each face, create a colum vector that cotas the test of all the els from that face Ths s a ot a hgh dmesoal sace (e.g., 65536 for a 256256 el mage) Create a matr F of all M faces the trag set. Subtract off the average face, m, to get N Comute the rc rc covarace matr C = N*N T. F, 2, 3, rc,,2 2,2 3,2 rc,2,3 2,3 3,3 rc,3, M 2, M 3, M rc, M M. Turk ad A. Petlad, Egefaces for Recogto, J Cog Neurosc, 3()
Questo: what are the rmar was whch faces var? What haes whe we al PCA? The egevectors are the drectos of greatest varablt Note that these are 65536-D; thus form a face. Ths s a egeface Here are the frst 4 from the ORL face dataset. Egefaces Q2-3
Questo: what are the rmar was whch faces var? What haes whe we al PCA? The egevectors are the drectos of greatest varablt Note that these are 65536-D; thus form a face. Ths s a egeface Here are the frst 4 from the ORL face dataset. Egefaces htt://uload.wkmeda.org/wkeda/commos/6/67/egefaces.g; from the ORL face database, AT&T Laboratores Cambrdge Q2-3
Iterlude: Projectg ots oto les weght grth sze We ca roject each ot oto the rcal as. How? heght
Iterlude: Projectg a ot oto a le Assumg the as s rereseted b a ut vector u, we ca just take the dot-roduct of the ot ad the vector. u* = u T (whch s D) Eamle: Project (5,2) oto le =. If we wat to roject oto two vectors, u ad v smultaeousl: Create w = [u v], the comute w T, whch s 2D. Result: s ow terms of u ad v. Ths geeralzes to arbtrar dmesos. Q4
Alcato: Face detecto If we wat to roject a ot oto two vectors, u ad v smultaeousl: Create w = [u v], the comute w T, whch s 2D. Result: s ow terms of u ad v. I arbtrar dmesos, stll take the dot roduct wth egevectors! You ca rereset a face terms of ts egefaces; t s just a dfferet bass. The M most mortat egevectors cature most of the varablt: Igore the rest! Istead of 65k dmesos, we ol have M (~50 ractce) Call these 50 dmesos face-sace
Egefaces Questo: what are the rmar was whch faces var? What haes whe we al PCA? Kee ol the to M egefaces for face sace. We ca roject a face oto these egevectors. Thus, a face s a lear combato of the egefaces. Ca classf faces ths lower-d sace. There are comutatoal trcks to make the comutato feasble
Tme-elased hotograh Questo: what are the was that outdoor mages var over tme? Form a matr whch each colum s a mage Fd egs of covarace matr See eamle mages o Dr. B s lato or at the lk below. N Jacobs, N Roma, R Pless, Cosstet Temoral Varatos Ma Outdoor Scees. IEEE Comuter Vso ad Patter Recogto, Meaols, MN, Jue 2007.
Tme-elased hotograh Questo: what are the was that outdoor mages var over tme? The mea ad to 3 egevectors (scaled): Iterretato? N Jacobs, N Roma, R Pless, Cosstet Temoral Varatos Ma Outdoor Scees. IEEE Comuter Vso ad Patter Recogto, Meaols, MN, Jue 2007. Q5-6
Tme-elased hotograh Recall that each mage the dataset s a lear combato of the egemages. mea PC PC2 PC3 = + 492* - 27* +393* = - 2472* + 308* +885* N Jacobs, N Roma, R Pless, Cosstet Temoral Varatos Ma Outdoor Scees. IEEE Comuter Vso ad Patter Recogto, Meaols, MN, Jue 2007.
Tme-elased hotograh Ever mage s rojecto oto the frst egevector N Jacobs, N Roma, R Pless, Cosstet Temoral Varatos Ma Outdoor Scees. IEEE Comuter Vso ad Patter Recogto, Meaols, MN, Jue 2007.
Research dea Doe: Fdg the PCs Usg to detect lattude ad logtude gve mages from camera Yet to do: Classfg mages based o ther rojecto to ths sace, as was doe for egefaces