Skip to content

A higher performance PyTorch implementation of S3FD

License

Notifications You must be signed in to change notification settings

jamessmith90/S3FD.PyTorch

 
 

Repository files navigation

MobileNet-V2 S3FD in PyTorch

License

A PyTorch implementation of S3FD: Single Shot Scale-invariant Face Detector. The official code in Caffe can be found here.

WIDER Face Performance

Subset Original Caffe PyTorch Implementation MV2 Pytorch Implementation
Easy 93.7% 94.1% 91.5%
Medium 92.4% 92.9% 89.0%
Hard 85.2% 85.4% 76.5%

Component

  • [√] Max-out background label
  • [√] Scale compensation anchor matching strategy
  • [√] Scale-equitable framework

Contents

Installation

  1. Install PyTorch-1.0.0 according to your environment.

  2. Clone this repository. We will call the cloned directory as $S3FD_ROOT.

git clone https://github.com/lippman1125/S3FD.PyTorch.git
  1. Compile the nms:
./make.sh

Note: We support PyTorch-1.0.0 and Python 3+.

Training

  1. Download WIDER FACE dataset, place the images under this directory:
$S3FD_ROOT/data/WIDER_FACE/images
  1. Convert WIDER FACE annotations to VOC format or download our converted annotations, place them under this directory:
$S3FD_ROOT/data/WIDER_FACE/annotations
  1. Download VGG Pretrained Model from here, place it under this directory:
$S3FD_ROOT/weights
  1. Train the model using WIDER FACE(You should modify below file depend on your setting):
cd $S3FD_ROOT/
./train_s3fd.sh

Evaluation(WIDER Face)

  1. Evaluate the trained model using:(You should modify below file depend on your setting)
./test_s3fd.sh
  1. If you can use Matlab, downloading official eval tools to evaluate the performance. If you use Python, clone this repo WiderFace-Evaluation to evaluate the performance.

Performance(FDDB)

  1. Single-Scale : minside is 300 pixels aligned

ROC
PR

Test

  1. Single-Scale : minside is 1080 pixels aligned

festival
office
oscar

References

  • Official release (Caffe)

  • A huge thank you to FaceBoxes ports in PyTorch that have been helpful:

    Note: If you can not download the converted annotations, the provided images and the trained model through the above links, you can download them through BaiduYun.

About

A higher performance PyTorch implementation of S3FD

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.7%
  • Cuda 2.8%
  • Other 0.5%