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)
Owner
null
Video-face-extractor - Video face extractor with Python

Python face extractor Setup Create the srcvideos and faces directories Put your

null 2 Feb 3, 2022
Streaming Anomaly Detection Framework in Python (Outlier Detection for Streaming Data)

Python Streaming Anomaly Detection (PySAD) PySAD is an open-source python framework for anomaly detection on streaming multivariate data. Documentatio

Selim Firat Yilmaz 181 Dec 18, 2022
Python library to receive live stream events like comments and gifts in realtime from TikTok LIVE.

TikTokLive A python library to connect to and read events from TikTok's LIVE service A python library to receive and decode livestream events such as

Isaac Kogan 277 Dec 23, 2022
Real-time Object Detection for Streaming Perception, CVPR 2022

StreamYOLO Real-time Object Detection for Streaming Perception Jinrong Yang, Songtao Liu, Zeming Li, Xiaoping Li, Sun Jian Real-time Object Detection

Jinrong Yang 237 Dec 27, 2022
Real-Time-Student-Attendence-System - Real Time Student Attendence System

Real-Time-Student-Attendence-System The Student Attendance Management System Pro

Rounak Das 1 Feb 15, 2022
Fake videos detection by tracing the source using video hashing retrieval.

Vision Transformer Based Video Hashing Retrieval for Tracing the Source of Fake Videos ??️ ?? Directory Introduction VTL Trace Samples and Acc of Hash

null 56 Dec 22, 2022
my graduation project is about live human face augmentation by projection mapping by using CNN

Live-human-face-expression-augmentation-by-projection my graduation project is about live human face augmentation by projection mapping by using CNN o

null 1 Mar 8, 2022
PyTorch implementation of the Deep SLDA method from our CVPRW-2020 paper "Lifelong Machine Learning with Deep Streaming Linear Discriminant Analysis"

Lifelong Machine Learning with Deep Streaming Linear Discriminant Analysis This is a PyTorch implementation of the Deep Streaming Linear Discriminant

Tyler Hayes 41 Dec 25, 2022
OpenPose: Real-time multi-person keypoint detection library for body, face, hands, and foot estimation

Build Type Linux MacOS Windows Build Status OpenPose has represented the first real-time multi-person system to jointly detect human body, hand, facia

null 25.7k Jan 9, 2023
Jetson Nano-based smart camera system that measures crowd face mask usage in real-time.

MaskCam MaskCam is a prototype reference design for a Jetson Nano-based smart camera system that measures crowd face mask usage in real-time, with all

BDTI 212 Dec 29, 2022
Face recognition system using MTCNN, FACENET, SVM and FAST API to track participants of Big Brother Brasil in real time.

BBB Face Recognizer Face recognition system using MTCNN, FACENET, SVM and FAST API to track participants of Big Brother Brasil in real time. Instalati

Rafael Azevedo 232 Dec 24, 2022
Realtime Face Anti Spoofing with Face Detector based on Deep Learning using Tensorflow/Keras and OpenCV

Realtime Face Anti-Spoofing Detection ?? Realtime Face Anti Spoofing Detection with Face Detector to detect real and fake faces Please star this repo

Prem Kumar 86 Aug 3, 2022
[CVPR 2022] "The Principle of Diversity: Training Stronger Vision Transformers Calls for Reducing All Levels of Redundancy" by Tianlong Chen, Zhenyu Zhang, Yu Cheng, Ahmed Awadallah, Zhangyang Wang

The Principle of Diversity: Training Stronger Vision Transformers Calls for Reducing All Levels of Redundancy Codes for this paper: [CVPR 2022] The Pr

VITA 16 Nov 26, 2022
This program was designed to detect whether someone is wearing a facemask through a live video stream.

This program was designed to detect whether someone is wearing a facemask through a live video stream. A custom lightweight CNN trained with TensorFlow on a public dataset provided by Kaggle is used to detect whether each face detected by the cv2 face detection dnn is wearing a mask

null 0 Apr 2, 2022
Measures input lag without dedicated hardware, performing motion detection on recorded or live video

What is InputLagTimer? This tool can measure input lag by analyzing a video where both the game controller and the game screen can be seen on a webcam

Bruno Gonzalez 4 Aug 18, 2022
Unofficial implementation of "TTNet: Real-time temporal and spatial video analysis of table tennis" (CVPR 2020)

TTNet-Pytorch The implementation for the paper "TTNet: Real-time temporal and spatial video analysis of table tennis" An introduction of the project c

Nguyen Mau Dung 438 Dec 29, 2022
Code for "NeuralRecon: Real-Time Coherent 3D Reconstruction from Monocular Video", CVPR 2021 oral

NeuralRecon: Real-Time Coherent 3D Reconstruction from Monocular Video Project Page | Paper NeuralRecon: Real-Time Coherent 3D Reconstruction from Mon

ZJU3DV 1.4k Dec 30, 2022
MatryODShka: Real-time 6DoF Video View Synthesis using Multi-Sphere Images

Main repo for ECCV 2020 paper MatryODShka: Real-time 6DoF Video View Synthesis using Multi-Sphere Images. visual.cs.brown.edu/matryodshka

Brown University Visual Computing Group 75 Dec 13, 2022
RIFE: Real-Time Intermediate Flow Estimation for Video Frame Interpolation

RIFE RIFE: Real-Time Intermediate Flow Estimation for Video Frame Interpolation Ported from https://github.com/hzwer/arXiv2020-RIFE Dependencies NumPy

null 49 Jan 7, 2023