Objective: To build a complete system that can analyze a video file and classify it as either "Real" or a "Deepfake." The project leverages deep learning to identify the subtle digital artifacts and inconsistencies that manipulated videos often contain.
- Dataset used: Celeb-DF v1. Contains real and synthesized videos of celebrities interviews. It is available on kaggle (https://www.kaggle.com/datasets/reubensuju/celeb-df-v2).
- Python packages: Tensorflow, Flask, OpenCV, MTCNN, Numpy, Scikit-learn.
- Data Collection: Extract the downloaded dataset into the main project folder
- Preprocessing: Prepocess the data using preprocess_data.py. This file extracts faces from each video from the dataset. Takes maximum 30 frames from each video (No. of frames depends on the length of the video.)
- Building model: Next we will build a model. We will use Xception model, best for detecting subtle atrifacts in deepfake images.
- Training the model: Time to train the model. This step generates a file with an extension (.h5). This is the model we needed to made the decisions.
- Evaluation step: This step involves evaulation of the model. This checks the accuracy of the model.
- Navigate to the webapp directory and run #python app.py
- The webapp will be available at local host (127.0.0.1:5000)
- Upload the video and click on analyse video
- Result will be displayed in 2 mins.