train memory error
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.
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)
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!
did you find the answer to this question? I am having the exact same issue.
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.