Detect faces using an OpenCV lbp cascade classifier.
- OpenCV
- Python
- scikit-image
There are lots of different ways on how to install OpenCV and it's Python module.
The easiest way would be to install it through the unofficial Python package using Pip.
You can also compile OpenCV on your machine yourself, there are many tutorials covering this topic already.
For OSX you can e.g. try out this tutorial.
We use OpenCV's CascadeClassifier class to load a lbp frontal face detector classifier. Having said that, a big thank you to the authors Puttemans Steven, Can Ergun and Toon Goedeme.
Simply run php index.php
, your images with face detection will be saved in /dataset-output/opencv-lbp
.
The PHP script uses by default the python
command line program.
If you want to use another command line program (e.g. python3
),
simply run composer install
and copy the .env.example
file to .env
and customize the command line program.