Deepfake Detection using Deep Learning Code Walkthrough (Part 1)

Abhijit Jadhav
2 min readMay 12, 2022

Deepfakes are indistinguishable human synthesized images created using deep learning algorithms. In simple terms, we can say that deepfakes are morphed videos that are mostly created for a bad cause.

The deepfakes are created using different deeplearning-based tools like Faceswap, Faceit, etc.

FaceSwap deepfake

The main purpose of creating deepfakes

  • may be to spread fake news are create hoaxes around the audience
  • it also may be to pretend like someone else and do a financial fraud.
  • It may be used to slander the reputation of the famous personality like celebrity or politician by creating there unusual videos and publishing it over the internet.

Today we will be looking at the code I have developed to detect the deepfakes using CNN for feature extraction and LSTM temporal analysis. You can find the source code here.

We will be dividing the code into three parts.

  • In the first part, we take look at the Pre-processing stage of the model. In this stage, we will load the dataset, Split the video into frames, crop the face from each frame, and save the face-cropped video.

--

--

Abhijit Jadhav

4X AWS Certified Developer and AI Enthusiast love to build latency-sensitive scalable applications with the latest tech stack. Tech Skills - AWS, Java, and AI