A fun project that lets you replace the face in a meme with another face using Python and Gradio.
Download and save the model weights (config.json, model.safetensors, preprocessor_config.json) in the face parsing
directory.
Try out here: https://huggingface.co/spaces/Sartc/chillGuy_maker. As of now, you'll have to adjust the face_x, face_y, face_width and face_height parameters to get the desired results, but I'll try to automate them too in future.
- Replace faces in the chill guy meme with a custom face.
- Control the face's position, size, and orientation (optional flip). I will also try to automate this thing so that we can get final output without any intervention.
- Clone this repository:
git clone https://github.com/sartq333/chill-guy-maker.git cd chill-guy-maker
- Install the dependencies:
pip install -r requirements.txt
- Launch the Gradio app:
python3 app.py
Segmentation model used in this project has been taken from here: https://huggingface.co/jonathandinu/face-parsing.
Built with Gradio, PyTorch and OpenCV.
Inspired by dingboard.