Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pascscha/FaceChanger

Warp faces similar to some Snapchat filters or face swaps. Eyes, eyebrows, nose and mouth can all be moved and scaled interactively. The script can process the changes in real-time and works off images, videos or a live video stream from the webcam.
https://github.com/pascscha/FaceChanger

Last synced: 8 days ago
JSON representation

Warp faces similar to some Snapchat filters or face swaps. Eyes, eyebrows, nose and mouth can all be moved and scaled interactively. The script can process the changes in real-time and works off images, videos or a live video stream from the webcam.

Awesome Lists containing this project

README

        

# FaceChanger
Simple script that can warp faces similar to some snapchat filters or face swaps. eyes, eyebrows, nose and mouth can all be moved and scaled interactively. The script can process the changes in real-time and works off images, videos or a live video stream from the webcam.

## Demo
![Demo](media/stock-example.gif)

This is a demo on a stock video from [pexels.com](https://www.pexels.com/video/man-in-white-long-sleeves-sitting-while-happily-looking-at-the-camera-5989765/), see the usage chapter below to see how to achieve this yourself.

## Usage
Clone this repo, then run the `main.py` script within the root folder of the cloned repository. When running the script, the different facial features can be moved with the left mouse button and scaled with the right mouse button. You can use `./main.py -h` to get an overview of the available command line options. Here are some examples:
- `./main.py`
- Run the program on the live feed from your webcam
- `./main.py -i media/stock.mp4 -l -o out.mp4`
- `-i`: Use the example stock video provided in this repository
- `-l`: Loop the video
- `-o`: Save the resulting video into the file out.mp4
- `./main.py -f filters/long-nose.json -s filters/my-custom-filter.json`
- `-f`: Use the preset filter long-nose
- `-s`: Save the interactive changes to the filter in a new file.