RetinaFace detector based on detectron2.
- Baseline R-50
- Baseline mnet[v1, v2]
- Update the Conv and Norm Used
- Update to suitable for latest detectron2 version: remove duplicate anchors
- Add DFConv
- Add BiFPN
- Add other backbones
- Add visual samples
- Stylize the original
widerface
dataset to coco-style
python tools/widerface_stylized_coco.py
- Train
python train_net.py --num-gpus <number of gpus> --config-file <your config file>
For example, train with a baseline with backbone(resnet50
), you can use this codes:
python train_net.py --num-gpus 4 --config-file configs/retinaface/retinaface_R_50_FPN.yaml
When testing model, you only need to specify the following essential arguments:
config-file
: the same with the config file when you training the modelinput
: video path orregular match
file pathoutput
: specify the output folder to save the resultopts
: loading the latest trained checkpoint
For example,
python demo.py --config-file configs/retinaface/retinaface_R50_FPN.yaml --input datasets/widerface/val/images/*/*.jpg --output work_dirs/retinaface_R_50_FPN/val --opts MODEL.WEIGHTS work_dirs/retinaface_R_50_FPN/model_final.pth
After generated the result(Test part
),
- Change the results format into
widerface
style
python tools/predictions_to_widerface_val.py --res work_dirs/retinaface_R_50_FPN/val/results.pkl --save work_dirs/retinaface_R_50_FPN/widerface
- Use
widerface_evaluate
to visual the performance
cd tools/widerface_evaluate
python evaluation.py --p ../../work_dirs/retinaface_R_50_FPN/widerface