How iperov/deepfacelive works
DeepFaceLive is a desktop application for live or video-based face swapping and face animation, with model configuration and frame output. Users launch the app, choose a camera or video source, configure face processing, and view or stream the result. The README also documents DFM-model swaps, single-photo Insight swaps, and video-controlled animation. The graph preserves those product branches; detailed runtime wiring is only partially evidenced by the supplied excerpts, so uncertain processing links are dashed and uncited.
Main entry points: FaceAligner.py Face Aligner · DeepFaceLiveApp.py App Window · FaceMerger.py Face Merger · FaceSwapDFM.py DFM Swap
Components 23
Application and UI
- App Window
apps/DeepFaceLive/DeepFaceLiveApp.py - Backend Controls
apps/DeepFaceLive/ui/widgets
Media Processing
- Camera Source
apps/DeepFaceLive/backend/CameraSource.py - File Source
apps/DeepFaceLive/backend/FileSource.py - Frame Adjuster
apps/DeepFaceLive/backend/FrameAdjuster.py - Face Detector
apps/DeepFaceLive/backend/FaceDetector.py - Face Marker
apps/DeepFaceLive/backend/FaceMarker.py - Face Aligner
apps/DeepFaceLive/backend/FaceAligner.py - Face Merger
apps/DeepFaceLive/backend/FaceMerger.py - DFM Swap
apps/DeepFaceLive/backend/FaceSwapDFM.py - Insight Swap
apps/DeepFaceLive/backend/FaceSwapInsight.py - Face Animator
apps/DeepFaceLive/backend/FaceAnimator.py - Stream Output
apps/DeepFaceLive/backend/StreamOutput.py
Models and Inference
- DFM Model
modelhub/DFLive/DFMModel.py - ONNX Models
modelhub/onnx - Torch Models
modelhub/torch - ONNX Runtime
xlib/onnxruntime/InferenceSession.py
Shared Runtime
- Localization
localization/localization.py - Font Database
resources/fonts/QXFontDB.py - Image Processing
xlib/image/ImageProcessor.py - Face Geometry
xlib/face/FLandmarks2D.py - Affine Math
xlib/math/Affine2DMat.py
Other components
- User
Connections 25
- User → App Window: launches
- App Window → Localization: sets language
apps/DeepFaceLive/DeepFaceLiveApp.py - App Window → Font Database: uses fonts
apps/DeepFaceLive/DeepFaceLiveApp.py - App Window → Backend Controls: presents controls
apps/DeepFaceLive/DeepFaceLiveApp.py - User → Camera Source: selects camera
- User → File Source: selects video
- Camera Source → Frame Adjuster: supplies frames
- File Source → Frame Adjuster: supplies frames
- Frame Adjuster → Face Detector: passes frames
- Face Detector → Face Marker: passes faces
- Face Marker → Face Aligner: passes landmarks
- Face Aligner → DFM Swap: prepares faces
- Face Aligner → Insight Swap: prepares faces
- Face Aligner → Face Animator: prepares faces
- DFM Swap → Face Merger: provides swapped face
- Insight Swap → Face Merger: provides swapped face
- Face Animator → Face Merger: provides animated face
- Face Merger → Stream Output: passes result
- DFM Swap → DFM Model: uses model
- DFM Model → ONNX Runtime: creates session
modelhub/DFLive/DFMModel.py - DFM Model → Image Processing: resizes output
modelhub/DFLive/DFMModel.py - Insight Swap → ONNX Models: uses model
- Face Animator → ONNX Models: uses model
- Face Aligner → Torch Models: uses model
- Face Geometry → Affine Math: uses transforms
xlib/face/FLandmarks2D.py