Skip to content

slava-qw/face-swap-tg-bot

Repository files navigation

Face Swap Telegram Bot

Overview

This is a simple pet project: a Telegram bot that allows users to seamlessly swap faces in their images. There are two types of swapping: using classical computer vision algorithms (like face meshing) based on facial landmarks obtained from the neural network, and the more accurate method using a pretrained model to swap faces from two given photos. Additionally, it can be deployed using Docker.

Features

  • This project uses two types of swapping (all model results can be found either in the original repositories or in the /research/ folder).
  • Telegram integration for easy accessibility.
  • User-friendly commands with inline image processing.

Getting Started

Follow these steps to set up the bot.

Prerequisites

Installation

  1. Clone the repository:
    git clone https://github.com/slava-qw/face-swap-tg-bot.git
    cd face-swap-tg-bot
  2. Write down your Telegram API token in the configuration file (.env). Also, for correct work, get the https-link to set up the webhook (e.g., https://localhost.run/docs/).

Local

  1. Install dependencies:
    pip install -r requirements.txt
  2. Run the code:
    python main.py

Docker

  1. Build a Docker image and run a container:
    docker-compose up

About

Face Swapping Microservice

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages