gitmyhub

reverse-SynthID

Python ★ 4.5k updated 2mo ago

reverse engineering Gemini's SynthID detection

A research project that reverse-engineers Google SynthID watermarks in Gemini-generated images using signal processing, building a 90%-accurate detector and a bypass pipeline that removes the watermark while keeping the image visually identical.

PythonNumPysignal processingsetup: hardcomplexity 4/5

reverse-SynthID is a research project that reverse-engineers the invisible watermark Google embeds into images generated by Gemini, called SynthID. The goal is to understand how that watermark works and whether it can be detected or removed using only signal processing — no access to Google's proprietary encoder or decoder.

The watermark is embedded as an imperceptible pattern in pixel values, specifically as a carrier frequency structure in the image's high-frequency range. The project discovered this structure through spectral analysis (examining an image's frequency content, similar to how audio engineers analyze sound) and used that knowledge to build three things: a detector that identifies SynthID-watermarked images with 90% accuracy; a V3 bypass that reduces carrier energy by 75% and phase coherence by 91% while maintaining 43+ dB PSNR (a measure of image quality — higher means closer to the original); and a V4 generalization with separate profiles for two Gemini model variants, built from cross-color phase consensus to isolate watermark signals from image content.

The culmination is a Round 06 all-in-one attack pipeline with seven stages — VAE re-generation, elastic deformation, squeeze, color adjustment, and JPEG compression — that defeats the SynthID detector on both tested Gemini models while producing visually lossless output.

The project is Python-based and described as research. The full README is longer than what was provided.

Where it fits