Compilation time is too much slow.

Sorry for my english because I´m spanish and I don't speak very well.
I´m programming a face recongnition system. The sistem consist off 4 different algorithms of another persons and my work is to incorporate this algorithms to a GUI. One of this algorithms calls several .mex files and the compilation is very slow. (around 6 minutes with 3 users registered, 13 minutes with 4 users registered) and I have to register more users in the DataBase. The other methods take about 5 seconds to search the users in the database. The difference is very big. This method works with the SVM (support vector machine) and use the libsvm libraries. I've downloaded the last version of libsvm, I've compiled the make file and I've replaced the mex files in my working folder. The compilation time is about the same and I don't know what to do to reduce this time. My Matlab version is 7.8.0.(R2009a). I downloaded the Matlab 2012 but the result was the same.
Can anybody help me? Thank you so much.

回答 (1 件)

Image Analyst
Image Analyst 2012 年 12 月 15 日

0 投票

I don't think the compilation time will depend on how many faces are in your database. For the apps that I compile I notice that they take usually around 3-4 minutes. Sometimes however one might take 10 or 11 minutes - probably there was some other process running in the background, like automatic software updating or disk defragmentation. I have MATLAB R2012b 64 bit on Windows 7, with an 8-core i7 processor, 3 GHz, and 8 GB of RAM so it's a fairly speedy machine. It does seem like it takes a long time, so when I'm waiting I usually come here to the Answers forum and answer a few questions to pass the time.

5 件のコメント

Walter Roberson
Walter Roberson 2012 年 12 月 16 日
I think perhaps "compilation time" is referring to the time to run the algorithm, not the time to convert the C (or C++) code into compiled object code.
Omar Martinez
Omar Martinez 2012 年 12 月 17 日
Yes, I'm referring to the time that Matlab needs to run my algorithm. Analyst: this time depends on how many users are registered in the database. When I run this algotithm: 2 users reg: 245 seconds 3 users reg: 394 sec. 4 users reg: 804 sec. I close all the processes running in the background every time I run Matlab. If I have to register 20 users, the time probably will be a several hours and I think this is not a normal time. I emphasize that when the algorithm calls to the .mex files and then this files calls to the .c files is when the algorithm consumes most of the time. I hope you understand my English. I's sorry if is not good.
Image Analyst
Image Analyst 2012 年 12 月 17 日
I don't know why that would make a difference. You're not re-analyzing every face in the database all over again are you? You just pre-calculate the feature vectors and store them in the database, and just compare the "test" feature vector against the ones stored in the database, right?
Walter Roberson
Walter Roberson 2012 年 12 月 17 日
The SVM part suggests that the features are being processed through a Support Vector computation to find the class boundaries, that would then be stored for future testing during retrieval stage. Multi-class SVM is usually handled by doing pairwise comparisons, so time would expand as the square of the number of classes. (There are, though, true multi-class SVM routines available in papers; those apparently increase exponentially in the number of classes.)
Omar Martinez
Omar Martinez 2012 年 12 月 17 日
To be honest, I don't know because I didn't make this algorithm, but I have reviewed and I see that this algorithm don't save any file with the vectors. I think the vectors must be saved in a .mat file. It's possible? It can be the problem, because to calculate all the vectors every time can take a long time, right? Than you.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeMATLAB Compiler についてさらに検索

質問済み:

2012 年 12 月 15 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by