thegreatfaizan / Face-Anonymization-from-YouTube-Videos

This project leverages the power of pafy, OpenCV, and other technologies to recognize the faces of Imran Khan in YouTube videos and automatically blur them. The code and resources provided in this repository allow anyone to reproduce the results and further develop the project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Face-Anonymization-from-YouTube-Videos

This repository contains code and resources for a project that implements face anonymization in YouTube videos. The project uses libraries such as face_recognition, pafy, youtube-dl and opencv to detect the face of Imran Khan and blur it in the video.

Directory Structure

The repository has the following directory structure:

  • dataset/: This directory contains the image file imran_khan.jpg used to detect the face of Imran Khan and a video file video.mp4 that is used as input.
  • Face_Blurring_from_YouTube_Videos.ipynb: This is a Jupyter Notebook file containing the code that downloads the video from YouTube, detects the face of Imran Khan and blurs it in the video. The output video is saved as output.mp4.

Requirements

The following packages must be installed to run the code:

face_recognition

pafy

youtube-dl==2020.12.2

opencv

Usage

  1. Clone the repository:

git clone https://github.com//Face-Anonymization-from-YouTube-Videos.git

  1. Navigate to the repository directory:

cd Face-Anonymization-from-YouTube-Videos

  1. Open the Jupyter Notebook file "Face Blurring from YouTube.ipynb" and run the code to generate the output video.

  2. The output video will be saved in the root directory of the repository as "output.mp4".

About

This project leverages the power of pafy, OpenCV, and other technologies to recognize the faces of Imran Khan in YouTube videos and automatically blur them. The code and resources provided in this repository allow anyone to reproduce the results and further develop the project.


Languages

Language:Jupyter Notebook 100.0%