How to add more data in previously stored trained data file?

asked 2014-01-07 01:17:37 -0500

vivek0402 gravatar image

updated 2014-01-07 01:18:28 -0500

I have trained.xml file saved previously. now I want to add more training data in this file. Is there any method to do that? I have a scenario- I have trained Face recognition algorithm with some faces and saved the data in file trained.xml. now I want to add data of one more person in that file. I tried to train the algorithm with the images of that person saperately but it gives error-

Atleast two classes are required for LDA but only one class is provided.

I have no idea what to do now.

edit retag flag offensive close merge delete


only the LBPHFaceRecognizer supports the update method, where you just can add new faces, and save them again ( but again, no idea about javacv, sorry )

berak gravatar imageberak ( 2014-01-07 03:04:40 -0500 )edit

Can you please describe how it is done in LBPHFaceRecognizer .

vivek0402 gravatar imagevivek0402 ( 2014-01-07 04:13:30 -0500 )edit

you train your model using some faces, save it. after that, you load the xml, and for adding new faces, you call update() instead of train() for the new data (and then save it again).

berak gravatar imageberak ( 2014-01-07 04:32:17 -0500 )edit

yeah it's working. thanks

vivek0402 gravatar imagevivek0402 ( 2014-01-07 05:26:10 -0500 )edit
molina gravatar imagemolina ( 2014-05-14 09:41:49 -0500 )edit