Eigenfaces

Paramjit Singh Sandhu
CSE455 Computer Vision
Project 4 Artifact

Eigen Faces Images


Average Face
------
Ten Eigen faces
0 1 2 3 4 5 6 7 8 9

Plot of number of eigenfaces and classification accuracy


  Plot of the Number of positives vs number of eigenfaces computed.
  The x-axis represents the number of eigenfaces computed, while 
  the y-axis represents the number of correctly classified faces
  in the similing_images category.
  

Discussion
  • From the plots we can clearly see that as we increase the number of eigen faces, our accuracy increases. This is intuitives since as we increase the number of eigen faces, there is more vectors that we can span and come closer to (in terms of mse). Using 10 eigen faces we get 14 out of 24 images which comes to about 58% accuracy. Now given the eigenfaces, if we use too less then we will be efficient and faster, however the accuracy will be worse. Moreover, if we use a lot of eigen faces, the find face and other algorithms can be slower. Moreover, as with machine learning algorithms there is always a possibility of over fitting to the training data and as we go out there into the real world, which will not be very good. Furthermore, just looking at the graph we see that it rises steeply around 14-15 and then plateaus and then has a rise but not that steep. Hence if I were to pick a value I will pick it between 10-15 range (Right before it plateaus off). However there does not seem to be a clear answer.
  • Below are the couple of images that the algorithm consistenly classified until the levels were high enough or that never actually got classified correctly even after using 24 faces. The mistakes were quite consistent (as said) until fixed, and in my opinion very reasonable. It seems that the images that were quite distant from the average face were misclassified more. It can also be because the images did not get enough of the face or were of different sizes as was used in the training data. For some of the images that the classifier was able to recognize with full training data, those appeared high enough to the sorted list. However the others seemed to belong nowhere.
    Often misclassified faces

    It is interesting to note that the the second image was often misclassified with the last one.
    1. Elf Image cropped

      ..\Release\main.exe --findface group\elf.tga eig10.face 0.45 0.55 0.01 crop 1 elf_cropped.tga
      Marked Elf image


    2. Portrait Image Cropped

      ..\Release\main.exe --findface c:\mrs_obama.tga eig10.face 0.45 0.55 0.1 crop 1 mrs_obama_cropped.tga
      Original Portrait image.
      The original image has been taken from the following
      Huntington Post


      1. Smiling IMAGE 0008
        ..\Release\main.exe --findface group/IMG_0008.tga eig10.face .45 .55 .01 mark 3 img_0008_marked.tga 


      2. Non Smiling IMAGE 00011

        ..\Release\main.exe --findface group/IMG_0006.tga eig10.face .45 .55 .01 mark 3 img_0008_marked.tga 

      3. Image 0002 Cropped

        ..\Release\main.exe --findface group/IMG_0002.tga eig10.face 1.0 1.5 .1 mark 10 img_0002_marked.tga

      4. Group Image from the web
        This image has been taken from http://www.stanford.edu/group/fisher/
        Click on image to follow its source:

        Group Image Marked from the web

        ..\Release\main.exe --findface c:\group2005a.tga eig10.face 1.0 1.5 0.1 mark 10 group2005a_cropped.tga

    Questions
  • The min_scale, max_scale and steps are mentioned with each images. For an image like the Lady Obama, although it would have been better to find her for lower scales however, it found the background portrait or the other areas rather then searching for her page.
  • Yes most of the pages did result in false positives and false negatives. Especially it seemed to find more faces on the smooth background (better mse with the average image), and also liked the black/low texture areas as mentioned in the writeup. However, I used the ssd with average_face / variance to get better results, however I do the normalizing after getting the image from subimage, which normalizes the image from 0 to 255. This will blow up the low variance areas like background and result in them getting a lower score. However, it seemed as if my overlap method took care of this by selecting subsequent boxes until it lands to a good face.
    Talking about the overlap algorithm, I use abs() method and check it agains the width and height. However in theory this should not work, since in no scale space the width's of two x's are same. A more appropriate test will involve transforming both of the x and y's to convert it to image scale (which is pretty much x / it->scale), and then check if the max(x's) - min(x's) that takes into account the two widths (since the widths will be different for x's at different scales) is <= 0. Similarly for y's. This pretty much simulates how we draw the actual boxes on the images. (and hence will make sure there will never be overlaps). However my implementation can miss and be off by pixel's depending on the scale. Moreover, the overlap algorithm cannot be perfect since we can come up with a case where we cannot go by removing both of the overlapping boxes (or more for this degenerate case).
    All the marked group images are included under images/group.
  • Verify Faces
    The algorithm was run for different times, here are the results...
  • A perl script was created and the algorithm was run different times, collected all the thresholds for 24 * 24 cases and *tried* to find the best case. However my false negative and false positive numbers given below are a little weird.Since they don't monotonously decrease/increase, however all I was concerned about is the total number of false positives and false negatives increases and decreases.
    The following image only checks for two of the 24 * 24 cases (and also each image vs each other). (Image 01 as the name and then 02 as the name)


    Finally here is the image that was eyeballed to find the possible guesses for different values of the thresholds..
    Click on image to follow the link