deep-live-cam
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "deep-live-cam" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-0e87eaa5019356197d5f4e92517c51564a243a5dad3704e99916caf04bb1695f. Verify the upstream source and version against https://github.com/TerminalSkills/skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Real-time face swapping and video deepfaking using a single source image. Suitable for building face-swap applications, real-time video effects, virtual try-on features, or AI video effects pipelines, enabling real-time face replacement and video generation/processing from one source image.
Introduction source: third_party · TerminalSkills · 1.0.0 Reference
SkillPi interpretation
- Testing
- Not tested
Browse files
Frontmatter
name: deep-live-cam
description: >-
Real-time face swap and video deepfake using a single source image. Use when: building
face-swap applications, real-time video effects, virtual try-on features, AI video
effects pipelines.
license: AGPL-3.0
compatibility: "Python 3.10+, CUDA GPU recommended"
metadata:
author: terminal-skills
version: "1.0.0"
category: data-ai
tags:
- deepfake
- face-swap
- real-time
- video
- computer-visionDeep-Live-Cam — Real-Time Face Swap
Overview
Real-time face swap and video deepfake using a single source image. Supports webcam, video files, and streaming with GPU acceleration. The pipeline detects faces, extracts embeddings, swaps faces using the inswapper model, and post-processes with GFPGAN/CodeFormer for quality.
Source: hacksider/Deep-Live-Cam
Instructions
1. Install and configure
git clone https://github.com/hacksider/Deep-Live-Cam.git
cd Deep-Live-Cam
pip install -r requirements.txt
Download models into the models/ directory:
mkdir -p models
wget -O models/inswapper_128_fp16.onnx "https://huggingface.co/hacksider/deep-live-cam/resolve/main/inswapper_128_fp16.onnx"
For GPU acceleration:
pip install onnxruntime-gpu # NVIDIA CUDA
pip install onnxruntime-rocm # AMD ROCm
pip install onnxruntime-coreml # Apple Silicon
2. Run face swap
GUI mode (webcam, real-time):
python run.py
CLI mode — process a video file:
python run.py \
--source path/to/source_face.jpg \
--target path/to/target_video.mp4 \
--output path/to/output.mp4 \
--execution-provider cuda
CLI mode — process a single image:
python run.py \
--source path/to/source_face.jpg \
--target path/to/target_image.jpg \
--output path/to/output.jpg
3. Key features
- Mouth Mask — Retains original mouth for accurate lip movement:
--mouth-mask - Face Mapping — Different source faces on multiple people:
--face-mapping - Quality Enhancement — GFPGAN or CodeFormer:
--enhancer gfpgan
Examples
Example 1: Swap a face in a conference recording
python run.py \
--source speaker_headshot.jpg \
--target conference_talk.mp4 \
--output anonymized_talk.mp4 \
--execution-provider cuda \
--enhancer gfpgan
This replaces the speaker's face in a 45-minute conference recording with the source face, using GPU acceleration and GFPGAN enhancement for broadcast-quality output.
Example 2: Programmatic face swap with Python
import cv2
import insightface
from insightface.app import FaceAnalysis
app = FaceAnalysis(name="buffalo_l", providers=["CUDAExecutionProvider"])
app.prepare(ctx_id=0, det_size=(640, 640))
swapper = insightface.model_zoo.get_model(
"models/inswapper_128_fp16.onnx",
providers=["CUDAExecutionProvider"]
)
source_img = cv2.imread("actor_headshot.jpg")
target_img = cv2.imread("movie_scene_frame.jpg")
source_faces = app.get(source_img)
target_faces = app.get(target_img)
if source_faces and target_faces:
result = swapper.get(target_img, target_faces[0], source_faces[0], paste_back=True)
cv2.imwrite("swapped_scene.jpg", result)
Example 3: Real-time webcam with mouth mask
python run.py --mouth-mask --execution-provider cuda
Launches the GUI with webcam input. Select a source face image, enable mouth mask for natural lip sync, and start the live face swap at 25-30 FPS on an RTX 3060.
Guidelines
- Always obtain consent from the person whose face you're using
- Label all outputs as AI-generated/deepfake when sharing publicly
- Legal compliance — Many jurisdictions have laws against non-consensual deepfakes
- Lighting matters — Works best with even, front-facing lighting; degrades at extreme head rotations (>60°)
- GPU recommended — CPU mode works but is very slow; NVIDIA RTX 3060+ with 6GB+ VRAM recommended
- Verify results — Heavy occlusion (masks, large sunglasses) can cause artifacts
- Use batch mode for quality — Real-time trades resolution for speed; use offline processing for high-res output
References
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供实时人脸交换和视频深度伪造功能,适用于虚拟试穿、AI视频特效等明确场景
- 支持多种输入源(webcam、视频文件、图像)和GPU加速,实用性较强
Highlights
- 触发描述清晰完整,覆盖人脸交换、实时特效、虚拟试穿等核心使用场景
- 边界定义明确,不易与其他Skill混淆
Highlights
- 文档结构清晰,包含安装、运行、特性、示例完整流程
- 提供多种使用模式示例(CLI、GUI、Python API),便于用户理解
Highlights
- 工具来源明确,依赖项和模型下载路径清晰
- 包含重要使用指南和法律合规提醒,提升执行安全性
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 36, 49, 50, 51
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- github.com
- huggingface.co
- insightface.ai
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.