3.0

3.0 | 22 ratings Rate this file 178 downloads (last 30 days) File Size: 2.11 KB File ID: #23028

a better code for LDA based face recognition

by Shahab Anbarjafari

 

18 Feb 2009 (Updated 21 Feb 2009)

Code covered by BSD License  

I have modified the former code so that it runs faster and can be run on normal PCs.

Download Now | Watch this File

File Information
Description

This code is LDA base face recognition programme. It reads nots(here 5) faces from ORL database and the rest (noc-nots) are used as test. LDA_Performance shows the recognition performance.
   
In order to be able to run this programme for ORL face database you need to download the following zip-file. Then copy this code in the folder which includes the face samples and then run this script. The zip-file is available at: http://www.mathworks.com/matlabcentral/fileexchange/22466
   
This code has been written in Fall 2008 by me, Gholamreza Anbarjafari (Shahab). You can use this code for any research and academic purposes and you may refer to us in your acknowledgement!
   
Feel free to contact us for any further information:
 {hasan.demirel, shahab.jafari}[AT]emu.edu.tr
  http://faraday.ee.emu.edu.tr/shahab
  http://faraday.ee.emu.edu.tr/hdemirel
  (c) Demirel and Anbarjafari -2009

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (29)
20 Feb 2009 Anon

When this script is "better", why not update the existing LDA file? Have you never heard of the update function?

This file needs major revision. As it stands right now, it is useless. It is a script and not a function

clc
clear all
close all
clear memory

It reads an image that is not supplied with this function.

And again: Why do you repeatedly clear the variable memory that does not exist. Or does the command clear memory make sense? Correct me if I am wrong. As it stands right now, the script is only useful to you. Since there is no help, it does not even have educational purpose.

20 Feb 2009 Shahab Anbarjafari

Plus, it is called better coz now you can run the code on simpller computers (maybe like the one that we usually use, rather than super fast computers).
Best
Sh

20 Feb 2009 John D'Errico

First of all, please DON"T rate your own code. Your opinion is not pertinent here. We know you are impressed with your own work, otherwise you would not have put it here for the world to see.

PLEASE do not continue to resubmit the same file as new work however. This just clogs up the FEX, leaving too much crap out there to wade through.

As for your work being of any true value, I won't say too much, except that this is a malicious script file that clears the user's workspace. It reads a file that is not even supplied, so the code does not work as is to test it.

The script has NO help. NO explanation of what it does. It uses loops to do trivial things that do not need loops.

20 Feb 2009 Shahab Anbarjafari

:)

14 Mar 2009 Omid Khanmohamadi

This submission can serve as an epitome of the unfortunate trend of the scientific world today. Lots of people are looking for quick, black-box solutions to sophisticated problems. (How totally far that is from being of any value is a separate issue.) Any work (this submission included) containing some buzzwords will attract lots of attention without necessarily being of any quality. I won't repeat John's comments regarding the low quality of this work. I add that apart from rating his own work, the author mentions on his website that he "has been ranked 1 by MathWorks since 19th February 2009." He forgets to mention, however, that, first of all, this ranking is not done by The MathWorks and that it is based on the number of submissions and downloads, and not on the user ratings which could be the true indicator of the quality of a work, based on which this work (and similar works of this author) are of no quality - an average rating of 2.2/5 based on 21 ratings, as of today.

15 Mar 2009 Shahab Anbarjafari

:) may God help you and you improve your position from 16512 to 16000 . Thanks for comment!

15 Mar 2009 Xu Wings

Apart from couple of comments from some amateur users I have to appreciate your work. Very useful code of LDA face recognitions. I also appreciate your work in PCA. Helped me a lot. Both rank 5.

15 Mar 2009 John D'Errico

Actually, the number 1 ranking of this author on the website is a farce anyway. Someone has been cooking the books, for "fun", or what ever reason. So those rankings are totally random. See that of the top 100 authors on the website, each individual has roughly one file with a relatively huge number of downloads. The number is inappropriately large for the actual file chosen.

In fact, these spurious downloads form well over half the total downloads on the website. I once calculated that one individual was artificially generating close to 75% of the download traffic on the website. I've also made sure the website administrator knows of these facts. My suggestion is they cut off the IP address completely for the phantom downloader, as it likely represents a large waste of their resources and a drag on the website response.

So this author should not be so proud of his #1 ranking. His 15 minutes of fame will finish soon.

16 Mar 2009 Shahab Anbarjafari

:)

18 Mar 2009 Yi Cao

I just tested this code with the face database provided in another submission. The code does not work at all. It reports several errors. For example:

??? Undefined function or variable 'x'.

Error in ==> ldaface at 53
AVERAGE=mean(x')';

I corrected this error by rename x to X. Then I got another error:

??? Undefined function or variable 'noc'.

Error in ==> ldaface at 54
Average_Matrix=(ones(noc*nots,1)*AVERAGE')';

I then follow the PCA code to define noc=40; Then, the program finishes with

LDA_Performance =

     0

Clearly, this code has not been tested before submission. I doubt how this code could be rated by someone as useful.

20 Mar 2009 Shahab Anbarjafari

Thanks Xu

29 Mar 2009 Dimitri Shvorob  
29 Mar 2009 Dimitri Shvorob

Typical loop-heavy novice script displaying unfamiliarity with the syntax of basic commands like 'max', 'find', 'mean'. I am sure this simple textbook calculation has shown up on FEX before, and better, so look around.

30 Mar 2009 Kemal  
31 Mar 2009 Hal 9000

poorly written

03 Apr 2009 Ali  
04 Apr 2009 Ziba

Thank you

05 Apr 2009 V. Poor  
05 Apr 2009 alain boyer  
05 Apr 2009 Xing Yu  
05 Apr 2009 Robin Torres  
05 Apr 2009 Mathew Sermen

really excellent work

15 Apr 2009 Mustafa

Just what I was looking for!

22 Apr 2009 Xu Wings  
23 Apr 2009 Nikola

Very helpful

24 Apr 2009 Xu Wings  
19 Jun 2009 Mak K

first of all, I couldn't run the file because it doesn't have the files it needs

I read the code it is not LDA, it's PCA because you did the following:
1- loaded the pictures for training in one matrix as rows (face space)
2- loaded the rest of the pictures for test in another matrix
3- subtracted mean face from all of face space (zero mean face space)
4- covariance for zero mean face space
5- eigenvectors for covariance matrix
6- project the eigenvectors on every picture in train and test sets
7-measure the euclidean distance for test set
 
that is PCA

for LDA, you must get mean for each class
then the mean of all the classes
calculate within-class scatter matrix
calculate the between-class scatter matrix
then the eigenvectors for the product and so on

which you didn't do

03 Oct 2009 Jesus Callirgos

The file 22466 doesn't exist , please updates the information, I´m very insterted in this work,it could be helpfull, but I don`t understand so much.

Thank if you can explain me.

23 Oct 2009 asha rani

after reading cmments, I don,t know I should use it or not!

Please login to add a comment or rating.
Updates
21 Feb 2009

I have added a help (basiclly the description).

Tag Activity for this File
Tag Applied By Date/Time
image processing Shahab Anbarjafari 19 Feb 2009 16:14:22
lda Shahab Anbarjafari 19 Feb 2009 16:14:22
face recognition Shahab Anbarjafari 19 Feb 2009 16:14:22
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com