Karkkainen, K., & Joo, J. (2021). FairFace: Face Attribute Dataset for Balanced Race, Gender, and Age for Bias Measurement and Mitigation. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (pp. 1548-1558).
@inproceedings{karkkainenfairface,
title={FairFace: Face Attribute Dataset for Balanced Race, Gender, and Age for Bias Measurement and Mitigation},
author={Karkkainen, Kimmo and Joo, Jungseock},
booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision},
year={2021},
pages={1548--1558}
}
Install Dependencies
pip install dlib
Run the predict.py script and provide the csv path (described in the section above).
python3 predict.py --csv "NAME_OF_CSV"
After download this repository, you can run python3 predict.py --csv test_imgs.csv
, the results will be available at detected_faces (in case dlib detect multiple faces in one image, we save them here) and test_outputs.csv.
The results will be saved at "test_outputs.csv" (located in the same folder as predict.py, see sample here
same commands as predict.py, the output csv will have additional column "bbox" which is the bounding box of detected face.
python3 predict_bbox.py --csv "NAME_OF_CSV"
indices to type
Images (train + validation set): Padding=0.25, Padding=1.25
We used dlib's get_face_chip() to crop and align faces with padding = 0.25 in the main experiments (less margin) and padding = 1.25 for the bias measument experiment for commercial APIs. Labels: Train, Validation
License: CC BY 4.0
The models and scripts were tested on a device with 8Gb GPU, it takes under 2 seconds to predict the 5 images in the test folder.