Face detection using FaceBoxes (2017)
, a state-of-the-art method (for 2018) in CPU speed for multi-target facebox detection. (https://arxiv.org/abs/1708.05234)
Methodology
Implementing a great paper by Shifeng Zhang et al. with a face detection model capable of running at 20 FPS on a single CPU core. Perfect for user-interaction control.
- Codebase available at https://github.com/sfzhang15/FaceBoxes
→ 📔 Notebook 01-Faceboxes-Eval-Image.ipynb
→ 📔 Notebook 02-Faceboxes-Refactor.ipynb
Output is masked but movement is captured by the bounding box.
→ 📑 Refactored into face_utils.py
Putting it all together in a control loop, and linking facebox movement with a media asset. The black box on the right shows the webcam output with the detected face outlined.
→ 📑 Run vision.py
$ conda create -n facebox-cv pip jupyter python=3.6
$ conda activate facebox-cv
$ git clone https://github.com/lukexyz/FaceBox-CV.git
$ cd FaceBox-CV
$ pip install -r requirements.txt
Find system specific pytorch
installation from pytorch.org (dev: windows|pip|python|cuda=10.1
)
$ pip install torch===1.4.0 torchvision===0.5.0 -f https://download.pytorch.org/whl/torch_stable.html
Run FaceBox-CV
$ python vision.py
For OSX Only compatible with NVIDIA Gpu's as pytorch will complain you don't have it compiled with CUDA. There are workarounds for macbooks but be aware they might just not work.