• Stars
    star
    229
  • Rank 174,666 (Top 4 %)
  • Language
    Python
  • Created over 4 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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
for multi-scale,set the scale with 0.8,1.0,1.2,1.4, but they also resize to 800*800, so i think it not the real multi-scale test.

Method Easy Medium Hard
ours(one scale) 0.9206 0.9089 0.7846
original 0.922 0.911 0.782
ours(multi-scale) 0.9306 0.9193 0.8008

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: etdi

  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: f9hh
train

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

the train tricks

Training directly with the current code will not achieve the precision of the paper (I have also tested various scenarios).

Here's how I train:

  1. First train with the size of 640×640/514×514

  2. Then fine tune with the size of 800×800

  3. For the easy and hard part, s = s * np.random. Choice (np.arange(0.3, 1.2, 0.1)). The larger the value, the more small samples will be generated

or you can fine tuning on the pretrained model.


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

More Repositories

1

Attention_ocr.pytorch

This repository implements the the encoder and decoder model with attention model for OCR
Python
347
star
2

SRN.pytorch

Unofficial PyTorch implementation of Towards Accurate Scene Text Recognition with Semantic Reasoning Networks
Python
184
star
3

Bert_OCR.pytorch

Unofficial PyTorch implementation of 2D Attentional Irregular Scene Text Recognizer
Python
130
star
4

DDRNet.pytorch

This is the unofficial code of Deep Dual-resolution Networks for Real-time and Accurate Semantic Segmentation of Road Scenes. which achieve state-of-the-art trade-off between accuracy and speed on cityscapes and camvid, without using inference acceleration and extra data
Python
124
star
5

CLPR.pytorch

End to End Chinese License Plate Recognition
Python
75
star
6

FOTS.pytorch

an unofficial implementation of FOTS: Fast Oriented Text Spotting with a Unified Network
C++
67
star
7

facemask

口罩检测。凑个热闹,和百度类似的是否佩戴口罩检测分类,但是速度会更快。
Python
26
star
8

ocr_annotation

using python and flask for ocr annotation web tool
Python
23
star
9

Self_cross_entropy

Write a cross_entropy function in pytorch to remove the abnormal nan value
Python
9
star
10

Flask_UI_Pytorch

create a sample UI for deep learning by using flask
HTML
7
star
11

GIOU_EAST

use giou loss function for east
Python
6
star
12

tensorrt.test

test tensorrt c++/python api, c++/python plugins.
C++
5
star
13

dler.collection

a collection of studing
C++
4
star
14

transformerOcr

use transformer as the decoder model for OCR
1
star
15

flask_api

Flask deep learning API demo
Python
1
star
16

AI.hisi

AI在hisi开发板上的部署,评测,对比
C
1
star
17

tensorrt.collection

some example and benchmark for using tensorrt
C++
1
star