-
In this repo, we propose a promising face detector, termed as MogFace.
-
Our MogFace consists of 3 novel modules, including Ali-AMS, SSE and HCAM.
-
Our MogFace achieves six champions on WIDER FACE.
conda create -n MogFace python=3.6
conda activate MogFace
pip install -r requirements.txt
cd utils/nms && python setup.py build_ext --inplace && cd ../..
cd utils/bbox && python setup.py build_ext --inplace && cd ../..
- Download preatrain_weights into pretrain_weights
- Download the WIDERFACE dataset.
- Organize the dataset directory under Mogface/ as follows; We also provide the organized dataset.
dataset/WIDERFACE/
WIDER_train/
images/
WIDER_val/
images/
WIDER_test/
images/
wider_face_split/
wider_face_train_bbx_gt.txt
wider_face_val.mat
wider_face_test.mat
ground_truth/
- Train Ali-AMS
CUDA_VISIBLE_DEVICES=0,1,2,3 python train.py -c configs/mogface/MogFace_Ali-AMS.yml
- Train SSE
CUDA_VISIBLE_DEVICES=0,1,2,3 python train.py -c configs/mogface/MogFace_SSE.yml
- Train HCAM
CUDA_VISIBLE_DEVICES=0,1,2,3 python train.py -c configs/mogface/MogFace_HCAM.yml
- Single scale test on
$CONFIG_FILE$
CUDA_VISIBLE_DEVICES=0 python test_single.py -c $CONFIG_FILE$
CUDA_VISIBLE_DEVICES=0 python test_single.py -c configs/mogface/MogFace_Ali-AMS.yml
- Multi scale test on
$CONFIG_FILE$
CUDA_VISIBLE_DEVICES=0 python test_multi.py -c $CONFIG_FILE$
Name | Easy | Medium | Hard | Link |
---|---|---|---|---|
MogFace_Ali-AMS (SS_test) | 94.6 | 93.6 | 87.3 | download |
MogFace_SSE (SS_test) | 95.6 | 94.1 | - | download |
MogFace_HCAM (SS_test) | 95.1 | 94.2 | 87.4 | download |
MogFace-E (MS_test) | 97.7 | 96.9 | 92.0 | download |
MogFace (MS_test) | 97.0 | 96.3 | 93.0 | download |
- MS_Test: multi-scale testing
- SS_Test: single-scale testing
CUDA_VISIBLE_DEVICES=0 python test_multi.py -c configs/mogface/MogFace.yml -n 140 --test_hard 1
CUDA_VISIBLE_DEVICES=1 python test_multi.py -c configs/mogface/MogFace_E.yml -n 140
The best MogFace model and some tricks will be released soon.
- Download MogFace-E Pretrained Model from link
- mkdir -p snapshots/MogFace-E && mv model_140000.pth snapshots/MogFace-E/
- CUDA_VISIBLE_DEVICES=0 python test_multi.py -c configs/mogface/MogFace-E.yml -n 140