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.
- 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.
To get started with Face Swapper, follow these steps:
Ensure you have the following installed:
- Python 3.6 or higher
- pip (Python package installer)
- Git
-
Clone the repository:
git clone https://github.com/MaxMassi/Face-Swapper.git
-
Navigate to the project directory:
cd Face-Swapper
-
Install the required packages:
pip install -r requirements.txt
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.
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
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.
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.
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.
Contributions are welcome! If you have suggestions for improvements or new features, please fork the repository and submit a pull request.
- Fork the repository.
- Create a new branch for your feature or fix.
- Make your changes.
- Commit your changes with a clear message.
- Push to your forked repository.
- Create a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- Insightface: For providing the Inswapper model.
- OpenCV: For the powerful computer vision capabilities.
- Contributors: Thanks to everyone who has contributed to this project.
For any questions or feedback, feel free to reach out:
- GitHub: MaxMassi
- Email: your_email@example.com
Visit the Releases section for the latest updates and downloads.