KHANH TRAN

Computer Vision (CSE 455), Winter 2012

Project 4: Eigenfaces

Project Abstract

Objectives

In this project, we applied PCA to generage eigenfaces from the set of user faces and use Jacobi::jacobi() method for fiding the eignvector.

Challenges

My problem of this project is how to find faces on the given image and given number of faces. It took me really long time to do it but turned out I couldn't find the correct faces and also I cannot find as many faces as the given number gave.

Lessons Learned

This project is interesting one. I have seen on the digital camera have this tool to figure out faces on the camera before to take the picture, but after did this project I have known how the camera figure out faces. Also, I found that the Jacobi::jacobi() method is useful since we use it for 2 projects in this class.

Implementation

The project is structured as follows:

Experiment: Recognition

Procedure

Average face:

10 eigenfaces:

main --eigenfaces 10 25 25 nonsmiling_cropped/list.txt nosmile_eig.face

 

Plot the number of faces correctly recognized versus the number of eigenfaces used:

Questions

See the plot, the number of faces recognized correctly is increasing from the number of eigenfaces are 1 to 5 and after that the number of faces recognized correctly stays almost the same between 22 & 24. It makes sense because if you have more samples, then we should the result more correct. We should use at least 5 eigenfaces but the best one should be 33 eigenfaces which is all the faces.

Yes, there is a clear answer.

 

Faces cannot recognized correctly:

The reason might be some of faces above have glasses and some are weird faces. Also, some faces have pixels color are almost the same for the whole face; it is hard to figure out whether it is a face or not.

Yes, the correct answer at least appear highly in the sorted results. Most of them are in the first 4 images appear in the sorted results.

Experiment: Find Faces

Procedue

The elf.tga picture

The cropped elf.tga picture

main --findface elf.tga nosmile_eig.face 0.45 0.55 0.01 crop 1 cropped_elf.tga

 

The digital picture on the web


http://footballplayersnames.blogspot.com/2011/10/ronaldinho-messi.html

The cropped messi.tga picture

main --findface messi.tga nosmile_eig.face 0.15 0.25 0.008 crop 1 cropped_messi.tga

 

The group_neutral_2.tga picture

The marked group_neutral_2.tga picture

main --findface group_neutral_2.tga nosmile_eig.face 0.65 0.75 0.01 mark 3 mark_group_neutral_2.tga

 

The digital group picture at least 4 faces on the web


http://www.google.com/imgres?hl=en&gbv=2&biw=1440&bih=747&tbm=isch&tbnid=CHT4Fm7cT7_QAM:&imgrefurl=http://foot-ball-star-style.blogspot.com/2010/06/argentina-football-team-world-cup-2010.html&docid=srU14xLGEjyGrM&imgurl=http://2.bp.blogspot.com/_J3_liDBfbvs/TBN40vWez4I/AAAAAAAAtQ4/8zTY7vQOLfI/s1600/World-Cup-2010-Argentina-Soccer-Team-Image.jpg&w=620&h=388&ei=8nFZT6itGKrViAK13uTRCw&zoom=1&iact=hc&dur=108&sig=113272201187992362349&page=1&tbnh=138&tbnw=221&start=0&ndsp=18&ved=1t:429,r:13,s:0&tx=179&ty=74&vpx=323&vpy=339&hovh=177&hovw=284

The marked world-cup-2010-Argentina.tga picture

main --findface World-Cup-2010-Argentina-Soccer-Team-Image.tga nosmile_eig.face 0.65 0.75 0.05 mark 10 mark_World-Cup-2010-Argentina-Soccer-Team-Image.tga

Questions

The elf.tga picture

min_scale: 0.45; max_scale: 0.55; scale_step: 0.01

The digital picture on the web

min_scale: 0.15; max_scale: 0.25; scale_step: 0.008

The group_neutral_2.tga picture

min_scale: 0.65; max_scale: 0.75; scale_step: 0.01

The digital group picture at least 4 faces on the web

min_scale: 0.65; max_scale: 0.75; scale_step: 0.05

 

Yes, my attempt to find faces result in false positives and also false negatives. If the given image are small size, then my program can find faces even it is not quite correct. Otherwise, my program cannot find any faces and also the number of mark rectangles are not same as the given number. I think I know where I did wrong with my findFace, I should not keep track first n best face positions before to remove the overlaps face positions. What I mean is I should keep track all the face positions on the list and remove all the overlaps face positions on the list, and then while doing marking I only need to get first given n face positions.

Experiment: Verify Faces

Procedure

Commands

main --eigenfaces 6 25 25 nonsmiling_cropped/list.txt nosmile_eig_6.face

main --constructuserbase nosmile_eig_6.face nonsmiling_cropped/list.txt nosmile_6.user

 

main --verifyface smiling_cropped/smiling-1.tga nosmile_6.user nonsmiling_cropped/neutral-1 nosmile_eig_6.face 60000.0
main --verifyface smiling_cropped/smiling-2.tga nosmile_6.user nonsmiling_cropped/neutral-1 nosmile_eig_6.face 60000.0
...
main --verifyface smiling_cropped/smiling-33.tga nosmile_6.user nonsmiling_cropped/neutral-1 nosmile_eig_6.face 60000.0

main --verifyface smiling_cropped/smiling-1.tga nosmile_6.user nonsmiling_cropped/neutral-2 nosmile_eig_6.face 60000.0
main --verifyface smiling_cropped/smiling-2.tga nosmile_6.user nonsmiling_cropped/neutral-2 nosmile_eig_6.face 60000.0
...
main --verifyface smiling_cropped/smiling-33.tga nosmile_6.user nonsmiling_cropped/neutral-2 nosmile_eig_6.face 60000.0

...

main --verifyface smiling_cropped/smiling-1.tga nosmile_6.user nonsmiling_cropped/neutral-6 nosmile_eig_6.face 60000.0
main --verifyface smiling_cropped/smiling-2.tga nosmile_6.user nonsmiling_cropped/neutral-6 nosmile_eig_6.face 60000.0
...
main --verifyface smiling_cropped/smiling-33.tga nosmile_6.user nonsmiling_cropped/neutral-6 nosmile_eig_6.face 60000.0

Questions

MSE thresholds that I tried: 60000, 35000, 40000

From all the thresholds above, 40000 is the one worked best even it cannot make all the smiling face with its neutral face correct but it removes most the smiling faces which are not the same with its neutral face.

 

Here is all the MSE values of all 6 smiling faces with its neutral face:

smiling-1.tga & neutral-1: 15,978

smiling-2.tga & neutral-2: 39,669.3

smiling-3.tga & neutral-3: 11,347.4

smiling-4.tga & neutral-4: 197,721

smiling-5.tga & neutral-5: 76,265.1

smiling-16.tga & neutral-6: 7189.94

 

I ran all the commands above and see all the MSE values to see which thresholds will work best.

 

Using the best MSE threshold, the false negative rate is: 1/198 and the false positive is: 1/99

Discussion

Go through this process, I feel like no threshold makes the verifyFace method works for 100% correctly. I think it is possible to make it work 100% correctly because people can figure out it so I think computer can do it as well.