train memory error

asked 2014-04-24 07:46:57 -0600

UncleSam gravatar image

updated 2014-04-24 08:02:27 -0600

berak gravatar image

Hi everybody!

Does anybody know if there's a max number of images (ora space) for the train method in the eigenfaces model? I'm training it with 2000 images for a geneder recognizer, but It takes a lot of time and at the end it gives a memory error.

OpenCV Error: Insufficient memory (Failed to allocate 587520004 bytes) in cv::Ou
tOfMemoryError, file C:\builds\2_4_PackSlave-win32-vc12-shared\opencv\modules\co
re\src\alloc.cpp, line 52

I've also see from the docs that eigen and fisher can't perform and update of the model, so I'd like to know if there's a way to avoid this problem.

edit retag flag offensive close merge delete

Comments

2

smaller images might help a bit, but it seems you've hit the limit for your box.

luckily, you only have to train gender/age/emotion classifiers only once (don't forget to save the resulting model !).

for face recognition tasks, please have a look at the lbph recognizer, too. it might even perform better. for sure it is faster, takes less memory, you can update it, you could even use 5 of them in parallel (since no global model is built)

berak gravatar imageberak ( 2014-04-24 08:10:23 -0600 )edit

Well seems like I have to make some trade of on my dataset. Nice info the one about lbp, 5 in parallel? sounds good!!!

thanks for the advice!

UncleSam gravatar imageUncleSam ( 2014-04-24 08:17:03 -0600 )edit

did you find the answer to this question? I am having the exact same issue.

the___doctor gravatar imagethe___doctor ( 2014-06-06 01:37:02 -0600 )edit

I didn't find a proper answer. The problem is that I touched the limit of my RAM memory; the only way to avoid that was to reduce the number of images or switch to another machine with more RAM. By the way I suggest you to take a look to the hlbp recognizer as said before, I've found that it's way better, especially when it comes to deal with light variations.

UncleSam gravatar imageUncleSam ( 2014-06-25 05:50:40 -0600 )edit