# deepfakes/faceswap

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/deepfakes-faceswap).**

55,289 stars · 13,365 forks · Python · GPL-3.0

## Links

- GitHub: https://github.com/deepfakes/faceswap
- Homepage: https://www.faceswap.dev
- awesome-repositories: https://awesome-repositories.com/repository/deepfakes-faceswap.md

## Topics

`deep-face-swap` `deep-learning` `deep-neural-networks` `deepface` `deepfakes` `deeplearning` `face-swap` `faceswap` `fakeapp` `machine-learning` `myfakeapp` `neural-nets` `neural-networks` `openfaceswap`

## Description

Faceswap is a comprehensive framework for automated media manipulation and neural face synthesis. It provides a modular pipeline that manages the entire lifecycle of facial feature extraction, deep learning model training, and image conversion. By coordinating complex computer vision workflows, the system enables users to map facial identities between source and destination datasets while maintaining structural alignment and lighting consistency across video frames.

The project distinguishes itself through a highly extensible plugin-based architecture that handles hardware-accelerated processing and multi-stage image post-processing. It includes specialized tools for manual alignment verification, allowing users to refine detected facial data through a graphical interface to ensure high-quality results. The system also features robust batch-oriented data processing, which partitions media into standardized chunks to optimize memory usage and throughput during intensive neural network operations.

Beyond its core synthesis capabilities, the framework covers a broad range of computer vision tasks including facial landmark detection, pose estimation, and mask generation. It integrates sophisticated model management utilities, such as automated loss calculation, gradient clipping, and snapshot recovery, to ensure stable training sessions. The system also provides extensive diagnostic tools for hardware performance monitoring and environment validation, ensuring compatibility across various compute accelerators.

The software is managed through a centralized command-line and graphical toolkit that supports persistent configuration and session state management. It is designed to run on diverse hardware configurations by dynamically querying available compute resources and routing tensor operations to the optimal processor.

## Tags

### Graphics & Multimedia

- [Automated Face Swapping](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/media-manipulation/automated-face-swapping.md) — Implements automated techniques to replace facial features in video media while maintaining structural and lighting alignment.
- [Face Swapping Engines](https://awesome-repositories.com/f/graphics-multimedia/media-production-suites/graphics-media-assets/generative-media/face-swapping-engines.md) — Executes neural face synthesis and maps facial features between source and target media through specialized core modules. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/convert.html))
- [Automated](https://awesome-repositories.com/f/graphics-multimedia/media-production-suites/media-management-production/media-processing-suites/automated.md) — Streamlines the extraction, alignment, and reconstruction of video frames via command-line and graphical interfaces.
- [Video File Processors](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/media-manipulation/media-processing/video-analysis-processing/video-file-processors.md) — Automates the extraction of video frames, metadata retrieval, and the reconstruction of video files. ([source](https://faceswap.readthedocs.io/en/latest/full/tools/ffmpeg.html))
- [Face Mask Blenders](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/face-portrait-manipulation/face-masking-tools/face-mask-blenders.md) — Softens mask boundaries to ensure seamless visual integration between swapped faces and original source imagery. ([source](https://faceswap.readthedocs.io/en/latest/full/plugins/convert.html))
- [Face Mask Generation](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/face-portrait-manipulation/image-masking/face-mask-generation.md) — Generates single-channel masks from facial landmark points or applies filters to existing masks for refined image processing. ([source](https://faceswap.readthedocs.io/en/latest/full/plugins/extract.html))
- [Real-time Media Previews](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/real-time-media-previews.md) — Previews conversion settings in real-time using a graphical interface before committing to full processing tasks. ([source](https://faceswap.readthedocs.io/en/latest/full/tools/preview.html))
- [Image Sorting Utilities](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/media-manipulation/image-sorting-utilities.md) — Categorizes collections of face images based on visual attributes like blur levels or orientation through batch processing. ([source](https://faceswap.readthedocs.io/en/latest/full/tools/sort.html))
- [Media Alignment Managers](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/media-manipulation/media-processing/media-alignment-managers.md) — Prepares media sources by aligning facial data and loading video or image inputs for downstream processing. ([source](https://faceswap.readthedocs.io/en/latest/full/scripts.html))
- [Face Metadata Loaders](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/media-manipulation/face-metadata-loaders.md) — Retrieves aligned face images and their associated metadata from disk storage for use in processing workflows. ([source](https://faceswap.readthedocs.io/en/latest/full/tools/sort.html))
- [Video Muxing](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/media-manipulation/media-processing/codec-encoding-utilities/video-muxing.md) — Combines processed video streams and audio tracks into final files using configurable codec settings. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/video.html))

### Artificial Intelligence & ML

- [Face Data Extraction](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-systems/computer-vision/facial-analysis-systems/face-data-extraction.md) — Isolates and aligns facial data from source media for use in downstream training pipelines. ([source](https://faceswap.readthedocs.io/en/latest/full/scripts.html))
- [Face Detection](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-systems/computer-vision/facial-analysis-systems/face-detection.md) — Identifies and locates faces within image frames using rotation and scaling detection models. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/infer.html))
- [Face Tracking](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-systems/computer-vision/facial-analysis-systems/face-tracking.md) — Tracks and organizes spatial coordinates, facial landmarks, and identity embeddings across visual data. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/align.html))
- [Face Frame Converters](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-systems/face-swapping/face-frame-converters.md) — Applies trained neural models to swap facial features across individual video frames. ([source](https://faceswap.readthedocs.io/en/latest/full/scripts.html))
- [Face Swap Plugins](https://awesome-repositories.com/f/artificial-intelligence-ml/deep-learning-training-pipelines/face-swap-plugins.md) — Bundles modular components for face extraction, model training, and image conversion to facilitate custom processing workflows. ([source](https://faceswap.readthedocs.io/en/latest/full/plugins/plugins.html))
- [Generative Media Models](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/architectures/generative-media-models.md) — Synthesizes facial transformations between different identities using generative machine learning models.
- [Loss Functions](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/architectures/neural-network-components/loss-functions.md) — Optimizes neural network performance during training using configurable loss functions and scalar management. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/training.html))
- [Model Training Engines](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/frameworks/training-systems/model-training-engines.md) — Trains neural networks to learn and map complex facial identity representations from large image datasets.
- [Media Processing Pipelines](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/domain-specific-processing-pipelines/media-processing-pipelines.md) — Coordinates automated workflows for ingesting, processing, and transforming video media for facial synthesis applications.
- [Face Swapping Models](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/machine-learning-training/face-swapping-models.md) — Refines specialized models for facial replacement tasks using optimized training pipelines. ([source](https://faceswap.readthedocs.io/en/latest/full/scripts.html))
- [Training Loop Managers](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/machine-learning-training/pipelines-and-orchestration/training-orchestration-systems/training-loop-managers.md) — Manages training loops automatically, including batch processing, model checkpointing, and the generation of progress previews. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/training.html))
- [Vision Pipeline Orchestrators](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-systems/computer-vision/development-orchestration-tools/vision-pipeline-orchestrators.md) — Orchestrates complex computer vision workflows by managing data ingestion, hardware-accelerated processing, and multi-stage image manipulation.
- [Face Masking Plugins](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-systems/computer-vision/facial-analysis-systems/face-masking-plugins.md) — Enforces boundary constraints on facial patches to ensure masks remain accurately positioned during image processing. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/infer.html))
- [Facial Analysis Tools](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-systems/computer-vision/facial-analysis-systems/facial-analysis-tools.md) — Detects facial landmarks, estimates head orientation, and produces masks through specialized computer vision algorithms.
- [Face Pose Estimators](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-systems/face-analysis/face-pose-estimators.md) — Derives 3D spatial head orientation by projecting 2D facial landmarks into a calculated rotation vector. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/align.html))
- [Face Re-extraction Tools](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/frameworks/computer-vision/computer-vision-pipelines/face-re-extraction-tools.md) — Reconstructs facial imagery from source frames by reapplying alignment metadata and refined transformation parameters. ([source](https://faceswap.readthedocs.io/en/latest/full/tools/alignments.html))
- [Data Augmentation](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/data-ingestion-preparation/data-augmentation.md) — Expands training datasets by applying geometric warps, color adjustments, and transformations to improve model generalization. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/training.html))
- [Dataset Loaders](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/data-ingestion-preparation/dataset-loaders.md) — Facilitates the retrieval and ingestion of training datasets while supporting multi-input models and visual selection. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/training.html))
- [Model Management](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-management.md) — Preserves training states through periodic backups to ensure progress remains recoverable during extended sessions. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/model.html))
- [Model Compilation](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-optimization-and-inference/serving-and-runtime/inference-optimization-utilities/model-compilation.md) — Converts trained models into inference-ready versions by calculating required layers and configuring swap parameters. ([source](https://faceswap.readthedocs.io/en/latest/full/plugins/train.html))
- [Perceptual Loss](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/architectures/neural-network-components/loss-functions/perceptual-loss.md) — Computes loss based on feature similarity within pretrained layers to align outputs with human visual perception. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/model.html))
- [Face Normalization](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/frameworks/computer-vision/computer-vision-pipelines/face-normalization.md) — Standardizes facial features through automated landmark detection and geometric alignment. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/infer.html))
- [Training Configurations](https://awesome-repositories.com/f/artificial-intelligence-ml/training-configurations.md) — Configures hyperparameters and training variables to fine-tune the model optimization process. ([source](https://faceswap.readthedocs.io/en/latest/full/plugins/train.html))
- [Face Alignment Tools](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-systems/computer-vision/facial-analysis-systems/face-alignment-tools.md) — Formats face patches for analysis by applying landmark extraction models to detected facial regions. ([source](https://faceswap.readthedocs.io/en/latest/full/plugins/extract.html))
- [Face Color Adjustments](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-systems/face-swapping/face-color-adjustments.md) — Adjusts color channels of swapped faces to match original frames using automated color transfer and balancing routines. ([source](https://faceswap.readthedocs.io/en/latest/full/plugins/convert.html))
- [Neural Network Components](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/architectures/neural-network-components.md) — Utilizes modular building blocks like attention pooling and bottleneck layers to construct custom neural network architectures. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/model.html))
- [Learning Rate Schedulers](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/model-fine-tuning-adaptation/learning-rate-schedulers.md) — Adjusts training rates dynamically by smoothing loss values and monitoring performance trends. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/training.html))
- [Face Masking Utilities](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/frameworks/computer-vision/computer-vision-pipelines/face-masking-utilities.md) — Loads existing mask images from disk into an alignment file to associate them with specific faces or frames. ([source](https://faceswap.readthedocs.io/en/latest/full/tools/mask.html))
- [Face Annotation Interfaces](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/frameworks/computer-vision/computer-vision-tools/face-annotation-interfaces.md) — Visualizes detected faces with optional overlays like masks and meshes to facilitate manual verification. ([source](https://faceswap.readthedocs.io/en/latest/full/tools/manual.html))
- [Face Alignment Management Tools](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/frameworks/computer-vision/computer-vision-utilities/face-alignment-management-tools.md) — Facilitates checking, sorting, and exporting extracted faces or frames outside of the core processing pipeline. ([source](https://faceswap.readthedocs.io/en/latest/full/tools/tools.html))
- [Gradient Optimization Techniques](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/machine-learning-training/utilities/gradient-optimization-techniques.md) — Modifies model gradients during training based on historical norm data to prevent instability and ensure a smooth learning process. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/model.html))
- [Plugin Model Managers](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-management/plugin-model-managers.md) — Compiles neural network architectures and performs utility tasks like module discovery or input array generation. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/infer.html))

### Data & Databases

- [Batch Processing Engines](https://awesome-repositories.com/f/data-databases/batch-processing-engines.md) — Segments media into manageable chunks to sustain high-throughput processing during intensive neural network operations.
- [Alignment Data Managers](https://awesome-repositories.com/f/data-databases/data-governance-modeling/data-management-governance/data-management-tools/alignment-data-managers.md) — Maintains serialized metadata files containing frame-level details such as bounding boxes, facial landmarks, and mask definitions. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/align.html))
- [Extraction Pipeline Execution](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/processing-pipelines/extraction-pipeline-execution.md) — Supervises the runtime execution and monitoring of data extraction tasks across the processing pipeline. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/infer.html))
- [Extraction Plugin Coordinators](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/processing-pipelines/extraction-plugin-coordinators.md) — Controls the operational sequence and lifecycle of modular extraction plugins within a unified data processing flow. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/infer.html))
- [Training Previews](https://awesome-repositories.com/f/data-databases/data-analysis-visualization/visualization-frameworks-libraries/data-visualization/training-previews.md) — Displays visual samples and mask overlays during training to allow for real-time verification of model performance. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/training.html))
- [Batch Processing Utilities](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/batch-processing-systems/batch-processing-utilities.md) — Performs batch operations on aligned data by adjusting matrices and extracting specific regions from source imagery. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/align.html))
- [Converted Output Writers](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/processing-pipelines/converted-output-writers.md) — Saves processed frames into various video or image sequence formats using specialized output plugins. ([source](https://faceswap.readthedocs.io/en/latest/full/plugins/convert.html))
- [Manual Annotation Management](https://awesome-repositories.com/f/data-databases/data-governance-modeling/data-management-governance/data-management-tools/manual-annotation-management.md) — Updates face information dynamically as manual adjustments are applied to raw media files. ([source](https://faceswap.readthedocs.io/en/latest/full/tools/manual.html))
- [Data Iterators](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/batch-processing-systems/data-iterators.md) — Serves as a base class for plugins to ingest and pass information through the extraction pipeline. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/infer.html))
- [Extraction Data Structures](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/processing-pipelines/extraction-data-structures.md) — Structures batch data during extraction, including frame metadata, image arrays, and alignment status. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/infer.html))

### Part of an Awesome List

- [Generative Face Models](https://awesome-repositories.com/f/awesome-lists/ai/generative-face-models.md) — Deep learning tool for swapping faces in media.

### Operating Systems & Systems Programming

- [Compute Resource Selectors](https://awesome-repositories.com/f/operating-systems-systems-programming/hardware-interfacing-drivers/hardware-abstraction-layers/compute-resource-selectors.md) — Detects available hardware to intelligently route tensor operations toward the most efficient compute device.
- [Process Queue Managers](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/process-and-memory-management/process-queue-managers.md) — Maintains thread-safe queues across multiple processes with a global shutdown signal to ensure clean termination. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/queue_manager.html))

### Development Tools & Productivity

- [Application Script Runners](https://awesome-repositories.com/f/development-tools-productivity/build-tooling/build-orchestration-logic/build-orchestration-configuration/build-automation-systems/task-runners/application-script-runners.md) — Loads necessary modules while validating parameters and monitoring process health for reliable task execution. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/cli.html))
- [Argument Injection Systems](https://awesome-repositories.com/f/development-tools-productivity/command-line-interfaces/argument-injection-systems.md) — Maps command-line inputs to internal module parameters to govern application behavior and task execution.

### DevOps & Infrastructure

- [Configuration Distribution and Sharing](https://awesome-repositories.com/f/devops-infrastructure/configuration-management/configuration-distribution-and-sharing.md) — Synchronizes application state by formatting, reading, and writing configuration data across different sessions. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/config.html))
- [Application Settings Management](https://awesome-repositories.com/f/devops-infrastructure/configuration-management/application-settings-management.md) — Validates user inputs against defined data types and default values before persisting application settings. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/config.html))
- [Configuration Schemas](https://awesome-repositories.com/f/devops-infrastructure/configuration-management/configuration-validation/configuration-schemas.md) — Establishes configuration settings with strict data types, default values, and validation rules to ensure consistent application behavior. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/config.html))

### Programming Languages & Runtimes

- [Background Task Runners](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/concurrency-models/concurrency/task-orchestration-frameworks/background-task-runners.md) — Offloads data pre-fetching to background threads to prevent blocking the main application during intensive operations. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/multithreading.html))
- [Thread Pools](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/concurrency-models/concurrency/task-orchestration-frameworks/thread-pools.md) — Allocates worker threads to manage heavy I/O operations and maintain application responsiveness.

### Software Engineering & Architecture

- [Pipeline Plugin Systems](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/extensibility/plugin-architectures/domain-specific/pipeline-plugin-systems.md) — Dynamically loads modular components to perform specific stages of image processing, model training, and data extraction.
- [Extraction Plugins](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/extensibility/plugin-architectures/extraction-plugins.md) — Defines standard interfaces for batch processing and device management to support custom extraction modules. ([source](https://faceswap.readthedocs.io/en/latest/full/plugins/extract.html))

### System Administration & Monitoring

- [Training Metrics](https://awesome-repositories.com/f/system-administration-monitoring/logging/training-metrics.md) — Records training events and visualizes performance indicators by parsing log files in real time. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/training.html))
- [Machine Learning Environment Checkers](https://awesome-repositories.com/f/system-administration-monitoring/system-diagnostics/machine-learning-environment-checkers.md) — Verifies environment compatibility by detecting installed machine learning libraries and hardware acceleration versions on the host system. ([source](https://faceswap.readthedocs.io/en/latest/full/lib/system.html))

### User Interface & Experience

- [Graphical Interface Launchers](https://awesome-repositories.com/f/user-interface-experience/graphical-user-interfaces/graphical-interface-launchers.md) — Initializes a visual control panel to configure and trigger complex media manipulation tasks. ([source](https://faceswap.readthedocs.io/en/latest/full/scripts.html))
