pico-detect

Crates.iopico-detect
lib.rspico-detect
version0.5.0
sourcesrc
created_at2020-08-25 08:45:51.643867
updated_at2024-05-14 13:22:51.883191
descriptionPixel Intensity Comparison-based Object (PICO) detection library.
homepage
repositoryhttps://github.com/rostyq/pico-detect
max_upload_size
id280451
size120,091
Rostyslav Bohomaz (rostyq)

documentation

README

crates-badge docs-badge license-badge

pico-detect

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

Example

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 detect-faces -- --models-dir models -i "assets/test.png" --score 35.0 -o result.png

Output image result.png should be like this:

visualization example

Models

Each algorithm requires to be loaded with correspondent binary model.

model algorithm source Description
face.detector.bin Detector pico Human face classifier
pupil.localizer.bin Localizer puploc Human eye pupil localizer
face-5.shaper.bin Shaper shape_predictor_5_face_landmarks Human 5 face landmarks

References

  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

Commit count: 96

cargo fmt