Skip to content

unofficial version of centerface, which achieves the best balance between speed and accuracy at face detection

Notifications You must be signed in to change notification settings

Frizy-up/CenterFace.pytorch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

the real-time face detection Centerface

unofficial version of centerface, which achieves the best balance between speed and accuracy. Centerface is a practical anchor-free face detection and alignment method for edge devices.

The project provides training scripts, training data sets, and pre-training models to facilitate users to reproduce the results. Finally, thank the centerface's author for the training advice.

performance results on the validation set of WIDER_FACE

use the same train dataset without additional data

Method Easy Medium Hard
ours(one scale) 0.9257 0.9131 0.7717
original 0.922 0.911 0.782
ours(multi-scale) - - -

Requirements

use pytorch, you can use pip or conda to install the requirements

# for pip
cd $project
pip install -r requirements.txt

# for conda
conda env create -f enviroment.yaml

Test

  1. download the pretrained model from Baidu password: fk2n

  2. download the validation set of WIDER_FACE password: y4wg

  3. test on the validation set

cd $project/src
source activate torch110
python test_wider_face.py
  1. calculate the accuracy
cd $project/evaluate
python3 setup.py build_ext --inplace
python evaluation.py --pred {the result folder}
    
>>>
Easy   Val AP: 0.9257383419951156
Medium Val AP: 0.9131308732465665
Hard   Val AP: 0.7717305552550734
  1. result
    result

  2. face recognition video
    video

Train

the backbone use mobilev2 as the same with the original paper The annotation file is in coco format. the annotation file and train data can download for Baidu password: y4wg train

cd $project/src/tools
source activate torch110
python main.py

Train on your own data

follow the CenterNet


TO DO

  • use more powerful and small backbone
  • use other FPN tricks

reference

borrow code from CenterNet

CenterNet
CenterMulti
Star-Clouds/CenterFace

About

unofficial version of centerface, which achieves the best balance between speed and accuracy at face detection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 78.3%
  • Cuda 7.9%
  • C++ 7.0%
  • C 6.8%