This is a college project required for a Machine Learning course.
It is done as teamwork by Alhanouf Almansour, Khloud Alnufaie, Raghad Albosais and Weaam Alghaith.
One of the strong techniques used in creating misinformation has become known recently as "Deepfake". Deepfakes increasingly threaten the privacy of individuals. Furthermore, Deepfakes can distort our perception of the truth and deceive us. The content of an image can shake the world either because it sparks controversy, or discredits someone. An individual may be accused or suspected of a situation that did not actually occur. For example, modifying a person’s expression to appear sad when in reality, they were happy to satisfy a fake narrative. In response, We have used transfer learning strategy to extract features from images, through using pre-trained CNN model, which is VGG16 combined with SVM classifier that is trained using the extracted features provided by VGG16. To illustrate the functionality in the model, we have included production by deployment model.
We Detect fake image using Real and Fake Face Detection dataset from Kaggle. The dataset contains expert-generated high-quality photoshopped face images. The images are composite of different faces, separated by eyes, nose, mouth, or whole face. The full dataset contains 452 MB of faces Inside the parent directory, training_real/training_fake contains real/fake face photos, respectively. In case of fake photos, they have three groups: easy, mid, and hard. We plan to use 500 images with ground truth, split them as 75% training, and 25% test to evaluate models using this.
The image is preprocessed using three image preprocessing techniques (image resize, color space conversion, and normalization).
Next, the image is moved into a pre-trained convolutional neural network (CNN) feature extractor, called VGG16 which extract spatial feature from the image.
After that, the output of the feature extractor is fed as input to the support vector machine (SVM) classifier.
- Libraries:
- Softwares:
- Download (Deepfake detector interface) folder that contain required files to run the interface.
- Unzipe 'Deepfake detector' folder in the 'Deepfake detector interface' folder.
- Put the content of unizped folder (Deepfake detector.pkl) in the 'Deepfake detector interface' folder.
- Run app.py file (in Deepfake detector interface folder) using any Python IED.
- Open the link of the interface and upload image from your device to classify it as fake or real.