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)
The codes and related files to reproduce the results for Image Similarity Challenge Track 2.

The codes and related files to reproduce the results for Image Similarity Challenge Track 2.

Wenhao Wang 89 Jan 02, 2023
Spectral Tensor Train Parameterization of Deep Learning Layers

Spectral Tensor Train Parameterization of Deep Learning Layers This repository is the official implementation of our AISTATS 2021 paper titled "Spectr

Anton Obukhov 12 Oct 23, 2022
A Home Assistant custom component for Lobe. Lobe is an AI tool that can classify images.

Lobe This is a Home Assistant custom component for Lobe. Lobe is an AI tool that can classify images. This component lets you easily use an exported m

Kendell R 4 Feb 28, 2022
This repository contains the code and models for the following paper.

DC-ShadowNet Introduction This is an implementation of the following paper DC-ShadowNet: Single-Image Hard and Soft Shadow Removal Using Unsupervised

AuAgCu 65 Dec 27, 2022
Minimisation of a negative log likelihood fit to extract the lifetime of the D^0 meson (MNLL2ELDM)

Minimisation of a negative log likelihood fit to extract the lifetime of the D^0 meson (MNLL2ELDM) Introduction The average lifetime of the $D^{0}$ me

Son Gyo Jung 1 Dec 17, 2021
WiFi-based Multi-task Sensing

WiFi-based Multi-task Sensing Introduction WiFi-based sensing has aroused immense attention as numerous studies have made significant advances over re

zhangx289 6 Nov 24, 2022
Benchmarks for semi-supervised domain generalization.

Semi-Supervised Domain Generalization This code is the official implementation of the following paper: Semi-Supervised Domain Generalization with Stoc

Kaiyang 49 Dec 10, 2022
Code for CoMatch: Semi-supervised Learning with Contrastive Graph Regularization

CoMatch: Semi-supervised Learning with Contrastive Graph Regularization (Salesforce Research) This is a PyTorch implementation of the CoMatch paper [B

Salesforce 107 Dec 14, 2022
Training a Resilient Q-Network against Observational Interference, Causal Inference Q-Networks

Obs-Causal-Q-Network AAAI 2022 - Training a Resilient Q-Network against Observational Interference Preprint | Slides | Colab Demo | Environment Setup

23 Nov 21, 2022
This repo contains implementation of different architectures for emotion recognition in conversations.

Emotion Recognition in Conversations Updates 🔥 🔥 🔥 Date Announcements 03/08/2021 🎆 🎆 We have released a new dataset M2H2: A Multimodal Multiparty

Deep Cognition and Language Research (DeCLaRe) Lab 1k Dec 30, 2022
Repositório para arquivos sobre o Módulo 1 do curso Top Coders da Let's Code + Safra

850-Safra-DS-ModuloI Repositório para arquivos sobre o Módulo 1 do curso Top Coders da Let's Code + Safra Para aprender mais Git https://learngitbranc

Brian Nunes 7 Dec 10, 2022
3D ResNets for Action Recognition (CVPR 2018)

3D ResNets for Action Recognition Update (2020/4/13) We published a paper on arXiv. Hirokatsu Kataoka, Tenga Wakamiya, Kensho Hara, and Yutaka Satoh,

Kensho Hara 3.5k Jan 06, 2023
A repository for the updated version of CoinRun used to collect MUGEN, a multimodal video-audio-text dataset.

A repository for the updated version of CoinRun used to collect MUGEN, a multimodal video-audio-text dataset. This repo contains scripts to train RL agents to navigate the closed world and collect vi

MUGEN 11 Oct 22, 2022
CBKH: The Cornell Biomedical Knowledge Hub

Cornell Biomedical Knowledge Hub (CBKH) CBKG integrates data from 18 publicly available biomedical databases. The current version of CBKG contains a t

44 Dec 21, 2022
A tool for making map images from OpenTTD save games

OpenTTD Surveyor A tool for making map images from OpenTTD save games. This is not part of the main OpenTTD codebase, nor is it ever intended to be pa

Aidan Randle-Conde 9 Feb 15, 2022
[Link]deep_portfolo - Use Reforcemet earg ad Supervsed learg to Optmze portfolo allocato []

rl_portfolio This Repository uses Reinforcement Learning and Supervised learning to Optimize portfolio allocation. The goal is to make profitable agen

Deepender Singla 165 Dec 02, 2022
MPLP: Metapath-Based Label Propagation for Heterogenous Graphs

MPLP: Metapath-Based Label Propagation for Heterogenous Graphs Results on MAG240M Here, we demonstrate the following performance on the MAG240M datase

Qiuying Peng 10 Jun 28, 2022
A hifiasm fork for metagenome assembly using Hifi reads.

hifiasm_meta - de novo metagenome assembler, based on hifiasm, a haplotype-resolved de novo assembler for PacBio Hifi reads.

44 Jul 10, 2022
Contrastive Learning of Image Representations with Cross-Video Cycle-Consistency

Contrastive Learning of Image Representations with Cross-Video Cycle-Consistency This is a official implementation of the CycleContrast introduced in

13 Nov 14, 2022
🎓Automatically Update CV Papers Daily using Github Actions (Update at 12:00 UTC Every Day)

🎓Automatically Update CV Papers Daily using Github Actions (Update at 12:00 UTC Every Day)

Realcat 270 Jan 07, 2023