Skip to content

Pranav-Nagpure/Face-Swapping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Face Swapping

Built Using

Python html-css-js Flask OpenCV Dlib

About

This Web Application swaps faces in two images using Delaunay Triangulation and Affine Transformation.

Sample Images:

Pretrained Dlib Predictor: https://github.com/tzutalin/dlib-android/raw/master/data/shape_predictor_68_face_landmarks.dat

See the implementation details with IPython Notebook

Getting Started

This Project is Built With Anaconda VSCode Render

Installation

To use the app on local machine, open Anaconda Prompt and run the following commands:

  1. Clone the Repository
git clone https://github.com/Pranav-Nagpure/Face-Swapping.git
  1. Change Working Directory
cd Face-Swapping
  1. If needed create a Virtual Environment and activate it
conda create -n environment_name python=3.10
conda activate environment_name
  1. Install the requirements
conda install -c conda-forge dlib
python -m pip install -r requirements.txt
  1. Run the App
python app.py
  1. Open the URL generated in a browser to use the App

  2. You can use images in the sample_images folder

(back to top)