OpenCV Face Detection and Privacy

Prepare OpenCV
Create and activate a virtual work environment:
python -m venv .env
source .env/bin/activate
python -m pip install --upgrade pip
Add a file dependencies.txt with all project pip dependencies:
opencv-python
numpy
imutils
Install all dependencies with:
pip install -r dependencies.txt
OpenCV Face Detection
Based on Blur and anonymize faces with OpenCV and Python by Adrian Rosebrock. Detect faces in images and either add a gaussian blur or pixelate them.
Structure
This project uses the res10_300x300_ssd_iter_140000_fp16.caffemodel from @spmallick | Learn OpenCV. Download the model and deploy.prototxt file from Github.
├── blur_face.py
├── blur_face_video.py
├── dependencies.txt
├── face_detector
│ ├── deploy.prototxt