remove-ai-watermarks  by wiltodelta

AI watermark and metadata removal tool for images

Created 2 months ago
2,495 stars

Top 18.0% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a command-line interface (CLI) and Python library for comprehensively removing visible and invisible AI-generated watermarks from images. It targets users who need to clean images from various AI models like Gemini, DALL-E, Stable Diffusion, and Midjourney, offering benefits such as enhanced privacy, preservation of artistic integrity, and bypassing automated AI detection systems on social platforms.

How It Works

The tool employs a multi-pronged approach. Visible watermarks, such as Google Gemini's sparkle logo, are removed using a fast, offline reverse alpha blending technique with gradient-masked inpainting for artifact cleanup. Invisible watermarks embedded in pixel or frequency domains (e.g., SynthID, StableSignature, TreeRing) are tackled via a diffusion-based regeneration pipeline, which involves resizing, latent space encoding, controlled denoising, and decoding back to pixels; this process is optimized using SDXL models for effectiveness against newer SynthID versions and requires a GPU for reasonable performance. Additionally, the tool strips AI-related metadata, including C2PA provenance manifests, EXIF tags, XMP labels, and PNG text chunks, while preserving standard image metadata.

Quick Start & Requirements

Installation is recommended via pipx or uv with pipx install git+https://github.com/wiltodelta/remove-ai-watermarks.git or uv tool install git+https://github.com/wiltodelta/remove-ai-watermarks.git. An editable install from the repository requires Python 3.10+. Invisible watermark removal necessitates a GPU (CUDA or MPS) for speed; the base install functions on CPU but is significantly slower. A ~2 GB model is downloaded automatically on the first run for invisible watermark processing. An online demo is available at raiw.cc.

Highlighted Details

  • Supports removal of visible watermarks (Gemini sparkle) and invisible watermarks (SynthID, DWT, steganographic, latent space) from numerous AI models.
  • Strips AI metadata including C2PA, EXIF, XMP ("Made with AI" labels), and PNG text chunks.
  • Features include "Smart Face Protection" to prevent AI distortion of faces and an optional "Analog Humanizer" (film grain, chromatic aberration) to defeat AI image classifiers.
  • Includes a three-stage NCC watermark detection with confidence scoring and supports batch processing of directories.

Maintenance & Community

The project roadmap is tracked, with items like automated SynthID-v2 regression testing and AVIF/HEIF/JPEG-XL metadata limits noted for future work. No specific community channels (e.g., Discord, Slack) or prominent contributors are mentioned in the README.

Licensing & Compatibility

The project is released under the MIT license, which generally permits commercial use and modification. However, the README strongly cautions that using the tool to remove provenance information with intent to deceive may violate various laws, including the EU AI Act and the US COPIED Act.

Limitations & Caveats

Invisible watermark removal is computationally intensive and requires a GPU for practical use. Metadata stripping has limitations for AVIF/HEIF/JPEG-XL formats, where inner EXIF/XMP boxes are not yet scrubbed. The tool does not anonymize server-side generation records, meaning services like Google may still retain links to original watermarked files and associated accounts. Removal of defensive perturbations like Nightshade, Glaze, or PhotoGuard is explicitly out of scope. Users are solely responsible for ensuring their use complies with all applicable laws and platform terms of service.

Health Check
Last Commit

14 hours ago

Responsiveness

Inactive

Pull Requests (30d)
9
Issues (30d)
4
Star History
2,486 stars in the last 30 days

Explore Similar Projects

Starred by Peter Norvig Peter Norvig(Author of "Artificial Intelligence: A Modern Approach"; Research Director at Google).

NanoBananaEditor by markfulton

0.4%
683
Advanced AI image generation and editing platform
Created 8 months ago
Updated 1 week ago
Feedback? Help us improve.