SkillAgentSearch skills...

CompactCNNCascade

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

Install / Use

/learn @Bkmz21/CompactCNNCascade

README

Compact Convolutional Neural Network Cascade

This is a binary library for very fast detection of simple objects in images using CPU or GPU.<br> 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.<br> You need a processor with AVX or AVX2 (1.6x speed up due to used INT16) instruction set support.<br> Supported Nvidia GPUs with compute capability 3.0 and higher (library builded with CUDA 8.0).<br>

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.<br>

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).<br>

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

Contact

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

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

Related Skills

View on GitHub
GitHub Stars155
CategoryDevelopment
Updated4d ago
Forks49

Languages

C++

Security Score

85/100

Audited on Mar 30, 2026

No findings