Menu

How I Built a Lightweight Image Forensics Engine in Python (And Why Naive ELA Fails)
📰

How I Built a Lightweight Image Forensics Engine in Python (And Why Naive ELA Fails)

DEV Community: computervision·Shaheer Ul Hassan·2 days ago
#iFCpN5WT
Reading 0:00
15s threshold

A vendor sends you an invoice. Or an applicant submits a bank statement. Visually, everything looks crisp and authentic. But someone opened Photoshop, edited an account number, or pasted a signature from a different document.

To the human eye, sub-pixel splices are virtually invisible. But to JPEG compression math, they scream.

Over the past few months, I built and open-sourced deeptrace-ela — a zero-GPU, NIST-grade Error Level Analysis (ELA) forensics engine in Python.

Here is how the math works, why naive ELA implementations create hundreds of false alarms, and how we solved it in under 100ms on a standard CPU.

What is Error Level Analysis (ELA)?

Every time a lossy JPEG image is saved, the discrete cosine transform (DCT) quantizes high-frequency color data into 8x8 pixel blocks.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.