Skip to content

LucasJSch/face_blurring

Repository files navigation

Face Blurring Application

Screenshot from 2025-08-20 13-24-04

A web application that automatically detects and blurs faces in images and videos using OpenCV.

Features

  • Face Detection: Automatically detects faces using multiple OpenCV models:
    • Haar Cascade (Default) - Standard frontal face detection
    • Haar Cascade (Alternative) - Alternative frontal face classifier
    • Haar Cascade (Alternative 2) - Second alternative classifier
    • Haar Cascade (Profile) - Profile face detection
  • Multiple Effects: Apply blur or pixelation effects to detected faces
  • Configurable Parameters:
    • Adjustable blur strength (5-99)
    • Configurable pixelation size (5-50)
  • Multi-format Support: Works with images (JPG, PNG, GIF) and videos (MP4, AVI, MOV)
  • Simple Web Interface: Easy-to-use interface with model selection and parameter controls
  • Dockerized: Ready to run with Docker

Quick Start

Using Docker (Recommended)

  1. Build the Docker image:
docker build -t face-blurring-app .
  1. Run the container:
docker run -p 5000:5000 face-blurring-app
  1. Open your browser and go to http://localhost:5000

Local Development

  1. Install dependencies:
pip install -r requirements.txt
  1. Run the application:
python app.py
  1. Open your browser and go to http://localhost:5000

Usage

  1. Open the application in your web browser
  2. Choose an image or video file (drag and drop or click to browse)
  3. Select the face detection model from the dropdown
  4. Adjust blur strength and pixel size using the sliders
  5. Select the effect (Blur or Pixelate)
  6. Click "Process File" to upload and process
  7. View the results and download the processed file

Supported Formats

  • Images: JPG, JPEG, PNG, GIF
  • Videos: MP4, AVI, MOV

Technical Details

  • Backend: Python Flask
  • Face Detection: OpenCV with multiple Haar Cascade classifiers
  • Frontend: HTML, CSS, JavaScript with responsive design
  • Container: Docker with Python 3.9 slim base image
  • Configuration: Real-time parameter adjustment with sliders

About

App to automatially blur faces in video sequences.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published