Tue. Mar 31st, 2020


Get Things Done

Deepfakes on Macintosh(needs editing)

DeepLearning series Ep 5 : DeepFakes on Macintosh Catalina CPU ( 13 inch MacBook Pro 2013)

Install Amphetamine from
this helps from keeping the mac from sleeping

Download and install Anaconda python 3.7 from

Download DeepFaceLab from
and extract its content to Documents/deepfakes/DeepFaceLab

Download DeepFaceLab from and extract the conetents of Deepfacelab-master zip file to

Commands used:

Command #base-directory
cd Documents/deepfakes/DeepFaceLab

Command #1
conda create -n deepfakes python=3.6

Command #2
conda activate deepfakes

Command #3
pip install -r requirements-cpu.txt

Command #4
conda install pytorch torchvision -c soumith

Command #bash_profile_edit
nano ~/.bash_profile

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

Command #source_bash_profile
source ~/.bash_profile

Command #5 : Extract data_src frames from Video
python main.py videoed extract-video --input-file WORKSPACE/data_src.mp4 --output-dir WORKSPACE/data_src

Command #6 : Extract data_dst frames from Video
python main.py videoed extract-video --input-file WORKSPACE/data_dst.mp4 --output-dir WORKSPACE/data_dst

Command #7 : Extract faces from data_src video
python main.py extract --input-dir WORKSPACE/data_src --output-dir WORKSPACE/data_src/aligned --detector mt --cpu-only

Command #8 : Extract faces from data_src video
python main.py extract --input-dir WORKSPACE/data_dst --output-dir WORKSPACE/data_dst/aligned --detector mt --cpu-only

Clear the extracted faces which arent clear enough

Command #9 : Train the model using the extracted images
python main.py train --training-data-src-dir WORKSPACE/data_src/aligned --training-data-dst-dir WORKSPACE/data_dst/aligned --model-dir WORKSPACE/model --model DF --cpu-only

Command #10 : Swap the faces from data_dst videos frames
python main.py convert --input-dir WORKSPACE/data_dst --output-dir WORKSPACE/data_dst/merged --aligned-dir WORKSPACE/data_dst/aligned --model-dir WORKSPACE/model --model DF --cpu-only

Command #11 : Convert the frames to video
python main.py videoed video-from-sequence --input-dir WORKSPACE/data_dst/merged --output-file WORKSPACE/result.mp4 --reference-file WORKSPACE/data_dst.*

links that helped me in the process

1,253 total views, 24 views today

You may have missed