Skip to content

Select a portrait, click to move the head around (please use your own space / GPU!)

License

Notifications You must be signed in to change notification settings

justinjohn0306/FacePoke

 
 

Repository files navigation

title emoji colorFrom colorTo sdk pinned license header app_file app_port
FacePoke
💬
yellow
red
docker
true
mit
mini
app.py
8080

FacePoke

Table of Contents

Introduction

A real-time head transformation app.

For best performance please run the app from your own machine (local or in the cloud).

Repository: GitHub - jbilcke-hf/FacePoke

You can try the demo but it is a shared space, latency may be high if there are multiple users or if you live far from the datacenter hosting the Hugging Face Space.

Live Demo: FacePoke on Hugging Face Spaces

Acknowledgements

This project is based on LivePortrait: https://arxiv.org/abs/2407.03168

It uses the face transformation routines from https://github.com/PowerHouseMan/ComfyUI-AdvancedLivePortrait

Installation

Local Setup

  1. Clone the repository:

    git clone https://github.com/jbilcke-hf/FacePoke.git
    cd FacePoke
  2. Install Python dependencies:

    pip install -r requirements.txt
  3. Install frontend dependencies:

    cd client
    bun install
  4. Build the frontend:

    bun build ./src/index.tsx --outdir ../public/
  5. Start the backend server:

    python app.py
  6. Open http://localhost:8080 in your web browser.

Docker Deployment

  1. Build the Docker image:

    docker build -t facepoke .
  2. Run the container:

    docker run -p 8080:8080 facepoke
  3. To deploy to Hugging Face Spaces:

    • Fork the repository on GitHub.
    • Create a new Space on Hugging Face.
    • Connect your GitHub repository to the Space.
    • Configure the Space to use the Docker runtime.

Development

The project structure is organized as follows:

  • app.py: Main backend server handling WebSocket connections.
  • engine.py: Core logic.
  • loader.py: Initializes and loads AI models.
  • client/: Frontend React application.
    • src/: TypeScript source files.
    • public/: Static assets and built files.

Contributing

Contributions to FacePoke are welcome! Please read our Contributing Guidelines for details on how to submit pull requests, report issues, or request features.

License

FacePoke is released under the MIT License. See the LICENSE file for details.

Please note that while the code of LivePortrait and Insightface are open-source with "no limitation for both academic and commercial usage", the model weights trained from Insightface data are available for [https://github.com/deepinsight/insightface?tab=readme-ov-file#license](non-commercial research purposes only).


Developed with ❤️ by Julian Bilcke at Hugging Face

About

Select a portrait, click to move the head around (please use your own space / GPU!)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 81.0%
  • Python 13.2%
  • TypeScript 5.6%
  • CSS 0.1%
  • Dockerfile 0.1%
  • HTML 0.0%