• Stars
    star
    156
  • Rank 239,589 (Top 5 %)
  • Language
    C++
  • License
    Other
  • Created over 7 years ago
  • Updated almost 6 years ago

Reviews

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

Repository Details

A binary library for very fast face detection using compact CNNs.

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
  • 1280x720 video size (HD), scale factor = 1.15, minimal face size = 40
  • Intel Core i5-4690 CPU @ 3.5GHz, single-threading computation
  • Nvidia GeForce GT640M GPU, 384 CUDA cores
  • OpenCV classifier model: haarcascade_frontalface_default.xml

Evaluation

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

Evaluation on FDDB

  • scale factor = 1.05, minimal face size = 15
  • equalize = false, reflection = false

Speed of different implementations

Speed of different implementations

  • 1920x1080 video size (Full HD), scale factor = 1.15, minimal face size = [40, 240]
  • Intel Core i5-4690 CPU @ 3.5GHz, single-threading computation
  • Nvidia GeForce GTX1080Ti GPU, 3584 CUDA cores

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 [email protected].

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