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

asked Jan 7 '14

vivek0402 gravatar image

updated Jan 7 '14

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.

Preview: (hide)

Comments

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 (Jan 7 '14)edit

Can you please describe how it is done in LBPHFaceRecognizer .

vivek0402 gravatar imagevivek0402 (Jan 7 '14)edit
1

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 (Jan 7 '14)edit

yeah it's working. thanks

vivek0402 gravatar imagevivek0402 (Jan 7 '14)edit
molina gravatar imagemolina (May 14 '14)edit