GithubHelp home page GithubHelp logo

zyg11 / dan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hikapok/dan

0.0 1.0 0.0 73.11 MB

Single Shot Faces Detectors in TensorFlow

License: Apache License 2.0

CMake 0.67% C++ 15.61% Cuda 6.72% Python 76.89% C 0.12%

dan's Introduction

Single Shot Faces Detectors in TensorFlow

This repository contains the un-official reimplementation of several single shot faces detectors in TensorFlow.

Usage

  • Download WIDER Face Dataset and reorganize the directory as follows:

     WIDER Face Dataset/
        |->WIDER_train/
        |    |->images/
        |    |->...
        |->WIDER_val/
        |    |->images/
        |    |->...
        |->WIDER_test/
        |    |->images/
        |    |->...
        |->wider_face_split/
        |    |->wider_face_train.mat
        |    |->...
     '''
     WIDER_ROOT is your path of the WIDER Face Dataset.
    
  • Run the following script to generate TFRecords.

     python dataset/convert_tfrecords.py --dataset_directory=WIDER_ROOT --output_directory=./dataset/tfrecords
  • Download the pre-trained VGG-16 model (reduced-fc) from here and put them into one sub-directory named 'model' (we support SaverDef.V2 by default, the V1 version is also available for sake of compatibility).

  • Compile custom operations, run following command in directory 'cpp/Deform' and 'cpp/ExtraLib':

     mkdir build
     cd build && cmake ..
     make
  • Run the following script to start training:

     python train_dan.py (or python train_pb.py for PyramidBox, or python train_sfd.py for S³FD)
  • Run the following script to get detection results in *.txt (modify the WIDER_ROOT in 'data_dir' firstly):

     python eval_dan.py (or python eval_pb.py for PyramidBox, or python eval_sfd.py for S³FD)
  • Run the official MATLAB script for evaluation

All the codes was tested under TensorFlow 1.8, Python 3.5, Ubuntu 16.04 with CUDA 8.0. You need at least two decent GPUs for training by yourself.

Framework

The whole framework:

Low-level FPN:

Context module V2:

Context module V1:

Results

Reproduced results are list as follows:

Algorithm Easy Medium Hard
S³FD 0.933 0.923 0.848
PyramidBox 0.955 0.946 0.888
DAN 0.958 0.946 0.895
DAN-Deform 0.957 0.947 0.897

The performance of PyramidBox could be further improved by using transposed convolution in LFPN and tuning the weight of losses. While the training peroid is too long to perform more experiments.

Easy:

Medium:

Hard:

You can download the trained model of DAN from GoogleDrive.

Discussion

Welcome to join in QQ Group(758790869) for more discussion

Apache License, Version 2.0

dan's People

Contributors

hikapok avatar

Watchers

paper2code - bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.