Home

Awesome

Face-MagNet: Magnifying Feature Maps to Detect Small Faces

By Pouya Samangouei*, Mahyar Najibi*, Larry Davis, Rama Chellappa

* contributed equally.

The paper can be found here.

This Python implementation is based on Faster-RCNN.

License

Face-MagNet is released under the Apache 2 License (refer to the LICENSE file for details).

Citing Face-MagNet

@inproceedings{wacv18facemagnet,
    Author = {Pouya Samangouei and Mahyar Najibi and Larry Davis and Rama Chellappa},
    Title = {Face-MagNet: Magnifying Feature Maps to Detect Small Faces},
    Booktitle = {IEEE Winter Conf. on Applications of Computer Vision ({WACV})},
    Year = {2018}
}

Installation

cd <project-parent-dir>
git clone --recursive https://github.com/po0ya/face-magnet
FM_ROOT=`pwd`/face-magnet

Train a model:

./experiments/scripts/train_min800.sh <model-name> <gpu-ids>

For example, for facemagnet run:

./experiments/scripts/train_min800.sh facemagnet 0,1

To train Face-MagNet on two GPUs.

For single GPU training please use ./tools/train_net.py.

 python ./tools/train_net.py --gpu <gpu-id> \
  --solver models/wider/VGG16/solvers/<model-name>.prototxt \
  --weights data/imagenet_models/VGG16.v2.caffemodel \
  --imdb wider_train \
  --iters 76000 \
  --cfg experiments/cfgs/min800.yml \
  ${EXTRA_ARGS}

Single image detection

To detect faces on a single image with a trained model:

./experiments/scripts/test_single.sh <model-name> <image-path> <args>

For example to detect the faces in images of data/demo:

./experiments/scripts/test_single.sh facemagnet data/demo/demo0.jpg --pyramid

Reproducing the results

Notes

TODOs: