Faking The News Deep Fake Lab
Faking the News
19 Sep 2018
In last weeks class we did a quick tutorial on deepfakes. Deepfakes is a portmanteau of deep learning and fakes. It is a technique which is used to superimpose images and videos. It was originally developed to make realistic celebrity pornographic videos. To create our deepfakes we use some CLI tools to aid in our process.
Steps to produce training data:
- Download video. Youtube-dl is a handy cli tool to download from youtube
- Extract frames from video using ffmpeg
ffmpeg -i clipname -vf fps=framerate -qscale:v 2 "imagename%04d.jpg"
- Crop faces from frames. Use autocrop for expediency
autocrop -i pics -o crop -w 400 -H 400 --facePercent 50
- Clean up undetected faces and bad matches
Pro tip: make sure you are referencing the correct directory paths