Bkmz21 / CompactCNNCascade

A binary library for very fast face detection using compact CNNs.
Other
156 stars 50 forks source link
cascade-classifier convolutional-neural-networks cuda face-detection object-detection opencl simd

## Compact Convolutional Neural Network Cascade ##

This is a binary library for very fast detection of simple objects in images using CPU or GPU.
Implemented of the algorithm described in the following paper:

I.A. Kalinovskiy, V.G. Spitsyn,
Compact Convolutional Neural Network Cascade for Face Detection,
http://arxiv.org/abs/1508.01292

If you use the provided binaries for your work, please cite this paper.

examples/main.cpp shows how to use the library.
You need a processor with AVX or AVX2 (1.6x speed up due to used INT16) instruction set support.
Supported Nvidia GPUs with compute capability 3.0 and higher (library builded with CUDA 8.0).

Examples This image has a resolution of 4800x2400 was processed for 400 ms on GT640M GPU at searches minimum face of size 20x20 pixels. This detector capable of processing 4K video stream in real time.

Speed comparison

Method FPS
OpenCV 3.2 2.7
Simd library 12.1
CompactCNN-AVX (CPU) 32.2
CompactCNN-AVX2 (CPU) 53.5
CompactCNN-AVX (GPU) 81.3

Evaluation

FDDB: http://vis-www.cs.umass.edu/fddb/index.html

Evaluation on FDDB

Speed of different implementations

Speed of different implementations

Also you can quick get (0.1 ms per face) a facial attributes estimate (gender, glasses and smile).

You can trainig own cascade using Microsoft Cognitive Toolkit (recommended version 1.7.2).
You should not change model prototype (see cntk folder). Other CNN architectures are currently not supported.

Contact

For any additional information contact me at kua_21@mail.ru.

Copyright (c) 2018, Ilya Kalinovskiy.
All rights reserved.