#pico #detection #localization #prediction


Pixel Intensity Comparison-based Object (PICO) detection library

6 releases (breaking)

0.4.1 Sep 11, 2021
0.4.0 Nov 5, 2020
0.3.0 Sep 16, 2020
0.2.0 Sep 3, 2020
0.0.1 Aug 25, 2020

#369 in WebAssembly

28 downloads per month

MIT license


crates-badge docs-badge license-badge


This library is a reimplementation of Pixel Intensity Comparison-based Object (PICO) detection algorithms in Rust:

  • Detector: Cascade of binary classifiers from pico;
  • Localizer: Localization with an ensemble of randomized trees from picojs (see lploc.js);
  • Shaper: Alignment with an ensemble of regression trees from dlib (see shape_predictor).


To run CLI example, which takes an image, finds all faces, detects some landmarks and pupils:

NOTE: Git LFS is needed to resolve binary files with git clone.

If you don't want to use Git LFS you can download models (and test image) direct from this repo (see model column in the table below) and put them under models/ directory.

cargo run --release --example cli -- --input "tests/assets/Lenna_(test_image).png" --output result.png

Output image result.png should be like this:

visualization example


Each algorithm requires to be loaded with correspondent binary model.

model algorithm source Description
facefinder Detector pico Human face classifier
puploc Localizer puploc source Human eye pupil localizer
shaper_5_face_landmarks Shaper shape_predictor_5_face_landmarks Human 5 face landmarks


  1. N. Markus, M. Frljak, I. S. Pandzic, J. Ahlberg and R. Forchheimer, "Object Detection with Pixel Intensity Comparisons Organized in Decision Trees"

  2. Eye pupil localization with an ensemble of randomized trees

  3. One Millisecond Face Alignment with an Ensemble of Regression Trees


~172K SLoC