DeepFaceLive - Live Deep Fake in python, Real-time face swap for PC streaming or video calls

Overview

Available ready-to-use public face models.

These persons do not exists. Similarities with real people are accidental.

Ava de Addario

examples

Dilraba Dilmurat

examples

Ewon Spice

examples

Kim Jarrey

examples

Matilda Bobbie

examples

Silwan Stillwone

examples

Tim Chrys

examples

If you want a higher quality or better face match, you can train your own face model using DeepFaceLab

Here is an example of Arnold Schwarzneggar trained on a particular face and used in a video call. Read the FAQ for more information.

Minimum system requirements

any DirectX12 compatible graphics card

Modern CPU with AVX instructions

4GB RAM, 32GB+ paging file

Windows 10

Setup tutorial

Windows 10 x64

Documentation

User FAQ

Developer FAQ

Releases

Windows 10 x64 (mega.nz) Contains stand-alone zero-dependency all-in-one ready-to-use portable self-extracting folder! You don't need to install anything other than video drivers.

DirectX12 build : NVIDIA, AMD, Intel videocards.

NVIDIA build : NVIDIA cards only, GT730 and higher. Works faster than DX12. FaceMerger can work also on AMD/Intel.

Communication groups

Discord Official discord channel. English / Russian.
mrdeepfakes the biggest NSFW English deepfake community
dfldata.xyz 中文交流论坛,免费软件教程、模型、人脸数据

How can I help the project?

I need the computing power to train models.
If you have a free computer with 2080TI or better card with 12GB+ VRAM, you can give me remote access to it. I will train 1 model in a month. Contact me(iperov#6528) in Discord channel.
Register github account and push "Star" button.
Donate via Paypal
Donate via Yandex.Money
bitcoin:bc1qewl062v70rszulml3f0mjdjrys8uxdydw3v6rq
Comments
  • docker: Error response from daemon: could not select device driver

    docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

    Hi, I'm testing this great job under Ubuntu 22.04... However, I got the following ERROR message:

    ➜  linux git:(master) sudo ./start.sh -c /dev/video0
    
    Starting with camera devices
    --device=/dev/video0:/dev/video0 --device=/dev/video1:/dev/video1
    
    Sending build context to Docker daemon  6.656kB
    Step 1/13 : FROM nvidia/cuda:11.4.2-cudnn8-runtime-ubuntu20.04
     ---> ecc3321906a4
    Step 2/13 : WORKDIR /app
     ---> Using cache
     ---> beb4e81b6791
    Step 3/13 : ARG DEBIAN_FRONTEND=noninteractive
     ---> Using cache
     ---> 53588afd1f86
    Step 4/13 : RUN apt update
     ---> Using cache
     ---> 9e1188cc8f98
    Step 5/13 : RUN apt -y install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 curl ffmpeg git nano gnupg2 libsm6 wget unzip libxcb-icccm4 libxkbcommon-x11-0 libxcb-keysyms1 libxcb-icccm4 libxcb-render0 libxcb-render-util0 libxcb-image0
     ---> Using cache
     ---> 68a62de47be4
    Step 6/13 : RUN apt install -y python3 python3-pip
     ---> Using cache
     ---> 1499c55a57f7
    Step 7/13 : RUN ln -s /usr/bin/python3 /usr/bin/python
     ---> Using cache
     ---> dfd8ed228c2e
    Step 8/13 : RUN git clone https://github.com/iperov/DeepFaceLive.git
     ---> Using cache
     ---> 15d19c1747ad
    Step 9/13 : RUN python -m pip install --upgrade pip
     ---> Using cache
     ---> a6a6a4055d24
    Step 10/13 : RUN python -m pip install onnxruntime-gpu==1.11.1 numpy==1.21.6 h5py numexpr protobuf==3.20.1 opencv-python==4.5.5.64 opencv-contrib-python==4.5.5.64 pyqt6==6.3.0 onnx==1.11.0 torch==1.10.0 torchvision==0.11.1
     ---> Using cache
     ---> 9590a2814123
    Step 11/13 : WORKDIR /app/DeepFaceLive
     ---> Using cache
     ---> 3e8d1646b08d
    Step 12/13 : COPY example.sh example.sh
     ---> Using cache
     ---> 25dc41dc4edb
    Step 13/13 : CMD ./example.sh
     ---> Using cache
     ---> ddbac6f781c0
    Successfully built ddbac6f781c0
    Successfully tagged deepfacelive:latest
    access control disabled, clients can connect from any host
    docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].
    ➜  linux git:(master) 
    
    linux 
    opened by jiapei100 8
  • ImportError: DLL load failed: The specified procedure could not be found.

    ImportError: DLL load failed: The specified procedure could not be found.

    When I tried to launch the program (DeepFaceLive_NVIDIA_build_06_14_2022) for the first time, I encountered the following error: May I know how to solve the problem? Thank you.

    image

    opened by ceeyee 7
  • Configuring Project in PyCharm

    Configuring Project in PyCharm

    Hello, Thank you for sharing this wonderful work with us.

    I need to configure the project in PyCharm IDE using Anaconda. My Basic question is "Can I run the whole project by typing one complete python command with command-line arguments by providing the link to the image and video. This means can I run the project by calling the main.py file only and then generate the output in a separate folder." OR Do I need to run the DeepFaceLive.py file and then run the project from the user interface?

    Thank You

    opened by mayanktiwariiiitdmj 7
  • How to use Xseg-dst

    How to use Xseg-dst

    I have made a model and using xseg I have excluded the mouth when open and trained it, and it masks as desired. But when I export this model to dfm and use it in deepfacelive the mouth is not excluded. I can however use deepfacelabs merge SAEHD and set mask_mode to Xseg-dst. This gives the desired result.

    Is there any way to achieve the same in deepfacelive?

    opened by nexon33 5
  • can't open camera by index

    can't open camera by index

    Hello, on Linux (ubuntu 20.04) I got this error:

    [ WARN:[email protected]] global /io/opencv/modules/videoio/src/cap_v4l.cpp (889) open VIDEOIO(V4L2:/dev/video0): can't open camera by index
    [ WARN:[email protected]] global /io/opencv/modules/videoio/src/cap_v4l.cpp (889) open VIDEOIO(V4L2:/dev/video1): can't open camera by index
    

    I have test with one camera & one webcam: ls /dev/video*

    /dev/video0 /dev/video1

    linux 
    opened by s4dic 5
  • Fix Linux Docker container

    Fix Linux Docker container

    Fix issues to recognize NVIDIA drivers, such as nvidia-smi and nvcc --version inside the container.

    I installed locally nvidia-docker, with sudo apt install nvidia-docker2 and updated the Dockerfile base image. It seems that apt install -y libnvidia-compute-$NV_VER was overriding the base image with the working drivers.

    This pull request addresses an issue with recognizing NVIDIA drivers inside the container. The problem was solved by installing nvidia-docker locally with:

    sudo apt install nvidia-docker2
    sudo systemctl restart docker
    

    And updating the base image in the Dockerfile. The fix involved removing apt install -y libnvidia-compute-$NV_VER, which was overriding the correct driver. As result, nvidia-smi and nvcc --version now works properly inside the container and of course, Deep Face Live.

    opened by darlannakamura 4
  • USERS READ -- SEVERE -- WindowsBuilder.py change functionality of shutil.rmtree(release_path)

    USERS READ -- SEVERE -- WindowsBuilder.py change functionality of shutil.rmtree(release_path)

    Extremely dangerous, wipes a directory recursively. This stupid function nearly wiped half my hard drive.

    To any user's reading this, only build in a directory that is empty ( and make sure 100% you've not misspelt the argument).

    Please update this ASAP.

    opened by fmac2000 3
  • [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Exception during initialization: D:\a\_work\1\s\onnxruntime\core\framework\bfc_arena.cc:342 onnxruntime::BFCArena::AllocateRawInternal Failed to allocate memory for requested buffer of size 150994944

    [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Exception during initialization: D:\a\_work\1\s\onnxruntime\core\framework\bfc_arena.cc:342 onnxruntime::BFCArena::AllocateRawInternal Failed to allocate memory for requested buffer of size 150994944

    Any time I try to run the face swapper it shows this [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Exception during initialization: D:\a_work\1\s\onnxruntime\core\framework\bfc_arena.cc:342 onnxruntime::BFCArena::AllocateRawInternal Failed to allocate memory for requested buffer of size 150994944

    Can anyone help?

    opened by cubestudioss 3
  • Unable to load kernel32 library

    Unable to load kernel32 library

    Running DeepFaceLive. Traceback (most recent call last): File "internal\DeepFaceLive\main.py", line 95, in main() File "internal\DeepFaceLive\main.py", line 88, in main args.func(args) File "internal\DeepFaceLive\main.py", line 30, in run_DeepFaceLive from apps.DeepFaceLive.DeepFaceLiveApp import DeepFaceLiveApp File "D:\DeepFaceLive_NVIDIA_internal\DeepFaceLive\apps\DeepFaceLive\DeepFaceLiveApp.py", line 14, in from . import backend File "D:\DeepFaceLive_NVIDIA_internal\DeepFaceLive\apps\DeepFaceLive\backend_init.py", line 1, in from .BackendBase import (BackendConnection, BackendConnectionData, BackendDB, File "D:\DeepFaceLive_NVIDIA_internal\DeepFaceLive\apps\DeepFaceLive\backend\BackendBase.py", line 7, in from xlib import time as lib_time File "D:\DeepFaceLive_NVIDIA_internal\DeepFaceLive\xlib\time_init.py", line 1, in from .time import timeit, measure, FPSCounter, AverageMeasurer File "D:\DeepFaceLive_NVIDIA_internal\DeepFaceLive\xlib\time\time_.py", line 11, in if not kernel32.QueryPerformanceFrequency(_perf_freq): File "D:\DeepFaceLive_NVIDIA_internal\DeepFaceLive\xlib\api\win32\wintypes\wintypes.py", line 32, in wrapper raise RuntimeError(f'Unable to load {dll_name} library.') RuntimeError: Unable to load kernel32 library. Press any key to continue . . .

    I've tried both versions. I have an rtx 2070 with 8gig of vram. All other programs work just fine. Deepfacelab works great to. This is the only program that won't run. I've tried everything. Even tried replacing the kernel32.dll with another windows 10 kernel.dll.

    opened by JustinH71 3
  • Exception: CUDAExecutionProvider is not avaiable in onnxruntime

    Exception: CUDAExecutionProvider is not avaiable in onnxruntime

    Hello!

    I am trying to run the demo program, following this tutorial, however at the point when I choose the device for the face detector, it goes red and the terminal has this output:

    FaceDetector error: CUDAExecutionProvider is not avaiable in onnxruntime Traceback (most recent call last):
      File "D:\Desktop\DeepFaceLive-master\xlib\mp\csw\CSWBase.py", line 472, in _start_proc
        self.on_start(*worker_start_args, **worker_start_kwargs)
      File "D:\Desktop\DeepFaceLive-master\apps\DeepFaceLive\backend\FaceDetector.py", line 81, in on_start
        cs.detector_type.select(state.detector_type)
      File "D:\Desktop\DeepFaceLive-master\xlib\mp\csw\DynamicSingleSwitch.py", line 99, in select
        result = self._set_selected_idx(idx_or_choice)
      File "D:\Desktop\DeepFaceLive-master\xlib\mp\csw\DynamicSingleSwitch.py", line 33, in _set_selected_idx
        self._on_selected_evl.call(selected_idx, self.get_selected_choice() )
      File "D:\Desktop\DeepFaceLive-master\xlib\python\EventListener.py", line 24, in call
        func(*args, **kwargs)
      File "D:\Desktop\DeepFaceLive-master\apps\DeepFaceLive\backend\FaceDetector.py", line 99, in on_cs_detector_type
        cs.device.select(state.YoloV5_state.device)
      File "D:\Desktop\DeepFaceLive-master\xlib\mp\csw\DynamicSingleSwitch.py", line 99, in select
        result = self._set_selected_idx(idx_or_choice)
      File "D:\Desktop\DeepFaceLive-master\xlib\mp\csw\DynamicSingleSwitch.py", line 33, in _set_selected_idx
        self._on_selected_evl.call(selected_idx, self.get_selected_choice() )
      File "D:\Desktop\DeepFaceLive-master\xlib\python\EventListener.py", line 24, in call
        func(*args, **kwargs)
      File "D:\Desktop\DeepFaceLive-master\apps\DeepFaceLive\backend\FaceDetector.py", line 144, in on_cs_devices
        self.YoloV5Face = onnx_models.YoloV5Face(device)
      File "D:\Desktop\DeepFaceLive-master\modelhub\onnx\YoloV5Face\YoloV5Face.py", line 34, in __init__
        self._sess = sess = InferenceSession_with_device(str(path), device_info)
      File "D:\Desktop\DeepFaceLive-master\xlib\onnxruntime\InferenceSession.py", line 23, in InferenceSession_with_device
        raise Exception('CUDAExecutionProvider is not avaiable in onnxruntime')
    Exception: CUDAExecutionProvider is not avaiable in onnxruntime
    

    I have CUDA 11.4 installed with the cudnn support. My graphics card is GTX 1080 Ti.

    Looking forward to hearing from you! Thanks.

    opened by fortminors 3
  • expected performance with NVIDIA GeForce RTX 2060

    expected performance with NVIDIA GeForce RTX 2060

    Hello,

    I have this graphic card https://www.techpowerup.com/gpu-specs/geforce-rtx-2060.c3310 imagen

    And I'm having between 9 ans 11 FPS in with deep Face Live Image Animation.

    Do you think this is ok?, or should I investigate configurations to improve performance?

    Cheers!

    opened by RadW2020 2
  • QPainter::begin: Paint device returned engine == 0, type: 2

    QPainter::begin: Paint device returned engine == 0, type: 2

    Running DeepFaceLive.
    QPainter::begin: Paint device returned engine == 0, type: 2
    QPainter::setCompositionMode: Painter not active
    QPainter::end: Painter not active, aborted
    Traceback (most recent call last):
      File "main.py", line 254, in <module>
        main()
      File "main.py", line 247, in main
        args.func(args)
      File "main.py", line 187, in run_DeepFaceLive
        deep_face_live_app_inst = DeepFaceLiveApp(userdata_path=userdata_path)
      File "/home/administrator/Projects/deepfacelive/apps/DeepFaceLive/DeepFaceLiveApp.py", line 238, in __init__
        self.initialize()
      File "/home/administrator/Projects/deepfacelive/apps/DeepFaceLive/DeepFaceLiveApp.py", line 254, in initialize
        self.dfl_wnd = self._dfl_wnd = QDFLAppWindow(userdata_path=self.userdata_path, settings_dirpath=self.settings_dirpath)
      File "/home/administrator/Projects/deepfacelive/apps/DeepFaceLive/DeepFaceLiveApp.py", line 197, in __init__
        q_live_swap = self.q_live_swap = QLiveSwap(userdata_path=self._userdata_path, settings_dirpath=self._settings_dirpath)
      File "/home/administrator/Projects/deepfacelive/apps/DeepFaceLive/DeepFaceLiveApp.py", line 69, in __init__
        self.q_file_source    = QFileSource(self.file_source)
      File "/home/administrator/Projects/deepfacelive/apps/DeepFaceLive/ui/QFileSource.py", line 22, in __init__
        self.q_input_paths = QPathEditCSWPaths(cs.input_paths)
      File "/home/administrator/Projects/deepfacelive/apps/DeepFaceLive/ui/widgets/QPathEditCSWPaths.py", line 30, in __init__
        btn_open = self._btn_open = qtx.QXPushButton(image=QXImageDB.folder_open_outline(color='light gray'),
      File "/home/administrator/Projects/deepfacelive/xlib/qt/widgets/QXPushButton.py", line 28, in __init__
        self._set_image(image)
      File "/home/administrator/Projects/deepfacelive/xlib/qt/widgets/QXPushButton.py", line 88, in _set_image
        self._update_icon_size()
      File "/home/administrator/Projects/deepfacelive/xlib/qt/widgets/QXPushButton.py", line 71, in _update_icon_size
        pixmap_aspect = size.width() / size.height()
    ZeroDivisionError: division by zero
    

    Ubuntu 22.04 Help me please!

    linux 
    opened by nikell28 0
  • crashed green output in the linux env

    crashed green output in the linux env

    Hi, there. thank you for your nice work. I use linux and windows both. (usually use linux for development and sometimes use windows for the other reason) When I store output frame from file(.mp4) in the linux, green noise was usually occured like below image I tried this in the windows env at the same condition (same file, same options, etc), and green noise was not occured. Has anybody face this issue?

    linux 
    opened by BbChip0103 9
  • Stop developing this technology

    Stop developing this technology

    This technology is only going to be used for evil purposes. To deceive people, steal their money, possessions, undercover operations. Nothing good. It is already being used for scams like the pig-butchering plate, in which hundreds of thousands of lives around the world are being left without money, causing a lot of suffering.

    opened by alonsoir 45
Releases(ROB_DOE)
Understanding Convolutional Neural Networks from Theoretical Perspective via Volterra Convolution

nnvolterra Run Code Compile first: make compile Run all codes: make all Test xconv: make npxconv_test MNIST dataset needs to be downloaded, converted

1 May 24, 2022
Code of paper "Compositionally Generalizable 3D Structure Prediction"

Compositionally Generalizable 3D Structure Prediction In this work, We bring in the concept of compositional generalizability and factorizes the 3D sh

Songfang Han 30 Dec 17, 2022
A library that allows for inference on probabilistic models

Bean Machine Overview Bean Machine is a probabilistic programming language for inference over statistical models written in the Python language using

Meta Research 234 Dec 29, 2022
Towards Interpretable Deep Metric Learning with Structural Matching

DIML Created by Wenliang Zhao*, Yongming Rao*, Ziyi Wang, Jiwen Lu, Jie Zhou This repository contains PyTorch implementation for paper Towards Interpr

Wenliang Zhao 75 Nov 11, 2022
Local-Global Stratified Transformer for Efficient Video Recognition

DualFormer This repo is the implementation of our manuscript entitled "Local-Global Stratified Transformer for Efficient Video Recognition". Our model

Sea AI Lab 19 Dec 07, 2022
TorchDistiller - a collection of the open source pytorch code for knowledge distillation, especially for the perception tasks, including semantic segmentation, depth estimation, object detection and instance segmentation.

This project is a collection of the open source pytorch code for knowledge distillation, especially for the perception tasks, including semantic segmentation, depth estimation, object detection and i

yifan liu 147 Dec 03, 2022
The codes reproduce the figures and statistics in the paper, "Controlling for multiple covariates," by Mark Tygert.

The accompanying codes reproduce all figures and statistics presented in "Controlling for multiple covariates" by Mark Tygert. This repository also pr

Meta Research 1 Dec 02, 2021
Python inverse kinematics for your robot model based on Pinocchio.

Python inverse kinematics for your robot model based on Pinocchio.

Stéphane Caron 50 Dec 22, 2022
Encoding Causal Macrovariables

Encoding Causal Macrovariables Data Natural climate data ('El Nino') Self-generated data ('Simulated') Experiments Detecting macrovariables through th

Benedikt Höltgen 3 Jul 31, 2022
This is a collection of simple PyTorch implementations of neural networks and related algorithms. These implementations are documented with explanations,

labml.ai Deep Learning Paper Implementations This is a collection of simple PyTorch implementations of neural networks and related algorithms. These i

labml.ai 16.4k Jan 09, 2023
Implementation of "Semi-supervised Domain Adaptive Structure Learning"

Semi-supervised Domain Adaptive Structure Learning - ASDA This repo contains the source code and dataset for our ASDA paper. Illustration of the propo

3 Dec 13, 2021
Models Supported: AlbUNet [18, 34, 50, 101, 152] (1D and 2D versions for Single and Multiclass Segmentation, Feature Extraction with supports for Deep Supervision and Guided Attention)

AlbUNet-1D-2D-Tensorflow-Keras This repository contains 1D and 2D Signal Segmentation Model Builder for AlbUNet and several of its variants developed

Sakib Mahmud 1 Nov 15, 2021
Supporting code for "Autoregressive neural-network wavefunctions for ab initio quantum chemistry".

naqs-for-quantum-chemistry This repository contains the codebase developed for the paper Autoregressive neural-network wavefunctions for ab initio qua

Tom Barrett 24 Dec 23, 2022
[ICCV 2021] FaPN: Feature-aligned Pyramid Network for Dense Image Prediction

FaPN: Feature-aligned Pyramid Network for Dense Image Prediction [arXiv] [Project Page] @inproceedings{ huang2021fapn, title={{FaPN}: Feature-alig

EMI-Group 175 Dec 30, 2022
An ML & Correlation platform for transforming disparate data points of interest into usable intelligence.

SSIDprobeCollector An ML & Correlation platform for transforming disparate data points of interest into usable intelligence. At a High level the platf

Bill Reyor 1 Jan 30, 2022
Audio2Face - Audio To Face With Python

Audio2Face Discription We create a project that transforms audio to blendshape w

FACEGOOD 724 Dec 26, 2022
Joint detection and tracking model named DEFT, or ``Detection Embeddings for Tracking.

DEFT: Detection Embeddings for Tracking DEFT: Detection Embeddings for Tracking, Mohamed Chaabane, Peter Zhang, J. Ross Beveridge, Stephen O'Hara

Mohamed Chaabane 253 Dec 18, 2022
Codes for paper "Towards Diverse Paragraph Captioning for Untrimmed Videos". CVPR 2021

Towards Diverse Paragraph Captioning for Untrimmed Videos This repository contains PyTorch implementation of our paper Towards Diverse Paragraph Capti

Yuqing Song 61 Oct 11, 2022
Generative Adversarial Text-to-Image Synthesis

###Generative Adversarial Text-to-Image Synthesis Scott Reed, Zeynep Akata, Xinchen Yan, Lajanugen Logeswaran, Bernt Schiele, Honglak Lee This is the

Scott Ellison Reed 883 Dec 31, 2022
NeuralCompression is a Python repository dedicated to research of neural networks that compress data

NeuralCompression is a Python repository dedicated to research of neural networks that compress data. The repository includes tools such as JAX-based entropy coders, image compression models, video c

Facebook Research 297 Jan 06, 2023