Geronymos / Koh

Replace your appearance with that of thousands of people πŸ‘€πŸ€³ πŸ”ƒ πŸ‘₯πŸ‘₯

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Koh 🎭 (aka "AI has many faces")

Virtual camera that displays closest face match from a data set

About

You want to show your emotions on the internet but don't want to leak your identity? You want to see that you are just one of thousands of people? You want to express yourself with people from your favorite TV-episode? Koh (aka "AI has many faces") can help you with this!

Koh analyses your face features from your webcam and shows the closest matching face from a given dataset. This creates an interesting effect, which you can show of as a virtual camera in your next video conference or live-stream.

Features

  • record webcam πŸ‘€πŸ€³
  • track face point
  • train on face dataset πŸ’ͺ
  • get closest face match from dataset βš–
  • use csv-files for better mixing datasets πŸ₯—
  • only match certain face features πŸ—œ
  • use match as virtual camera πŸ“·

Installation

Look at mediapipe/getting_startet

❕ Make a virtual environment (optional)

python3 -m venv mp_env && source mp_env/bin/activate

Install dependencies

pip3 install -r requirements.txt

Train

Download a face data set and save it in a folder in this directory.

If you want to use a video make an image sequence out of it. Either use your video-editor of your choice (Blender) or use this ffmpeg command:

ffmpeg -i "[video file]" dataset/[name]/image%04d.jpg

Input the relative path in the train.py script

./train.py [path/to/your/dataset]

Usage

After you trained with your data set a file namend after the path should appear [path_to_your_dataset].csv.

Input the relative path of that file into the main.py

./main.py [path_to_your_dataset].csv

If everthing went good two windows should appear. One shows your webcam with the wireframe of your face. The other window shows the matched face from your dataset.

Technologie

Inspiration

Authors

License

This project is licensed under the GPT-3 License - see the LICENSE file for details

About

Replace your appearance with that of thousands of people πŸ‘€πŸ€³ πŸ”ƒ πŸ‘₯πŸ‘₯

License:GNU General Public License v3.0


Languages

Language:Python 98.0%Language:Shell 2.0%