I read instruction from here and train classifier to recognize my dataset.
https://github.com/ageitgey/face_recognition/wiki/Face-Recognition-Accuracy-Problems
https://github.com/ageitgey/face_recognition/blob/master/examples/face_recognition_knn.py
I have question - if we have a way to combine classifiers from different pc ?
I collecting dataset on different computers and automatically train classifier, so for example
pc#1 train classifier for 100 womans
pc#2 train classifier for 100 mans
And my third question - trained_knn_model.clf rewriting every time I retrain my classifier. How to learn it without rewriting, just updating ?
I think I solve my third problem with updating trained_knn_model.clf file
You need to change line 105
with open(model_save_path, 'wb') as f:
to this
with open(model_save_path, 'ab') as f:
So now train function will not rewriting, but will add information to the end of file trained_knn_model.clf
I hope it will help people who wants to retrain their models, but do not want to lose pretrained information 馃憤
This does not seem to work. From what I've observed the 'predict' function continues to use only the first part of what has been trained and ignores the next trainings.
What I did to test this:
distance_threshold to 0.4Probably in the first time that the .clf file is created a beginning and an end is defined. When the file is updated it should only insert new elements after this 'end', making these new elements useless.
Most helpful comment
I think I solve my third problem with updating trained_knn_model.clf file
You need to change line 105
with open(model_save_path, 'wb') as f:to this
with open(model_save_path, 'ab') as f:So now train function will not rewriting, but will add information to the end of file trained_knn_model.clf
I hope it will help people who wants to retrain their models, but do not want to lose pretrained information 馃憤