cv::FaceRecognizer: Multiple calls to FaceRecognizer::train leave old features, but delete labels (Bug #2214)
Description
While adding a new feature to append images to a model without retraining the LBPH model I found a subtile bug. When calling the training function of any model multiple times, then all of the existing models append the extracted features to the templates, but at the same time overwrite the labels.
For Eigenfaces and Fisherfaces the data has to be deleted and the whole model has to be re-estimated.
For Local Binary Patterns Histograms the features are extracted from the input data and added to the existing templates.
Patch and Unit Tests will be pushed to the Repository in a minute.
Associated revisions
Bug #2214: Fixed bug, when calling the train method multiple times. The Eigenfaces and Fisherfaces method now re-estimate the model, the LBPH method appends the new data to the existing model.
Merge pull request #2214 from cosminBoaca:add_returnDFVal_parallel_predict
History
Updated by Philipp Wagner over 12 years ago
Commited the Patch to the master branch. Several tests for the cv::FaceRecognizer are already implemented at: https://github.com/bytefish/libfacerec/tree/master/test, but I need some more time to adapt them to the OpenCV style of testing.
- Status changed from Open to Done
- % Done changed from 0 to 50