CUFCTL / face-recognition

A GPU-accelerated real-time face recognition system based on classical machine learning algorithms
MIT License
23 stars 11 forks source link

Find a reliable ICA implementation #7

Closed bentsherman closed 7 years ago

bentsherman commented 8 years ago

Our MATLAB code for ICA doesn't seem to work, we can't really tell why, and the papers from which this code originated doesn't provide any particular insight on the MATLAB code, so we're moving on to a better implementation. Anyone who is working on this endeavor can use this page as a forum to discuss things.

ctargon commented 8 years ago

I just added the ICA_new directory which contains Matlab files that can be used for the new ICA implementation. check out the commit message for details on what the files do, or read the comments at the top (pretty good commenting on the docs from Helsinki Univeresity).

The next step is to tie all these documents together. I believe we can use CreateDB and Recognition as is, and take pieces from the new files to try to implement ICA.

ctargon commented 8 years ago

Want to get this down while it's fresh in my mind... the fastica.m file adds the mean back into the eigenfaces matrix at the end, I do not think we subtract the mean from the input matrix (or 'center' the input matrix), so this could be affecting our results. Pretty sure this algorithm assumes you are entering a centered data matrix, which we are not.

arlindohall commented 7 years ago

The ICA C code takes the mean twice.

The db_train function takes the mean of the database matrix, and passes this to PCA and LDA. ICA receives the original matrix from db_train, and then it computes the mean in the m_covariance function. If ICA computes the mean on X elsewhere where it is used, then it would be better to receive the mean matrix from db_train and remove the computation of the mean from m_covariance.

If X is used in a place where the mean matrix could not be used, then this may not be necessary.

ctargon commented 7 years ago

Just finished up the "first cut" at the ICA C implementation. Haven't compiled or ran yet and I am sure there will be errors. Uncomment the makefile ICA portion to see what happens if you are even more impatient than me. Updates to come later during a debugging session

ctargon commented 7 years ago

I am going to go ahead and close this issue because we have found a reliable implementation in Matlab, and the C code now works, just isn't quite at the same level of accuracy as Matlab.