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)
[NeurIPS 2021] PyTorch Code for Accelerating Robotic Reinforcement Learning with Parameterized Action Primitives

Robot Action Primitives (RAPS) This repository is the official implementation of Accelerating Robotic Reinforcement Learning via Parameterized Action

Murtaza Dalal 55 Dec 27, 2022
Geometric Deep Learning Extension Library for PyTorch

Documentation | Paper | Colab Notebooks | External Resources | OGB Examples PyTorch Geometric (PyG) is a geometric deep learning extension library for

Matthias Fey 16.5k Jan 08, 2023
Code + pre-trained models for the paper Keeping Your Eye on the Ball Trajectory Attention in Video Transformers

Motionformer This is an official pytorch implementation of paper Keeping Your Eye on the Ball: Trajectory Attention in Video Transformers. In this rep

Facebook Research 192 Dec 23, 2022
Pipeline code for Sequential-GAM(Genome Architecture Mapping).

Sequential-GAM Pipeline code for Sequential-GAM(Genome Architecture Mapping). mapping whole_preprocess.sh include the whole processing of mapping. usa

3 Nov 03, 2022
Film review classification

Film review classification Решение задачи классификации отзывов на фильмы на положительные и отрицательные с помощью рекуррентных нейронных сетей 1. З

Nikita Dukin 3 Jan 21, 2022
Locally cache assets that are normally streamed in POPULATION: ONE

Population One Localizer This is no longer needed as of the build shipped on 03/03/22, thank you bigbox :) Locally cache assets that are normally stre

Ahman Woods 2 Mar 04, 2022
A self-supervised learning framework for audio-visual speech

AV-HuBERT (Audio-Visual Hidden Unit BERT) Learning Audio-Visual Speech Representation by Masked Multimodal Cluster Prediction Robust Self-Supervised A

Meta Research 431 Jan 07, 2023
This is the code for our KILT leaderboard submission to the T-REx and zsRE tasks. It includes code for training a DPR model then continuing training with RAG.

KGI (Knowledge Graph Induction) for slot filling This is the code for our KILT leaderboard submission to the T-REx and zsRE tasks. It includes code fo

International Business Machines 72 Jan 06, 2023
A PyTorch Implementation of Single Shot MultiBox Detector

SSD: Single Shot MultiBox Object Detector, in PyTorch A PyTorch implementation of Single Shot MultiBox Detector from the 2016 paper by Wei Liu, Dragom

Max deGroot 4.8k Jan 07, 2023
Codes and pretrained weights for winning submission of 2021 Brain Tumor Segmentation (BraTS) Challenge

Winning submission to the 2021 Brain Tumor Segmentation Challenge This repo contains the codes and pretrained weights for the winning submission to th

94 Dec 28, 2022
This repository is the official implementation of Using Time-Series Privileged Information for Provably Efficient Learning of Prediction Models

Using Time-Series Privileged Information for Provably Efficient Learning of Prediction Models Link to paper Abstract We study prediction of future out

Rickard Karlsson 2 Aug 19, 2022
Fast Neural Style for Image Style Transform by Pytorch

FastNeuralStyle by Pytorch Fast Neural Style for Image Style Transform by Pytorch This is famous Fast Neural Style of Paper Perceptual Losses for Real

Bengxy 81 Sep 03, 2022
Research Artifact of USENIX Security 2022 Paper: Automated Side Channel Analysis of Media Software with Manifold Learning

Automated Side Channel Analysis of Media Software with Manifold Learning Official implementation of USENIX Security 2022 paper: Automated Side Channel

Yuanyuan Yuan 175 Jan 07, 2023
Official implementation for paper: Feature-Style Encoder for Style-Based GAN Inversion

Feature-Style Encoder for Style-Based GAN Inversion Official implementation for paper: Feature-Style Encoder for Style-Based GAN Inversion. Code will

InterDigital 63 Jan 03, 2023
BBB streaming without Xorg and Pulseaudio and Chromium and other nonsense (heavily WIP)

BBB Streamer NG? Makes a conference like this... ...streamable like this! I also recorded a small video showing the basic features: https://www.youtub

Lukas Schauer 60 Oct 21, 2022
The implemention of Video Depth Estimation by Fusing Flow-to-Depth Proposals

Flow-to-depth (FDNet) video-depth-estimation This is the implementation of paper Video Depth Estimation by Fusing Flow-to-Depth Proposals Jiaxin Xie,

32 Jun 14, 2022
Toontown House CT Edition

Toontown House: Classic Toontown House Classic source that should just work. ❓ W

Open Source Toontown Servers 5 Jan 09, 2022
Improving the robustness and performance of biomedical NLP models through adversarial training

RobustBioNLP Improving the robustness and performance of biomedical NLP models through adversarial training In this repository you can find suppliment

Milad Moradi 3 Sep 20, 2022
Make differentially private training of transformers easy for everyone

private-transformers This codebase facilitates fast experimentation of differentially private training of Hugging Face transformers. What is this? Why

Xuechen Li 73 Dec 28, 2022
Code repository for "Reducing Underflow in Mixed Precision Training by Gradient Scaling" presented at IJCAI '20

Reducing Underflow in Mixed Precision Training by Gradient Scaling This project implements the gradient scaling method to improve the performance of m

Ruizhe Zhao 5 Apr 14, 2022