This is the official repository of the paper entitled "Explaining Disparate Impacts in Face Recognition via Image Characteristics".
We provide a Pytorch toolbox for Face Recognition training and testing. It provides a training part with various SOTA Face Recognition backbones and heads and an evaluation part that:
- Provides evaluations of the given model(s) in order to obtain metrics like ROC curves, AUCs, EERs, EERs@FAR1% etc.
- Provides metrics as FAR and FRR variation across multiple factors like sex and ethnicity and their combinations
- Provides correlation between FAR/FRR and other sensitive/protected attributes in order to get meaningful explanations of what influences the trend of the cited metrics
- Provides Linear Regression modules in order to weight the given attributes accordingly to a given metric
Here we provide two Datasets (DiveFace, VGG-Face2 test set) annotated with a lot of attributes. Namely: age, smile, moustache, beard, sideburns, mask, headWear, glasses, head_roll, head_yaw, head_pitch, eye_makeup, lip_makeup, forehead_occluded, eye_occluded, mouth_occluded, blur, exposure, noise
- Python >= 3.7
- PyTorch >= 1.10.0
- DeepFace == 0.0.72
- MatPlotLib == 3.5.2
- Scikit Learn == 1.0.1
- Scipy == 1.7.1
- Seaborn == 0.11.2
In order to install all the necessary prerequisites, you can simply execute the following command:
pip install -r requirements.txt
See README in training folder
See README in src/experiments folder
This code is provided for educational purposes and aims to facilitate reproduction of our results, and further research in this direction. We have done our best to document, refactor, and test the code before publication.
If you find any bugs or would like to contribute new models, training protocols, etc, please let us know.
Please feel free to file issues and pull requests on the repo and we will address them as we can.
This code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This software is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for details.
You should have received a copy of the GNU General Public License along with this source code. If not, go the following link: http://www.gnu.org/licenses/.
This work is greatly inspired by FaceX-Zoo. We thank the authors a lot for their valuable efforts.