Skip to content

umairrrkhan/Blur-Face

Repository files navigation

Blur Face Project

A Python project that detects faces in an image and applies a blur effect to protect the privacy of individuals.

Table of Contents

Overview

The Blur Face project is a simple Python script that utilizes the OpenCV library to detect faces in an image and applies a blur effect to those faces. This can be useful for privacy protection when sharing images with identifiable individuals. The script uses a pre-trained Haar Cascade Classifier for face detection and applies a median blur to the detected faces.

Installation

  1. Clone this repository to your local machine:

    git clone https://github.com/umairrrkhan/blur-face.git
    cd blur-face
  2. Make sure you have Python and OpenCV installed. You can install OpenCV using pip:

pip install opencv-python

Download the Haar Cascade Classifier for face detection from the OpenCV GitHub repository and save it as

haarcascade_frontalface_default.xml in the project directory.

Usage

Place the image you want to process in the project directory, e.g., input_image.jpg.

Run the blur_face.py script: Replace input_image.jpg with the filename of your input image and output_image.jpg with the desired output filename.

The script will detect faces in the input image and apply a blur effect to them.

The resulting image with blurred faces will be saved as output_image.jpg in the project directory.

Examples

imnput iamge

  1. MESSI IMAGE

output

  1. blurred image

About

Blur Face

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages