Lecture: PCA for Face Recognition

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay so this is the concluding lecture on basically the singular value decomposition and what I thought I'd do today is give you basically a little tour or a warm-up how you might do things like face recognition okay so that's going to be our application face recognition and how you might write software that would be able to do such tasks and so what I want to go through today is some ideas of what people have thought about for a while in fact this has been around for a while under the name of what's called eigenfaces and which is also related to what we've been talking about which is principal components and all of this is related directly to the singular value decomposition so mostly we're going to program and my hope is to demonstrate through example the power of the singular value decomposition now let's recap real quickly what it does if you remember you give me a data matrix a okay you have a certain number of rows and columns if you remember from the last lecture what we're looking for are things that are correlated among the data what things are independent what things are redundant and in order to figure this out in terms of we think about stacking our data in a matrix what we want to figure out is the correlations among the different pieces of information in these different rows or columns and to get at that we can apply this singular value decomposition which breaks this matrix up into three components what this tells you here these are called the singular values it's a diagonal matrix ordered along the diagonal from biggest smallest and these tell you sort of principle directions and also tells you how important each of the principal directions are the principal directions themselves are columns of this matrix U and what the V tells you is for that data how each individual piece of data let's say from Row 1 and Row 2 projects on to these principal component directions now that's what we had talked about last time it's intimately related also to looking at correlation matrices such as this right so we had talked about this correlation matrix and C call it C which tells you essentially how much information each row is is in each row compared to the next row so this is going to tell you something about how much each piece of each row of information is related to the other rows right so there's this idea of redundancy there's this idea of diagonalization there's an idea of projecting onto directions which are minimal in some sense ok so when we talked about this with that spring system what we were trying to do is diagonalize this as much as possible which is equivalent to this matrix here if you remember the eigenvalues of this correlation matrix are the same or related to the singular values of the SVD so you can either look for values of that matrix or single values of the matrix they're going to be equivalent there's a factor of there's a square root factor that's relating the two ok so what is our data in this case for image processing so let's come over here so we want to think about taking pictures for her face recognition so I have an image of somebody okay I can think of this image is just a data matrix right I have a picture and if you look at any of your cameras you have certain number of pixels and x and y and those pixels in x and y direction represent the image so for instance you might have you know 800 by 600 pixels to represent this image and each pixel location is just basically a brightness and a color we're going to mostly work with grain black and white gray scale type images so every pixel is just going to be a number that tells you it's zero it's white if it's one it's black anything between is gray and from that we can construct an image pixel by pixel now what are we going to do with this this is just one image it's one piece of data and what I'm looking to construct is my data matrix a and what I want it in my data matrix a the way we're going to work with this is a set of images image one it's going to be let's say in the first row image two it's going to be a second row all the way to image n so then in images I'm just going to stack them up but wait a minute my image is already a matrix so the first thing you're going to do is you're going to reshape that matrix into a vector so you can lay down this vector row by row so that's one picture you put in here but you're not putting it in as a matrix you're putting it in as a vector okay so there's a very simple way this is called matrix 2 vector conversion okay so you're going to take this thing and you can think about it as chopping up rows and basically saying okay let me take that top row which is where the hair is put it on to the second row and then just stack the second piece on here which is this row of pixels which is sort of this where the eyes are and then stack here the third picture which is part of the mouth and nose and then the fourth picture which is the neck region and some hair and a little bit of that bottom smile so for instance I can take this turn it into a vector it's it so if I had four rows of pixels I would just stack it in two so if spores this was four by four four rows of pixels four columns of pixels I could stack it up into all those four rows and put them back to back to back and what this makes is a row vector that now has 16 pixels where I'm just stacking the data and I put this into my data matrix okay and what I'm going to do for face recognition is I'm going to start thinking about what I want to put in here in particular I'm gonna have an example we're going to try to do a very simple face recognition task we're going to take some pictures of some celebrities we're going to stack them up and we're going to try to figure out what's sort of in some sense the principal component representation of each of these celebrities and how would you take a new picture of the celebrity and decide you know if I were to do a task and have a database with a bunch of pictures of the celebrities and I give you a new picture of a celebrity that's in my database could I say oh who is this and could you project onto these images and could it identify the appropriate celebrity okay so it's going to be our little our little task so most of its going to be on the computer but I want you have this clearly in mind our data our pixel values from pictures that are made into vectors that's it and from here if you want to look at correlations so for instance if I took one celebrity's pictures and a bunch of pictures what would the SVD tell me tell me the right modes that represent that celebrity in the ideal basis okay so let's show this by demonstration so I'm going to come over here to the ughter but pop this thing open OOP here we go remember my password there we are so first of all I start off with this blank screen because I think many of you have been wondering hey what's that background saver he has and look at that it's a beautiful cappuccino made right in my office no you cannot buy it just like many of the best things in life aren't for sale so is this you just have to like you know I make these all the time for my friends so like if you become phrase you know friends with me not like a facebook friend I don't like a little higher level of that you know outcome my office and you can have a cappuccino but I thought I'd just show it to you and show off a little bit of my a little bit of artwork there you see that that's like sort of abstract art on the latte pour I do some nice furnace as well all right so now that you're so impressed with that we can move off and talk about face recognition okay okay so here's what I'm going to do I'm going to pull up a little programming interface here and what I'd like to do to start off is a bunch of code here the fact is it's going to be a little bit more intense coding so I've already pre-programmed the entire code and we're just going to walk through what I want to do here okay so first of all I'm gonna put a break statement here I'm going to just start doing step by step I'm going to copy in a first line here and we're going to go through what this does I'll put it up here for now all right so first of all I have some pictures so I could do the following I am read what this does is the I M stands for image read and I give it a picture Clooney one and it is a JPEG and what this will do is it will go find the picture called Clooney one jpg and it will load it into the computer here so if I this thing okay oh shoot okay nevermind that's fine I just did something kind of dumb but that's alright we'll just go through this and if you look at this thing what it did if you look here on answer look what pulled up it pulled up let's make this call it like something like a equals image read clean one so when I run this thing what's going to do is it creates a matrix a and by the way probably want to put semicolons there so I can do size a so what this is it's an image by the way of George Clooney I pulled off the web it's a 157 by 112 pixels but wait a minute it's 157 by 12 by 3 what's that 3 doing there it is a color picture so every pixel location of this 157 by 12 actually has 3 values because it has a color RGB specified color so in other words this thing is a data cube 1 2 to 7 by 12 by 3 the three values tell you the color at each location ok if we want to see this images you go I am show image show hey if you do it there it is George Clooney alright so we'll pick George Clooney as one of our celebrities okay and and there's the image that I took off the web and that in fact images off the web of course as you know or like trivial to get and so I pulled this one off and in fact I've pulled off a bunch of George Clooney's and various celebrities that we're going to walk through okay now at this point the data itself is in fact image data so it's not even a matrix of data if you want to turn this image into a data first of all what I'm going to do is I'm going to do the following I'm going to turn this image into from RGB which is colored to grayscale and this is very easy to do by RGB to gray so it's going to take an RGB picture and turn it into a grayscale now if I run this and show it there's the grayscale figure okay so we're sort of doing some initial processing of data just by using simple MATLAB commands but the data itself the type of data it is if you come over here I don't know if you can read this very well but it says here the data is you int eight and by the way now by making a grayscale it's 157 512 pixels that's it there's no color so you don't need the color RGB cube you just have for every single pixel location it just has a value which corresponds to where it is on the grayscale but the data format is called you int 8 they're integers you will see them see that they're all integers between 1 and 256 or 255 or something like that it's a color cube or coordinates essentially and they're all integers so right now it's not a matrix we can play around with until we do the following I want to make it double precision numbers I just do double when I say double it's going to happen is it's going to make it a double precision and now I am show won't work as I am show only takes in integer type values so when I do this see just nothing comes up there so now a itself is a matrix so if I say size a same size matrix but check it out it's double precision number so now I can use things like so my plotting the team's like pea color and that is a top view of the data oh and there it is there's Clooney upside down because clearly now is just a matrix okay and if I want to actually view this right-side up I have to use this command called flip a flip command I could say P color flip UD which is going to turn it upside down then there it is okay you can do more than that I can don't want to see all those pixels is 157 by 12 I can say well how about a shading and Terp that's going to interpolate it's going to take off and see an interpolates values between it gives me a nice clean picture and I can if I'd like make it color map gray it's going to make a grayscale there it is Verde okay there's the picture and all I'm plotting now is a matrix okay this data I took it from being an image to being a matrix this is the matrix of data we want to start thinking about working with okay so that's just one picture but I could tell you what we want to do is now do a comparison between a bunch of pictures and so what I've done is I've gone out and grabbed a bunch of pictures so let me go ahead and take care of this here and let me bring up some code that's going to do this so I'm going to introduce you some code here all the way down to here break one of the command in here that I want to point out to you that's at the end here a very important command every single image I grabbed off the web has different resolutions so some of them have you know 800 by 600 pixels some are 415 by 373 and I want to make them all the same see this image resize command or it says I am resize what you can do is take any image and by applying the I am resize and you tell it the pixels you want I want 120 by 80 okay it's going to 120 pixels in one direction in the vertical direction sorry horizontal direction 80 in the vertical so for air reimage I pull off the web I'm going to go ahead and do an image resize so for instance here take a look at c1 first Clooney one image resize what I'm going to do is go grab Clooney Wanda jpg I'm going to do an image read on it RGB to gray which means I'm going to turn to greyscale so read it in turn it to greyscale the double command what the double command does turns it into a data matrix and the image resize turns it into 128 ebuy pixels and that is c1 and then I have five pictures here of George Clooney and once I get those five pictures read in I'm going to go ahead and say okay let's go ahead and plot it on a subplot four rows five columns the first picture P color I'm going to flip it upside down I'm going to put shading and turf make it nice and smooth color map gray it and then I do some I make sure there's no tick marks on x and y direction I'm going to do that with Clooney I've got Obama I got Margaret Thatcher and I got one other there you go these are my pictures these are my database of pictures we're going to work with today got George Clooney Barack Obama Margaret Thatcher and Jason Bourne okay pretty hard to get a picture of Jason Bourne but dang pretty good stuff right he's also known as Matt Damon in some circles I was in Boston last you know we were hanging out all the time me and me and Matt we were fist bumping all kinds of good stuff so here's going to be the objective I'm going to take these pictures and what we'd like to do is we like to figure out what are sort of the principal components of a Matt Damon or a George Clooney or Obama and if I give you a new picture of let's say I want somebody else like Mark Margaret Thatcher that's not part of the database or the trainee this is called a training set because I have all these pictures if I give you a new picture of Margaret Thatcher with this algorithm be able to tell you oh yeah I've identified this person and the it's a closest match is to Row three there Margaret Thatcher what you'd hate to do is give me a new picture of Margaret Thatcher and it says oh this looks like Clooney okay so part of what image recognition does is you never get an exact match but what you'd like to do is to do a good classification of what that image is okay so that's going to be sort of our task centric focus today so those are our pictures the next step I want to do is you see I've got five images of George a Barack Margaret Jason so let's go ahead and maybe think about what's the average George Clooney face look like what's the average Obama face look like now what you see here is I've cropped all these images to be about the same size head shot right and and that's important you can't generically you just can't put in any random size picture and here what I'm trying to do is look at the correlations among the different pictures to see if you can see a defining themes or correlated structures in the faces what is what is it about Barack Obama that makes you identify Barack Obama the way he is okay so what are those principal components in some sense so that comes to the next piece which is looking for here the average face so here we have the average Clooney face so take all five pictures Adam and divided by five there matrices so I can just do this add up all the Obama divided by five and in Figure two I'm going to show these so there's figure two and what this is is what I've done is taken here this is the average face of George Clooney the average Obama face Thatcher face average net Daymond Jason Bourne face and what you could see from these is that you know basically they're obviously smeared out I didn't do careful alignment but in some sense what you would like to do in robust vision processing your computer vision processing the alignment process can be hard maybe someones tilting their head maybe someones smiling maybe someone has our eyes closed these things all create uncertainty in in sort of trying to figure out the person but you can still see even by averaging you can pretty much still see oh you know there's that's Obama that's Jason Bourne Thatcher you could kind of see who the person is there so the averaging isn't is an important concept in this okay now look we're going to do in the data matrix my data matrix right here D zoomy my data matrix what do I do let's talk about what I'm gonna do at each row the reshape command allows you to take a matrix and turn it in a vector or vice versa so the first command here the first row of my data matrix what is it I take C 1 which is Clooney one and I reshape it into a one row by 120 times 80 columns so I took this 120 by 80 picture and I shaped it into one row with 120 by 80 columns okay just like I had drawn on the board that is going to be what we're going to do with this okay so let me go ahead and I'm going to run this and come up to the board it's going to take a little while to run okay so let's come up here back to the lecture so you see what I've got now let's talk about the data I have at least from this I have five pictures of four celebrities right so I have 20 rows of images or 20 rows of data each row is a picture the first five rows we're going to be George Clooney the next five rows going to be a Barack Obama the next five Margaret Thatcher the next five Matt Damon okay these are sub Early's I picked by the way I have to tell you why I picked them well okay one of the reasons I picked them is I put them in the book right and hopefully you can look at section to five and the pictures on the book and I didn't want to pay anybody to like you know use their professional pictures I want just free pictures and these are on the wiki Commons and you can use them for free so I had some other celebrities picked out like I had Roger Federer tennis great but I couldn't find enough pictures of Reggio Federer that we're free now you may think I'm cheap but which might be true but you know look I'm going to go with free pictures if I can get them so I have the pictures lined up and they're going to make this giant matrix so what I'm going to do with this matrix well what I really want to do with this matrix is I want to look for common features among these faces this is my database and you know generically if you're looking at a face database you make as much much much bigger than actually we're working with here okay but in general you take this a matrix and you're going to look at this what is it the correlation matrix of this matrix times itself the transpose of this matrix times itself and what does it do if you do the multiplication it says what is the correlation or the variance an image one with vary with image one and then you say well the next row is going to give me the variance of image two with image one in other words these are to Obama these are to Clooney pictures and you're looking for the commonality in those two pictures there should be redundancy right I mean if Clooney looks like Clooney in all these different pictures you'd imagine that the correlation score between image 1 2 3 4 5 should be pretty high however once you get down here to row 6 now you've switched to Barack Obama and so when you take a correlation between Barack Obama and George Clooney you shouldn't get as high a correlation score they do have common features both have eyes but both have noses both have a mouth both have like some hair and a chin in fact the dominant feature of all faces there's a lot of correlation between all of these the average overall face of all of these is sort of this average face that has chin eyes nose mouth all of them have it and what you're looking to do is to say yeah but outside of the average face what defines a George Clooney or Barack or Margaret Thatcher or Matt Damon that's kind of a thing you're after here and this is what this matrix will start to tell you okay so this is one way to do it you could say I will construct this correlation matrix and write in MATLAB you would just say C is equal to actually we call this D and the code you would say D transpose times D and then one way to do this is you say oh but I want the eigenvectors and eigenvalues of this you could say okay go grab them eggs you put the matrix C in and I'll tell you what these are the Ike's command which you've already learned about eigenvalues eggs will go grab the eigenvalues and eigenvectors of this matrix C and here what you're going to ask it to do is go grabbing the largest 20 largest magnitude 20 eigenvectors possible so if you don't specify this you know it will give you potentially more the way we set this up to 20 but here give me the 20 with the largest magnitude okay that's what this thing will do eggs will give you this and what are the two quantities coming back D is a diagonal matrix the diagonal elements of this the eigenvalues tell you are arranged from largest to smallest the largest being sort of the most important the smallest being the least important and V are the eigenvectors okay this is why it's called eigenfaces these eigenvectors the first eigenvector of this has this dominant average face the second eigenvector tells you about more structure that's on top of the average face what are the other features feature space is really important the ideas outside of the average what do these vectors tell you about the kind of features that a computer algorithm would look for to identify individuals this is one way to get it we will do this here in the code another way to do exactly the same thing is just simply to say okay you want the same thing here then you can just say look how about we calculate the following SVD see you s V these are essentially going to be equal to each other what do I get out here three matrices the S matrix is basically a so we say let's say this the these are like the square root of the diagonals of this okay if you remember last time there's a relationship between the eigenvalues here and the singular values and it's related by a square root the U matrix is essentially equivalent to columns the v eigenvectors here so these are equivalent these are related by a square root and what the v-- tells you is how each image itself projects on to these eigenvectors and modes okay and that's the last piece we want to understand is this idea of a projection on the eigenvalues and eigen modes so let me talk about that so let's say we have from here this thing and what I want to do is if I give you a new maƮtre new image or if I give any single one of these images what I want to do is say well how does this how does an individual image actually project on to the eigenvectors okay so my projection call it projection is equal to I just simply say I want to project onto the eigen vector space a single image onto that eigen vector space okay that's going to be the key idea here and that's going to tell you how any individual image is going to project onto these spaces okay so the best way and by the way this is the reshape vector this is a reset picture and vector form of a specific image so I can take let's say you know image 1 do this multiplication here cuz have the vector representation do the multiplication and what I'm going to get is now a projection onto the eigen vector space okay what is how much is it on eigenvector 1 how much an eigenvector 2 how much on eigenvector 3 and what you're going to see it is going to give you a very unique way of representing each of the different celebrities okay so those are the immediate concepts correlation matrices what's what's with comment about the pictures and then for each grouping of picture you want to ask well what are the what are the features or how does this project on - how does Obama project onto these vectors versus Clooney versus Thatcher versus Matt Damon and that's going to give you the ability to do discrimination tasks to be able to identify uniquely who's who okay you don't just look at the image you look at the image projected onto this space okay again all can be got by the SVD so let's go back to the computer and see how we're doing here all right all right so start walking through some code so I already showed you this which is the average faces Oh all right let me go see what I messed up here this something out of memory oh my goodness that's not cool I just ran this this morning and I have any problems with it let's try one more time exhale see boom it's gone and let's try this one more time we'll start running and then we'll talk about as we go to pop that down Boop still didn't like it okay wouldn't be so unfortunate Here I am demonstrate an it all through this morning and now look at this it's kind of crashing help for options okay so let's try if we can do just the SVD on this thing then instead well I actually would like to work with this alright so tell you what do a global global replace find what let's do this 120 80 and we're going to cut it down a bit we're going to replace it with 60 by 40 if there's an error problem replace all all right good and then we're going to also replace 120 times 80 with 60 times 40 place all close all right now let's try this yeah all right okay there's one to twenty by eighty okay let's go look for our wherever it says 120 find next so this normally does not happen okay so what we want to do is replace 120 by 80 with 60 by 40 place all okay place all what how come they didn't work oh it's our space there okay maybe it's 120 80 by 60 by 60 by 40 place all huh I don't know why that's not working find what boom place with 60 by 40 I saw no all right that worked okay now let's try it again all right good good good let's put everything down for a minute and walk through all right now I at least am in memory okay so this is the kind of thing you hit when you program MATLAB not anything always goes as planned but there we go we've recovered see this matrix D that is where I stacked up here's where I take D transpose times D and then I find the biggest eigenvalues now what I'm going to do with this eigen values is I'm going to go here this figure 3 is going to be the following figure 3 in each subplot a figure 3 I'm going to go so for instance if you look at this one here it's going to go grab the first column of the vector matrix V remember the matrix V are my eigenfaces so this is the dominant eigen face that's correlated among all these twenty pictures the second picture here V to the second column third column fourth column fifth column and finally in the last picture it's going to be basically plotting the diagonals and to show you how big they are so here is a figure let's walk through it you see this first picture this is the average face of all twenty pictures as I said right it's a picture all these pictures they all have noses they all have eyes they all have hair they all have you know sort of a mouth and a chin and you can see all that structure there right so when you think about correlating even more pick even more faces this is your average face what we really want to do is look at what's what is Obama outside of the average face what is Clooney outside the average age because the average face dominates everything here are the singular values so here's the first eigenvalue see how much bigger this is than this one here the first eigenvalue is almost 10 to the 9 and down here an order and a half magnitude below it is the second eigenvalue corresponding to this second dominant eigen face third fourth fifth and you see they kind of decay but the point is this is huge in comparison to the others so to do face recognition we really want to use how are you or how are these pictures different from the average because it tells you that the average dominates and so we want to use your projection onto these eigenvectors to tell you how you're different okay so let's go to figure four and figure four ooh here it is figure four is a projection of the average face onto the eigen vector space okay so here when you start here this is an amount of stuff for the Clooney pick project so if I take the average Clooney face and I project it onto Augen vectors 1 2 3 through 20 this is what it looks like it's a histogram or just actually just a bar plot however I take the average Obama face and I project it on to those this is what it looks like here's the average stature face here's the average Daymond face here's what's important about this picture every person has a very different projection onto that eigen onto those eigenvectors of faces which are generated from all twenty pictures if you want to think about it here this is like a key this is the encoding for George Clooney onto the eigenvectors here's the encoding for Obama of the average face onto the eigenvectors same with Thatcher and Daymond and they're all unique and you could start using them to think about doing classification tasks like oh if I get anything that looks like this one here is probably George Clooney if it looks kind of like this it's Obama and so forth so we can use those to our advantage and how we got that is we just did this projection we took the average face right so here's the average face average face we reshaped it into a vector called vexy so this is your this is your Clooney average face vector and we just simply took that average vector and project it onto eigen vectors and we got projection C and what this does is it plotted all those so we've already looked at that ok so that's what we have now what we want to do is start looking beyond that so that was figure four now we're going to figure five we're going to do some testing here's where the face recognition comes along here's how this is going to work in the top-left I have a new picture of Margaret Thatcher and what I'm going to ask is the following question I want to take this new picture of Margaret Thatcher I'm going to resize her to 60 by 40 pixels and I'm going to project her onto the eigenvector space and this is what she looks like in the eigen vector space okay and once I have that I could say well what is the reconstruction of her face look like with those eigenvectors so right so I have the full picture I have the projection onto the eigen vector space and here is what the reconstruction looks like so it doesn't look too bad does it in fact it kind of looks like Margaret Thatcher it's it kind of looks like her average face in a way so that's kind of good news I took a new picture and it sort of recognizes that now what these bars on the right are is what I can do is say tell you what I'm going to now ask how does her average face project on - uh actually well okay let's get back to this one in a moment well how does her how does her face project onto the five images I had of margaret thatcher's and here's the scores so like friends is the fourth picture of Margaret Thatcher looks it's actually pretty close to where she is that's where you get the minimum amount of error right there okay so a new picture of Margaret Thatcher and I can still reconstruct something that looks sort of like Margaret Thatcher over here normally I would put a picture here Meryl Streep about a year or two years ago played Margaret Thatcher in a movie The Iron Lady or something like this and so I took her picture but I can't get her picture and published it in a book is owned by paramount or something like this but I projected that face onto this eigenspace and you can see it's quite different here's the reconstruction and here's how she does sort of compared to the five images and you see it's quote this is quite a bit worse than this these errors are much slower than this so she maybe doesn't do quite as good a job projecting to a micro teacher then I could take Hillary Rodham Clinton projecting onto Margaret Thatcher space now there's no Hillary Rodham Clinton pictures in here but you see she doesn't look quite as close to Margaret Thatcher as Margaret Thatcher but she does do better than Meryl Streep okay so that's one thing to start thinking about is you can actually start calculating the distance of a new picture to you're given Margaret Thatcher pictures you know if you just do this with celebrities you can come here and say how about me like me as in Lee you're your professor there I am Nathan cuts professor of applied math 301 and you can ask the question how do i project onto these eigenvectors faces and here's my projection and if you construct with these projections and the eigen vector space this is what I look like so I don't I don't think I'm quite as good looking in my eigen vector space in fact I kind of looked like the guy from Mad Magazine a little bit there all you need is a little bit of a gap teeth and I'd be like the Mad Magazine guy but that's that's what you get out of this and then you could ask the question alright but who do I look most like now I was hoping to look most like Clooney but it turns out if you look down here here's my projection onto all the Clooney pictures and by the way I pick Clooney because you know some of you think Clooney's a little old but and that's okay because I'm getting a little old so I should try to compare myself to people like that versus uh you know it sound like Justin Bieber I would rather it would quite be quite embarrassing to look like Justin Bieber for me but looking like George Clooney there's no shame in that okay so I just want to put that out there and it turns out here's my scores good I'm looking not so bad but look at this my best score is an Obama score right there that's the lowest value that's my best error away from that picture good thing I don't look like that sure Matt Damon almost no not so why either I look more like Clooney or Obama not so much like Jason Bourne anyway this is kind of the way you start playing with image recognition and if you remember I mean just this is kind of fun because what you're doing here and could be your vision remember come back up to here is all you're doing is when you look at this everything is about projecting down to these correlations of images and having these basic eigenvector or principal component structures that sort of dominate feature space so a lot of times in a computer vision literature they call it the literature they call it feature space and feature spaces space is exactly what we can construct it here these are the principal components where you reduce all the information on to to these key eigen vectors or eigenfaces and what you do to do some kind of recognition tasks is you don't just look at the picture you look at the picture projected onto the principal components and how much weighting they have in each principal direction because every person that we looked at had a very unique signature in principle component space and so you can start saying I want to look when I do a recognition task where Island just take a new picture projected onto this space and see which which of the database am i closest to and I will do a recognition based upon the principal component projection and that's the kanata pixel by pixel thing and there's 20 directions we've used here right 20 principle components i'm projecting everything onto a 20 dimensional space and in that 20 dimensional space i'm going to construct a recognition algorithm and some people have posited that this is exactly how we might do recognition which is we don't do a pixel by pixel because that's a huge number of points to do but here we're reducing it down to a low dimensional twenty by twenty space we're doing all the tasks on that low dimensional space that's it singular value decomposition don't forget it it's awesome it's great data analysis trick and you should have that always in your head that this thing can do a lot of amazing things for you all right have a good day
Info
Channel: AMATH 301
Views: 45,541
Rating: undefined out of 5
Keywords:
Id: 8BTv-KZ2Bh8
Channel Id: undefined
Length: 48min 2sec (2882 seconds)
Published: Fri Feb 19 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.