Basics of Image Forensics: Compression Against AIs (doch88.github.io)

🤖 AI Summary
A Fourthline engineer describes using JPEG compression artifacts and Error Level Analysis (ELA) as practical tools in the fight against deepfakes in KYC workflows. The post shows how everyday JPEG compression — which can shrink a 6000×4000 raw image from ~72 MB to ~6 MB by discarding visually subtle information — leaves a consistent “fingerprint” of artifacts across an image. If part of an image is altered (e.g., inpainted by an AI) those local compression traces become inconsistent, which ELA can highlight. ELA is straightforward: recompress the target image at a chosen JPEG quality, compute the pixel-wise difference between the recompressed and original images, and inspect the resulting ELA map. Single-compressed regions produce different residuals than areas that were re-saved or double-compressed, so tampered zones can light up — especially when the manipulated area was saved losslessly (PNG) or at a different JPEG quality. Interpreting ELA requires caution: bright signals also appear in high-contrast features (text, borders), while flat surfaces should be uniform. The author concludes ELA is a useful forensics tool but not a silver bullet; it should be combined with metadata analysis (EXIF), sensor noise (PRNU), PCA-based methods and other techniques for robust deepfake detection.
Loading comments...
loading comments...