OpenCV optimization [closed]

asked 2014-08-28 05:17:26 -0600

renter gravatar image

updated 2014-08-28 06:25:13 -0600

berak gravatar image

I have a small program that compares one face to a folder of faces, about 1000 faces. Im using FisherFaceRecognizer and it works decent so far despite it takes 10 minutes to return a result. The end game for this program is to have a database of about 30k faces. What can I do to optimize a little better to help speed up a single search and how should I approach comparing 30k faces without it taking an hour? Would a database of some sort help instead of loading all the images in every time?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by StevenPuttemans
close date 2014-08-29 15:40:09.353023

Comments

2

it probably takes 10 minutes to train that thing.

so, just do that only once, use FaceRecognizer::save() to write a yml file, next time load that instead of re-training (also, saving the eivenvectors, mean, etc binary would give a huge speedup, but i doubt, that you can access them from javacv)

berak gravatar imageberak ( 2014-08-28 05:31:25 -0600 )edit

This is what I was looking for thank you. Can I load the old yml and train say a single image into the existing info? This way when my file gets huge I dont have to wait 15 minutes just for one face?

renter gravatar imagerenter ( 2014-08-28 05:52:56 -0600 )edit
1

Nope retraining isn't available for the moment ... sadly it isn't. But if you don't have to add people regularly it does the trick perfectly fine.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-28 05:57:47 -0600 )edit

Is there anything else I can do to speed progress up. Im down to about a minute now

renter gravatar imagerenter ( 2014-08-28 06:07:46 -0600 )edit
2

updating the existing trained model with additional images is only possible for the lbph facereco, for fisher/eigen you have to re-train on the whole data set.

berak gravatar imageberak ( 2014-08-28 06:12:25 -0600 )edit

@berak I would like to mark your comment as answered but I do not see an option to do so

renter gravatar imagerenter ( 2014-08-29 15:23:22 -0600 )edit

np, just leave it as it is.

berak gravatar imageberak ( 2014-08-29 15:27:44 -0600 )edit