← all repositories
wiltodelta/remove-ai-watermarks

The watermark eraser AI companies probably wish didn't exist

A Python toolkit that reverse-engineers alpha-blended logos, strips C2PA manifests, and diffuses away invisible fingerprints like SynthID.

3k stars Python Computer VisionData Tooling
remove-ai-watermarks
Velocity · 7d
+40
★ / day
Trend
steady
star history

What it does

remove-ai-watermarks is a CLI and library that scrubs AI-generated images clean: visible sparkle marks from Gemini and Doubao, invisible patterns like SynthID and StableSignature, plus metadata labels (C2PA, EXIF “Made with AI”, XMP provenance). It handles batch jobs across image and video formats, and even offers a paid cloud version at raiw.cc for users without GPUs.

The interesting bit

The visible-mark removal is genuinely clever. Instead of inpainting over watermarks and guessing what lies beneath, it reverse-alpha-blends them: original = (watermarked − α·logo)/(1−α). The alpha maps are solved from controlled black-background captures of each watermark. For Gemini’s sparkle and Doubao’s corner text strip, this recovers the actual underlying pixels rather than hallucinating replacements. A three-stage NCC detector handles scale and crop variations. The invisible-watermark removal is less elegant—just SDXL diffusion regeneration at native resolution, which re-rolls the image enough to break SynthID verification but leaves detectable traces per recent research.

Key highlights

  • Reverse-alpha blending for known visible marks (Gemini sparkle, Doubao “豆包AI生成”, Jimeng “即梦AI”) — ~0.05s, CPU only
  • Universal erase --region for arbitrary logos with cv2 or optional big-LaMa inpainting
  • Diffusion-based regeneration for invisible watermarks (SynthID, StableSignature, TreeRing) — needs local GPU or cloud
  • Metadata stripping across PNG/JPEG/AVIF/HEIF/JPEG-XL, plus MP4/MOV/WebM/MP3/WAV/FLAC/OGG via ffmpeg
  • identify command inventories provenance signals: C2PA issuer, soft-binding vendor, TC260 AIGC labels, embedded gen params, EXIF signatures
  • Smart Face Protection: YOLO-extracts and re-blends human faces post-diffusion to prevent distortion
  • Optional “Analog Humanizer” film grain and chromatic aberration for that “photo of a screen” aesthetic

Caveats

  • Invisible watermark removal is diffusion regeneration, not true forensic cleaning — arXiv:2605.09203 notes these pipelines leave detectable traces
  • SynthID and proprietary soft-binding watermarks (Digimarc, Imatag) have no local decoder; identify reports them by metadata proxy only
  • Legal: some jurisdictions restrict removing AI labels as such; README explicitly disclaims liability for downstream use

Verdict

Worth a look if you need to batch-clean false-positive AI labels from human-edited work, or study watermark robustness. Skip it if you’re seeking undetectable forgery — the authors themselves note the traces left behind, and the legal warnings are unusually prominent for a reason.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.