|
Algorithm 1 Deepfake Detection Using Optical Flow Model |
For video V in the dataset
Extract frames from video V.
Pass the frames to MTCNN.
Detect the face in video.
Crop the face.
Export the faces as images.
Pass the frames sequences PWC-Net
Export the optical flow sequence as RGB images.
Prepare the model
Load the model trained on imagnet dataset.
Remove the last classification layers.
Freeze the model and keep the last three layers trainable.
Add dropout layer with rate of 0.2
Add dense layer with softmax.
Train the model
Add reduce learning rate callback.
Add early stopping callback.
Start training the model.
Evaluate the model
|