Skip to content

Generate a diverse dataset of 100 face-swapped images using the Inswapper model for training robust face-swap detection classifiers. ๐Ÿ–ผ๏ธ๐Ÿ”

Notifications You must be signed in to change notification settings

MaxMassi/Face-Swapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Face Swapper: Automate Face-Swap Dataset Creation ๐Ÿค–โœจ

Face Swapper

Overview

Face Swapper is a Python project designed to automate the creation of 100 curated face-swaps. This project strategically selects faces across four categories: similar, dissimilar, random, and processed. The goal is to build a diverse dataset that can train powerful face-swap detection models.

Utilizing the insightface library's Inswapper model, Face Swapper provides a straightforward way to generate and manage your face-swap datasets efficiently.

Features

  • Automated Face-Swapping: Easily create face-swaps without manual effort.
  • Curated Selection: Generate face-swaps from four distinct categories.
  • Diverse Dataset: Build a dataset that enhances model training for face-swap detection.
  • Insightface Integration: Leverage the advanced capabilities of the Inswapper model.
  • Easy to Use: Simple setup and execution process.

Getting Started

To get started with Face Swapper, follow these steps:

Prerequisites

Ensure you have the following installed:

  • Python 3.6 or higher
  • pip (Python package installer)
  • Git

Installation

  1. Clone the repository:

    git clone https://github.com/MaxMassi/Face-Swapper.git
  2. Navigate to the project directory:

    cd Face-Swapper
  3. Install the required packages:

    pip install -r requirements.txt

Download and Execute

You can download the latest release from the Releases section. Look for the appropriate file, download it, and execute it according to the instructions provided in the release notes.

Face Swapper

Usage

To create face-swaps, run the following command in your terminal:

python face_swapper.py --category <category_name>

Replace <category_name> with one of the following:

  • similar
  • dissimilar
  • random
  • processed

Example

For example, to create face-swaps from the "similar" category, use:

python face_swapper.py --category similar

This command will generate face-swaps based on the selected category and save them to the output directory.

Project Structure

The repository contains the following key files and directories:

  • face_swapper.py: The main script for generating face-swaps.
  • requirements.txt: Lists all the dependencies needed for the project.
  • data/: Directory for input images and generated face-swaps.
  • models/: Contains pre-trained models and configurations.
  • README.md: This documentation file.

Topics Covered

This project intersects several important fields:

  • Biometrics: Understanding facial recognition and identity verification.
  • Computer Vision: Utilizing algorithms to interpret and process visual data.
  • Cybersecurity: Addressing the challenges posed by face-swapping technologies.
  • Dataset Generation: Creating diverse datasets for training machine learning models.
  • Face-Swapping: Techniques for swapping faces in images.
  • Insightface: A library that provides tools for face recognition and analysis.
  • ONNX: Open Neural Network Exchange format for model interoperability.
  • ONNX Runtime: A high-performance inference engine for ONNX models.
  • OpenCV: A library for computer vision tasks.
  • Python: The programming language used for this project.

Contributing

Contributions are welcome! If you have suggestions for improvements or new features, please fork the repository and submit a pull request.

Steps to Contribute

  1. Fork the repository.
  2. Create a new branch for your feature or fix.
  3. Make your changes.
  4. Commit your changes with a clear message.
  5. Push to your forked repository.
  6. Create a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

  • Insightface: For providing the Inswapper model.
  • OpenCV: For the powerful computer vision capabilities.
  • Contributors: Thanks to everyone who has contributed to this project.

Contact

For any questions or feedback, feel free to reach out:

Visit the Releases section for the latest updates and downloads.

About

Generate a diverse dataset of 100 face-swapped images using the Inswapper model for training robust face-swap detection classifiers. ๐Ÿ–ผ๏ธ๐Ÿ”

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages