Detect fake, AI-generated, and Photoshopped images in seconds.
PixelProof is a forensic-grade image analysis toolkit that exposes manipulation through metadata inspection, Error Level Analysis (ELA), noise profiling, steganography detection, and more — all from the command line.
AUTHOR: Kevin Thomas
CREATION DATE: January 19, 2026
UPDATE DATE: February 28, 2026
| Check | What It Finds |
|---|---|
| EXIF Metadata | Missing camera info, stripped timestamps, absent GPS — signs the image didn't come from a real camera |
| Photoshop Traces | Adobe 8BIM resource blocks and scrubbed caption digests embedded in file headers |
| Error Level Analysis | Regions that compress differently from the rest — indicates pasting, cloning, or compositing |
| Noise Consistency | Different noise levels across regions — a hallmark of images stitched from multiple sources |
| Color Channel Correlation | Abnormal R/G/B relationships that can indicate AI generation or heavy processing |
| Edge Density | Unbalanced edge distribution that can reveal composited boundaries |
| JPEG Compression | Quantization table analysis to detect multiple re-saves |
| Steganography Detection | Chi-square, SPA, RS, bit-plane entropy, and JPEG DCT-level (JSteg/F5) analysis with false-positive suppression |
cd pixelproof
python3 -m venv .venv
source .venv/bin/activate
pip install .Run a full forensic analysis (with PDF):
.venv/bin/python deep_analysis.py IMG_0436.JPG --pdf --provenanceWhat you get:
*_ELA.png(Error Level Analysis image)*_REPORT.md(full forensic report)*_REPORT.pdf(PDF report)*_PROVENANCE.json(artifact hash manifest)- Final terminal output with tamper probability, confidence, and fusion verdict
# Clone the repo
git clone https://github.com/mytechnotalent/pixelproof.git
cd pixelproof
# Create a virtual environment
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install
pip install .python pixelproof.py photo.jpgOutput:
============================================================
PIXELPROOF — Quick Forensic Metadata Scan
File: photo.jpg
============================================================
⚠ FLAGS (3)
----------------------------------------
‣ NO CAMERA HARDWARE INFO — no Make, Model, Lens, ISO, etc.
‣ PHOTOSHOP RESOURCE BLOCK detected in file headers
‣ NO TIMESTAMP — real camera photos have date/time
============================================================
🟡 SUSPICIOUS
============================================================
python deep_analysis.py suspect.jpgOr with explicit venv interpreter:
.venv/bin/python deep_analysis.py suspect.jpg --pdfThis runs all forensic checks and saves:
suspect_ELA.png— ELA visualization highlighting manipulated regionssuspect_REPORT.md— full Markdown forensic report
# Hide a message inside an image
python stego.py encode photo.png stego_photo.png -m "secret message"
# Hide with a password (pixel-scatter encryption)
python stego.py encode photo.png stego_photo.png -m "secret" --password s3cret
# Hide with higher capacity (2 bits per channel)
python stego.py encode photo.png stego_photo.png -m "secret" --bits 2
# Hide a file's contents
python stego.py encode photo.png stego_photo.png -f secret.txt
# Decode a hidden message
python stego.py decode stego_photo.png
# Decode with password
python stego.py decode stego_photo.png --password s3cret
# Run full steganography detection scan
python stego.py scan suspect.png# Install PDF dependencies
pip install ".[pdf]"WeasyPrint needs system libraries installed via Homebrew:
brew install pango glib cairo gobject-introspectionOn macOS, the dynamic linker doesn't search Homebrew's library path by default. Set it before running:
export DYLD_LIBRARY_PATH="/opt/homebrew/lib"
python deep_analysis.py suspect.jpg --pdfOr inline on a single command:
DYLD_LIBRARY_PATH="/opt/homebrew/lib" python deep_analysis.py suspect.jpg --pdfTip: Add
export DYLD_LIBRARY_PATH="/opt/homebrew/lib"to your~/.zshrcto make it permanent.
WeasyPrint requires GTK libraries. Install them via MSYS2:
- Download and install MSYS2 from https://www.msys2.org/
- Open the MSYS2 UCRT64 terminal and run:
pacman -S mingw-w64-ucrt-x86_64-pango
- Add the MSYS2 binary path to your system
PATH:C:\msys64\ucrt64\bin - Restart your terminal / IDE, then:
python deep_analysis.py suspect.jpg --pdf
Tip: If you see
cannot load library 'libgobject-2.0-0'or similar, the MSYS2bindirectory is not on yourPATH.
Most distributions have the required libraries available via the system package manager:
# Debian / Ubuntu
sudo apt install libpango-1.0-0 libpangoft2-1.0-0 libpangocairo-1.0-0
# Fedora
sudo dnf install pango
# Arch
sudo pacman -S pangoNo extra environment variables are needed on Linux.
Once the system libraries are in place, add --pdf to any deep analysis:
python deep_analysis.py suspect.jpg --pdfThis produces suspect_REPORT.pdf alongside the Markdown report — one command, one image, full pipeline.
ELA resaves the image at a known JPEG quality and computes the pixel-by-pixel difference. In an unedited photo, error levels are uniform. Edited regions — pasted objects, cloned areas, AI-generated elements — compress differently and appear as bright spots in the ELA output.
Real camera sensors produce consistent noise across the entire frame. When parts of an image come from different sources (compositing, AI inpainting), they carry different noise signatures. PixelProof measures noise variance across a grid and flags inconsistencies.
Every phone and camera writes dozens of EXIF tags — Make, Model, ISO, shutter speed, GPS, timestamps. Fake images typically have none of these, or contain Adobe Photoshop resource blocks (8BIM signatures) proving the image was processed in editing software.
pixelproof/
├── pixelproof.py # Quick metadata + Photoshop scan
├── deep_analysis.py # Full 10-pass forensic analysis
├── stego.py # LSB steganography encode/decode/detect + JPEG DCT analysis
├── generate_pdf.py # Markdown → PDF report generator
├── pyproject.toml # Package config & dependencies
├── LICENSE # MIT
└── README.md # You are here
python pixelproof.py suspect.jpgpython deep_analysis.py suspect.jpg
# Outputs: suspect_ELA.png + suspect_REPORT.mdpython deep_analysis.py suspect.jpg --pdf
# Outputs: suspect_ELA.png + suspect_REPORT.md + suspect_REPORT.pdfpython stego.py scan suspect.pngpython stego.py encode cover.png stego.png -m "Hidden message"
python stego.py decode stego.png- Python 3.9+
- Pillow (installed automatically)
- weasyprint + markdown2 (optional, for PDF generation —
pip install ".[pdf]") - System libraries for PDF (only needed if using
--pdf):- macOS:
brew install pango glib cairo gobject-introspection+ setDYLD_LIBRARY_PATH="/opt/homebrew/lib" - Windows: MSYS2 with
pacman -S mingw-w64-ucrt-x86_64-pango+ addC:\msys64\ucrt64\bintoPATH - Linux:
sudo apt install libpango-1.0-0 libpangoft2-1.0-0 libpangocairo-1.0-0(Debian/Ubuntu)
- macOS:
- Verify photos sent to you — are they real or fabricated?
- Legal/insurance — document forensic evidence of image manipulation
- Journalism — verify source images before publication
- Social media — check if a viral photo is AI-generated or Photoshopped
- Personal safety — detect fake photos of yourself
PRs welcome. If you find a new detection technique or a false positive, open an issue.
MIT — see LICENSE.