Real-time Deep Fakes

Real-time Deep Fakes

With Deep-Live-Cam

·

2 min read

We've had deep fakes for a couple of years now, but the process is compute and time intensive. We've reached the point where it can be done real-time with some quality trade off.

Check out the hacksider/Deep-Live-Cam for an opensource project that gives you this ability. Things are in flux right now and there are close to 14k stars. I was able to get this setup on a M2 Macbook Air. The install steps in the readme.md are in flux and this is what's worked for me.

Install MiniConda

I prefer Miniconda over Anaconda for this purpose. It will allow you to install various version of python along with the proper libraries.

brew install --cask miniconda
conda update conda

Create and Set the Python Version for the Environment

conda create -n <YOUR_ENVIRONMENT_NAME> python=3.11
conda init zsh
conda activate <YOUR_ENVIRONMENT_NAME>

Install FFmpeg

We need FFmpeg since it's an external dependency.

brew install ffmpeg
brew update && brew upgrade ffmpeg

Clone the Repo

git clone https://github.com/hacksider/Deep-Live-Cam.git

Create Virtual Environment

We setup a virtual environment separate from Miniconda

cd Deep-Live-Cam
python3 -m venv .venv
source ./venv/bin/activate

Install the Python Dependencies

pip install -r requirements.txt

I didn't have to run some of the steps such as:

pip uninstall onnxruntime onnxruntime-silicon
pip install onnxruntime-silicon==1.13.1

Run

python run.py --execution-provider coreml --execution-threads 4

Try tweaking the options such as execution-threads and execution-provider. I tried cpu and a separate fork that has enabled gpu.

For slow performance on M1/M2 Macbooks:

https://github.com/hacksider/Deep-Live-Cam/issues/134

Profit

Summary

It's been fun deep faking team members. No hair replication, yet, which is why a hoodie or wigs are key. Combine this with real-time voice cloning and passthrough to Slack/Teams/Zoom video calls and you have a good time on your hands... or the next phase of social engineering.

We'll continue to see performance and quality advancements in the next few days/weeks as the community is contributing.

Valar Morghulis;Valar Dohaeris

References