serengil / deepface

A Lightweight Face Recognition and Facial Attribute Analysis (Age, Gender, Emotion and Race) Library for Python
https://www.youtube.com/watch?v=WnUVYQP4h44&list=PLsS_1RYmYQQFdWqxQggXHynP1rqaYXv_E&index=1
MIT License
14.34k stars 2.2k forks source link

improve performance on a new dataset #406

Closed sri9s closed 2 years ago

sri9s commented 2 years ago

please tell me the strategies to improve the face verification on a new dataset other than threshold finetuning.

Is there a way to retrain the models?

serengil commented 2 years ago

I found all facial recognition models from different researches. So, I have never trained a facial recognition model.

However, facial attribute analysis models are trained by me.

For instance, age & gender prediction model has a tutorial: https://sefiks.com/2019/02/13/apparent-age-and-gender-prediction-in-keras/ . The weights of the final model is serving in deepface nowadays.

If you train a new model with existing structure (e.g. facenet), then you are able to update its weights. Age & gender models will help you how to re-train an existing model.

On the other hand, if you are going to use a new structure, then it requires a code refactoring.