This package implements a well-known FLD-based face recognition method, which is called 'Fisherface'.
All functions are easy to use, as they are heavy commented. Furthermore, a sample script and two small training and test databases are included to show their usage.
I tried not to apply PCA at first. However, it takes such a long time to run the training code.
Based on what Jaime and other people said.
1.In line 43 of "FisherfaceCore.m".
Replace "for i = 1 : P-Class_number" with "for i = P : -1 : Class_number+1".
If the results is still bad, try to increase the number of part " Class_number+1 ".
For example. "for i = P : -1 : (P - Class_number)".
2.Multiply Sb by the number of images per class intraining set.
For example, Sb = Sb + class_number*(m(:,i)-m_PCA) * (m(:,i)-m_PCA)';
Thanks to Amir, Jamie and who contributed to the code.
I used 20 images for training data, the accuracy was good but when I used more than that (ex.100) the accuracy was bad. anyone can help me ?
what the function of class pouplation ? when I change it, it will be error
in which line sb should mutliplied by number pictures in class and is any preprocessing is required if i take pictures from camera continuously.
which preprocessing is better to get good efficiency.
thank you for this code I just changed the code I find good results.
my problem is how to can generates confusion matrix for n class.
i wanted to ask is there any pre-processing can be apply to the recognition to improve recognition rate?
Thanks to you for your correctness in this cod in fisherfacecore.m file
its really effective for me.
Thanks and best regards.
I AM USING 1-FACE IMAGE PER PERSON FOR TRAINING... CAN ANY ONE PLEASE GUIDE ME, HOW TO MODIFY THE CODE?
Tsai, I forgot to mention that Sb should be multiplied by the number of pcitures per class (in this case 2), you are right on that too. Refer to section 2.4 of the following paper to note the error: http://www.face-rec.org/algorithms/LDA/belhumeur96eigenfaces.pdf
If you guys would like to look at another sample Matlab code for fisher faces, look at:
Tsai there is a mistake indeed; the order of the eigenvectors is backwars, and you are using the eigenvectors with less relevance.
In line 43 of FisherfaceCore.m, you have to substitute line 43:
"for i = 1 : P-Class_number"
"for i = P:-1:Class_number+1"
This will solve the problem. I tested with all the faces in the sample set, and it was 90% accurate.
Everything has been working perfectly, thanks for an excellent and well commented code Amir!
And the PCA, the eigen vectors selected should be corresponding to the largest eigen values but in the source code it is opposite,
my email is: firstname.lastname@example.org
expect to dicuss with u:)
Inthe Sb part, there should be a multipler 2, right?
BTW, can I ask why in FisherfaceCore.m - under "Sorting and eliminating small eigenvalues" we don't need to fliplr "V" first since eigenvalues there are in ascending order? is it mean we eliminate large eigenvalues?
It simply works
Dear friend! My code is only a prototype of FLD-based face recognition systems. In fact, this code implements the core algorithm for the system. So, you shouldn't expect it to work well on all datasets. Instead, you can customize it according to your needs and used facial images.
Works well for the toy example provided. Should have been more general.
Thank you very much for your code.
perfect except that there are two little problems in matlab 6.5
thanks a lot
Thanks for your code
they are commented to the max level
keep up the good work
Thank you for your Excellent and clearly Code
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.