How hacksider/deep-live-cam works
Deep-Live-Cam is a desktop face-swapping application for live camera feeds and image/video targets. Users select a source face and target or camera, configure face mapping and processing options, then run the live or file-processing workflow; output preserves video properties such as FPS/audio when configured. The graph reflects the documented capabilities and sampled orchestration/model code; unsampled capture and output details are represented only at the subsystem level.
Main entry points: modules/core.py App Orchestrator · frame/core.py Frame Pipeline · ui.py Desktop UI · face_analyser.py Face Analysis
Components 22
Application
- Desktop UI
modules/ui.py - App Orchestrator
modules/core.py - App Settings
modules/globals.py
Face Processing
- Face Analysis
modules/face_analyser.py - Face Mapping
modules/processors/frame/face_swapper.py - Face Masks
modules/processors/frame/face_masking.py - Face Enhancers
modules/processors/frame/face_enhancer.py - GPEN 256
modules/processors/frame/face_enhancer_gpen256.py - GPEN 512
modules/processors/frame/face_enhancer_gpen512.py
Media I/O
- Live Capture
modules/capturer.py - Video Capture
modules/video_capture.py - Frame Pipeline
modules/processors/frame/core.py - Media Utilities
modules/utilities.py
Runtime Support
- Model Files
models - Model Manager
modules/model_downloader.py - GPU Processing
modules/gpu_processing.py - ONNX Optimization
modules/onnx_optimize.py - Content Check
modules/ui.py
Other components
- User
- Camera
- Target Media
- Output Media
Connections 25
- User → Desktop UI: configures
- Desktop UI → App Orchestrator: starts workflow
- App Orchestrator → Desktop UI: initializes
- Desktop UI → App Settings: sets options
- App Orchestrator → Frame Pipeline: dispatches processing
- Camera → Live Capture: supplies frames
- Live Capture → App Orchestrator: streams frames
- Target Media → App Orchestrator: provides media
- App Orchestrator → Video Capture: reads video
- App Orchestrator → Media Utilities: uses media operations
- Frame Pipeline → Face Analysis: requests face analysis
- Frame Pipeline → Face Mapping: dispatches swapping
- Frame Pipeline → Face Enhancers: dispatches enhancement
- Frame Pipeline → GPEN 256: dispatches enhancement
- Frame Pipeline → GPEN 512: dispatches enhancement
- Face Mapping → Face Analysis: detects faces
- Face Mapping → Face Masks: applies masks
- Face Enhancers → Face Analysis: gets faces
- Model Manager → Model Files: ensures models
- Face Enhancers → Model Manager: loads model
- Face Analysis → ONNX Optimization: optimizes model
- Face Masks → GPU Processing: uses acceleration
- Frame Pipeline → Output Media: writes processed media
- App Orchestrator → Content Check: checks target
- Desktop UI → Content Check: checks media