Skip to content

Latest commit

 

History

History
94 lines (74 loc) · 3.58 KB

README.md

File metadata and controls

94 lines (74 loc) · 3.58 KB

MogFace: Towards a Deeper Appreciation on Face Detection

Introduction

  • 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.

Prepare Environment

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 ../..

Data Preparation

  1. Download preatrain_weights into pretrain_weights
  2. Download the WIDERFACE dataset.
  3. 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/

Training

  1. Train Ali-AMS
  CUDA_VISIBLE_DEVICES=0,1,2,3 python train.py -c configs/mogface/MogFace_Ali-AMS.yml
  1. Train SSE
  CUDA_VISIBLE_DEVICES=0,1,2,3 python train.py -c configs/mogface/MogFace_SSE.yml
  1. Train HCAM
  CUDA_VISIBLE_DEVICES=0,1,2,3 python train.py -c configs/mogface/MogFace_HCAM.yml

Testing

  1. 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
  1. Multi scale test on $CONFIG_FILE$
  CUDA_VISIBLE_DEVICES=0 python test_multi.py -c $CONFIG_FILE$

MogFace Pretrained Models

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.

USAGE

  1. Download MogFace-E Pretrained Model from link
  2. mkdir -p snapshots/MogFace-E && mv model_140000.pth snapshots/MogFace-E/
  3. CUDA_VISIBLE_DEVICES=0 python test_multi.py -c configs/mogface/MogFace-E.yml -n 140