Skip to content
All projects
Fake Image Detection Using Deep Learning
Machine Learningcompleted

Fake Image Detection Using Deep Learning

Mar 20233 months
CNN + XAIdidn't just classify — visualized feature maps to confirm it was learning real tampering cues, not dataset quirks

Overview

Manipulated images keep getting easier to make and harder to spot, and that's a trust problem for everyone. This project trains a convolutional neural network to classify images as authentic or tampered, learning the subtle statistical fingerprints that editing leaves behind — the artifacts a human eye glides right past.

Tech Stack

backend
PythonTensorFlowKeras
other
OpenCVNumPyMatplotlib

Challenges

  • Curating and balancing a dataset of genuine and manipulated images worth training on.
  • Designing a network that catches subtle manipulations, not just obvious splices.
  • Avoiding overfitting so it generalizes beyond the manipulation types it trained on.
  • Keeping accuracy high while keeping false positives low enough to be useful.

Solution

A deep CNN built with TensorFlow and Keras trains on a mix of real and manipulated images, with OpenCV pre-processing and data augmentation for robustness. I validated with cross-validation, tested on unseen data, and visualized feature maps and predictions in Jupyter — to understand what the model was keying on instead of treating it as a black box.

Outcome

The classifier reached strong accuracy distinguishing manipulated images, and — just as important — the feature-map analysis showed it was learning genuine tampering cues, pointing toward real uses in digital forensics and platform moderation rather than a number that only holds on one dataset.

What I'd do differently

Generalization is the hard truth here: a model trained on one manipulation style gets fooled by the next. I'd train on a much broader, more modern dataset (including GAN- and diffusion-generated fakes), add frequency-domain features that survive recompression, and report performance per manipulation type instead of one headline accuracy.

Built with

PythonTensorFlowKerasOpenCVNumPyMatplotlibJupyter Notebook