Capstone Presentation
Capstone Presentation
Detection
By
Jeff Spagnola
Let’s Play a Game
Can you determine which of these images isn’t real?
Let’s Play a Game
Can you determine which of these images isn’t real?
6
2. The Data
Obtaining & Cleaning the Data
The Data
⩥ Dataset of images was obtained
by combining several collections
of real and deepfake images.
8
Scrubbing
⩥ Import the folders of images
⩥ Rescale & Resize images
9
4. Modeling
Convolutional Neural Network
⩥ Image is scanned by a deep
neural network
⩥ Convolutional (Conv2d) layer
analyzes groups of pixels in
sequence
12
Pretrained CNN
⩥ Used a pretrained CNN (Xception)
as a convolutional base
⩥ Able to achieve a 96% Accuracy
⩥ Achieved 96% weighted Recall
13
Ensemble CNN
⩥ Combined the layers of the Tuned
CNN & Pretrained CNN into a new
model.
⩥ Able to achieve a 97% Accuracy
⩥ Achieved 97% weighted Recall
14
Models By the Numbers
Accuracy Weighted Recall Training Time
The pretrained & ensemble CNNs both had higher scores but the training & loading time of
the pretrained CNN makes it a difficult choice for deployment for the Deepfake Detection
App. The ensemble model requires an extra step in preprocessing and does add a bit of
loading time in the final app. This is something we’re still experimenting with. 15
THe App
Test the functionality of the app here.
5. Interpret
What have we learned?
How does this Work?
Earlier, we mentioned the CNN works by scanning layers. Below is
an original image, a single layer of a CNN and multiple layers of a
CNN.
18
Lime Explainer
The Lime Package gives us additional insight into how the model is making
predictions. We can see that the model seems to “notice” the area around the eyes.
19
Results
⩥ Tuned CNN - 92% accuracy
Pretrained - 96% accuracy
Ensemble - 97% accuracy
⩥ Pretrained networks are a valuable
tool, but only when retraining
parameters.
⩥ Ensemble model is fastest & most
accurate, but requires the training
time of previous models.
23
thanks! @spags093
[email protected]
Any questions?
24
Appendix
For those interested in the original datasets that were sampled to
make the dataset for this project, links can be found below:
Additional Resources:
⩥ This Person Does Not Exist
⩥ Generated Photos
25