Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/pascscha/FaceChanger
- Owner: pascscha
- License: gpl-3.0
- Created: 2020-12-28T13:24:32.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-15T10:40:05.000Z (over 1 year ago)
- Last Synced: 2024-08-01T13:25:39.569Z (3 months ago)
- Language: Python
- Homepage:
- Size: 5.98 MB
- Stars: 36
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.