RetinaFace is a practical single-stage SOTA face detector which is initially introduced in arXiv technical report and then accepted by CVPR 2020.
This is a modified repository structured similarly to the original repository which can be found here. Group-F has tried to recreate the results obtained by the original code on the WiderFace dataset as well as obtain results on a new dataset created by us.
- Download the WiderFace dataset from the drive link here. Create a folder
data
and unzip the contents in that folder. - Download the pre-trained model from the drive link here. Create a folder
model
and unzip the contents in that folder. - Execute the make file to setup the environment.
- Using a conda environment, install additional dependencies,
pip install mxnet-cu101 opencv-python easydict Cython
. - Use the command
python test_widerface.py --prefix './model/R50' --mode=1
to test the pretrained RetinaFace-50 (R50) model on the WiderFace dataset. The outputs will be saved in thewout
folder. - Move the
wout
folder ineval/eval_tools
and execute thewider_eval.m
file to produce the output PR curve graphs.
- The new dataset is present in the
new_data
folder. It consists of 3 subsets along with a combined set of all images and label files. - To test RetinaFace-50 on this new data, run the command
python test.py new_data/all/img output/all
. This will produce the labels as predicted by RetinaFace-50 in theoutput
folder. - Run
python test_output.py output/all/text new_data/all/text all
to produce the PR curves along with MAP values for the new data.