Giter VIP home page Giter VIP logo

face-anonymizer's Introduction

๐Ÿง‘ FACANO

Using mediapipe for face detection and anonymizing faces using basic opencv blur.

Overview

FACANO is capable of detecting and anonymizing faces in three different modes i.e., static images, videos, and live webcam feed. It can detect and anonymize multiple faces at once.

Hyperparameters

Model selection can be set to 1 for images where the subject is 5 meters away from the camera and 0 for images where the subject is 2 meters away. Increasing the minimum detection confidence will lead to more accurate detection but 50% is default.

with mp_face_detection.FaceDetection(model_selection = 0, min_detection_confidence = 0.5) as face_detection:

Result

Given below is an anonymized image that was blurred using a kernel size of 70.

Here is another result with a kernel size of 90 and 120.

The images used here were taken from unsplash.com and the video was taken from pexels.com.

How to get started?

Open the terminal on your mac and type

mkdir FACANO

Then switch to the new directory using

cd FACANO

Now clone the repository on your local machine using

git clone https://github.com/kotiyalanurag/FACANO.git

Now create a virtual environment using (assuming you have python installed on your machine)

python -m venv env

Switch to your new virtual environment using

source env/bin/activate

Now install the requirements for this project using

pip install -r requirements.txt

How to run using CLI?

Use the following script to run this program using a command line interface.

python3 main.py -m [MODE] -n [FILENAME] -e [FILEEXTENSION] -k [KERNELSIZE]

Acceptable modes are image, video, and webcam with .jpg or .mp4 file extensions.

Have fun playing around with the code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.