real time face swap and one-click video deepfake with only a single image
Real-time face swap and video deepfake with a single click and only a single image.
Retain your original mouth using Mouth Mask
Use different faces on multiple subjects
Watch movies with any face in real-time
Nearly 0% detection!
Please be aware that the installation requires technical skills and is not for beginners. Consider downloading the prebuilt version.
This is more likely to work on your computer but will be slower as it utilizes the CPU.
1. Set up Your Platform
2. Clone the Repository
https://github.com/hacksider/Deep-Live-Cam.git
3. Download the Models
Place these files in the “models” folder.
4. Install Dependencies
We highly recommend using a venv
to avoid issues.
pip install -r requirements.txt
For macOS: Install or upgrade the python-tk
package:
brew install [email protected]
Run: If you don’t have a GPU, you can run Deep-Live-Cam using python run.py
. Note that initial execution will download models (~300MB).
CUDA Execution Provider (Nvidia)
pip uninstall onnxruntime onnxruntime-gpu
pip install onnxruntime-gpu==1.16.3
python run.py --execution-provider cuda
CoreML Execution Provider (Apple Silicon)
pip uninstall onnxruntime onnxruntime-silicon
pip install onnxruntime-silicon==1.13.1
python run.py --execution-provider coreml
CoreML Execution Provider (Apple Legacy)
pip uninstall onnxruntime onnxruntime-coreml
pip install onnxruntime-coreml==1.13.1
python run.py --execution-provider coreml
DirectML Execution Provider (Windows)
pip uninstall onnxruntime onnxruntime-directml
pip install onnxruntime-directml==1.15.1
python run.py --execution-provider directml
OpenVINO™ Execution Provider (Intel)
pip uninstall onnxruntime onnxruntime-openvino
pip install onnxruntime-openvino==1.15.0
python run.py --execution-provider openvino
1. Image/Video Mode
python run.py
.2. Webcam Mode
python run.py
.options:
-h, --help show this help message and exit
-s SOURCE_PATH, --source SOURCE_PATH select a source image
-t TARGET_PATH, --target TARGET_PATH select a target image or video
-o OUTPUT_PATH, --output OUTPUT_PATH select output file or directory
--frame-processor FRAME_PROCESSOR [FRAME_PROCESSOR ...] frame processors (choices: face_swapper, face_enhancer, ...)
--keep-fps keep original fps
--keep-audio keep original audio
--keep-frames keep temporary frames
--many-faces process every face
--map-faces map source target faces
--mouth-mask mask the mouth region
--nsfw-filter filter the NSFW image or video
--video-encoder {libx264,libx265,libvpx-vp9} adjust output video encoder
--video-quality [0-51] adjust output video quality
--live-mirror the live camera display as you see it in the front-facing camera frame
--live-resizable the live camera frame is resizable
--max-memory MAX_MEMORY maximum amount of RAM in GB
--execution-provider {cpu} [{cpu} ...] available execution provider (choices: cpu, ...)
--execution-threads EXECUTION_THREADS number of execution threads
-v, --version show program's version number and exit
Looking for a CLI mode? Using the -s/–source argument will make the run program in cli mode.
We are always open to criticism and are ready to improve, that’s why we didn’t cherry-pick anything.