November 2019
Intermediate to advanced
346 pages
9h 36m
English
In the following steps, we provide a recipe for detecting when an image is produced by deepfake. The code is structured in four parts: Deepfake Recognition.ipynb (main), the mesonet_classifiers.py file defining the MesoNet classifier, the mesonet_weights folder holding the trained weights, and the mesonet_test_images folder containing our test images.
The following code can be found in Deepfake Recognition.ipynb:
from mesonet_classifiers import *from keras.preprocessing.image import ImageDataGenerator
MesoNet_classifier = Meso4()MesoNet_classifier.load("mesonet_weights/Meso4_DF")