face_recognition/README.md

38 lines
1.5 KiB
Markdown
Raw Normal View History

A `mirror` which shows which faces are detected through three different facial detection algorithms:
* OpenCV's deep neural net [face detector](https://github.com/opencv/opencv/tree/master/samples/dnn/face_detector).
* Dlib's default frontal face detector, which is HOG based
* A Viola-Jones Haarcascade detection. Any OpenCV compatible xml file should work. It defaults to the canonical `haarcascade_frontalface_alt2.xml`.
# Installation
## on windows
The installation in Windows can be done, though it is quite elaborate:
* Install python3
2020-10-02 16:52:34 +02:00
* Install VS C++
* Install Cmake (needed for python dlib)
+ make sure to add it to path
* Install git
+ including ssh deploy key
* `git clone https://git.rubenvandeven.com/r/face_detector`
* `cd face_recognition`
* `pip install virtualenv`
* `virtualenv.exe venv`
* `.\venv\Scripts\activate`
* `cd .\dnn\face_detector`
* `python.exe .\download_weights.py`
* `cd .\visualhaar`
2020-10-02 16:52:34 +02:00
* Either one of:
+ Compile rust library
* Install rustup-init
* `git submodules init`
* `git submodules update`
* `cargo build --lib --release`
+ Download dll from https://git.rubenvandeven.com/r/visualhaar/releases
2020-10-12 15:59:25 +02:00
+ Make the installer:
* `& 'C:\Users\DP Medialab\AppData\Roaming\Python\Python38\Scripts\pyinstaller.exe' .\mirror.py --add-binary '.\visualhaar\target\release\visual_haarcascades_lib.dll;.' --add-data '.\haarcascade_frontalface_alt2.xml;.' --add-data '.\SourceSansPro-Regular.ttf;.' --add-data 'dnn;dnn'`
* `mv '.\dist\mirror\mpl-data' '.\dist\mirror\matplotlib\'`