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)
Code for the paper "Reinforced Active Learning for Image Segmentation"

Reinforced Active Learning for Image Segmentation (RALIS) Code for the paper Reinforced Active Learning for Image Segmentation Dependencies python 3.6

Arantxa Casanova 79 Dec 19, 2022
a reimplementation of Holistically-Nested Edge Detection in PyTorch

pytorch-hed This is a personal reimplementation of Holistically-Nested Edge Detection [1] using PyTorch. Should you be making use of this work, please

Simon Niklaus 375 Dec 06, 2022
Multi-Modal Machine Learning toolkit based on PaddlePaddle.

简体中文 | English PaddleMM 简介 飞桨多模态学习工具包 PaddleMM 旨在于提供模态联合学习和跨模态学习算法模型库,为处理图片文本等多模态数据提供高效的解决方案,助力多模态学习应用落地。 近期更新 2022.1.5 发布 PaddleMM 初始版本 v1.0 特性 丰富的任务

njustkmg 520 Dec 28, 2022
Deeprl - Standard DQN and dueling network for simple games

DeepRL This code implements the standard deep Q-learning and dueling network with experience replay (memory buffer) for playing simple games. DQN algo

Yao Zhou 6 Apr 12, 2020
PyTorch implementation of SQN based on CloserLook3D's encoder

SQN_pytorch This repo is an implementation of Semantic Query Network (SQN) using CloserLook3D's encoder in Pytorch. For TensorFlow implementation, che

PointCloudYC 1 Oct 21, 2021
BasicNeuralNetwork - This project looks over the basic structure of a neural network and how machine learning training algorithms work

BasicNeuralNetwork - This project looks over the basic structure of a neural network and how machine learning training algorithms work. For this project, I used the sigmoid function as an activation

Manas Bommakanti 1 Jan 22, 2022
Regularizing Nighttime Weirdness: Efficient Self-supervised Monocular Depth Estimation in the Dark (ICCV 2021)

Regularizing Nighttime Weirdness: Efficient Self-supervised Monocular Depth Estimation in the Dark (ICCV 2021) Kun Wang, Zhenyu Zhang, Zhiqiang Yan, X

kunwang 66 Nov 24, 2022
This is an example of object detection on Micro bacterium tuberculosis using Mask-RCNN

Mask-RCNN on Mycobacterium tuberculosis This is an example of object detection on Mycobacterium Tuberculosis using Mask RCNN. Implement of Mask R-CNN

Jun-En Ding 1 Sep 16, 2021
A Deep Learning Framework for Neural Derivative Hedging

NNHedge NNHedge is a PyTorch based framework for Neural Derivative Hedging. The following repository was implemented to ease the experiments of our pa

GUIJIN SON 17 Nov 14, 2022
buildseg is a building extraction plugin of QGIS based on PaddlePaddle.

buildseg buildseg is a Building Extraction plugin for QGIS based on PaddlePaddle. How to use Download and install QGIS and clone the repo : git clone

39 Dec 09, 2022
This repository focus on Image Captioning & Video Captioning & Seq-to-Seq Learning & NLP

Awesome-Visual-Captioning Table of Contents ACL-2021 CVPR-2021 AAAI-2021 ACMMM-2020 NeurIPS-2020 ECCV-2020 CVPR-2020 ACL-2020 AAAI-2020 ACL-2019 NeurI

Ziqi Zhang 362 Jan 03, 2023
Official repository for "Action-Based Conversations Dataset: A Corpus for Building More In-Depth Task-Oriented Dialogue Systems"

Action-Based Conversations Dataset (ABCD) This respository contains the code and data for ABCD (Chen et al., 2021) Introduction Whereas existing goal-

ASAPP Research 49 Oct 09, 2022
Colab notebook for openai/glide-text2im.

GLIDE text2im on Colab This repository provides a Colab notebook to produce images conditioned on text prompts with GLIDE [1]. Usage Run text2im.ipynb

Wok 19 Oct 19, 2022
An experiment to bait a generalized frontrunning MEV bot

Honeypot 🍯 A simple experiment that: Creates a honeypot contract Baits a generalized fronturnning bot with a unique transaction Analyze bot behaviour

0x1355 14 Nov 24, 2022
Misc YOLOL scripts for use in the Starbase space sandbox videogame

starbase-misc Misc YOLOL scripts for use in the Starbase space sandbox videogame. Each directory contains standalone YOLOL scripts. They don't really

4 Oct 17, 2021
Tensorflow AffordanceNet and AffContext implementations

AffordanceNet and AffContext This is tensorflow AffordanceNet and AffContext implementations. Both are implemented and tested with tensorflow 2.3. The

Beatriz Pérez 6 Dec 01, 2022
Taking A Closer Look at Domain Shift: Category-level Adversaries for Semantics Consistent Domain Adaptation

Taking A Closer Look at Domain Shift: Category-level Adversaries for Semantics Consistent Domain Adaptation (CVPR2019) This is a pytorch implementatio

Yawei Luo 280 Jan 01, 2023
Code for the paper: Sketch Your Own GAN

Sketch Your Own GAN Project | Paper | Youtube | Slides Our method takes in one or a few hand-drawn sketches and customizes an off-the-shelf GAN to mat

677 Dec 28, 2022
This is a library for training and applying sparse fine-tunings with torch and transformers.

This is a library for training and applying sparse fine-tunings with torch and transformers. Please refer to our paper Composable Sparse Fine-Tuning f

Cambridge Language Technology Lab 37 Dec 30, 2022
Learning Energy-Based Models by Diffusion Recovery Likelihood

Learning Energy-Based Models by Diffusion Recovery Likelihood Ruiqi Gao, Yang Song, Ben Poole, Ying Nian Wu, Diederik P. Kingma Paper: https://arxiv.o

Ruiqi Gao 41 Nov 22, 2022