wiltodelta/remove-ai-watermarks

Remove visible and invisible AI watermarks from images and video, and AI provenance metadata from images, video, and audio. Python library, CLI, and agent skill for SynthID, C2PA, EXIF, IPTC, XMP, and common generative-AI marks.

Overview

remove‑ai‑watermarks is a Python library and command‑line tool that lets you detect and strip AI‑generated provenance signals from media you own. It works on both still images and video files and can:

  • Identify visible vendor watermarks (e.g., Google Gemini sparkle, Doubao, Sora, Veo, etc.).
  • Remove those visible marks by in‑painting the region with OpenCV, MI‑GAN or LaMa.
  • Erase invisible pixel‑level watermarks (SynthID) using diffusion‑based regeneration – a CUDA‑only operation.
  • Strip AI‑related metadata such as C2PA, EXIF, XMP, IPTC, and vendor‑specific tags from image and video containers.
  • Process single files or whole directories, with separate commands for images (identify, visible, metadata, invisible, all) and videos (video identify, video visible, video invisible, video all, video batch).

The project is positioned as a research‑grade, lawful‑use utility for content you have created yourself; it does not target third‑party copyrighted watermarks.


Key Features

Feature What it does Typical command GPU requirement
Provenance detection Scans for known visible marks and embedded AI metadata. remove-ai-watermarks identify img.png No
Visible watermark removal Masks the detected logo and fills it (OpenCV, MI‑GAN, LaMa). remove-ai-watermarks visible img.png -o clean.png No (optional for learned back‑ends)
Invisible (SynthID) removal Regenerates the whole image with a diffusion model to disrupt hidden pixel watermarks. remove-ai-watermarks invisible img.png -o clean.png Yes – CUDA GPU
Metadata stripping Removes C2PA, EXIF, XMP, IPTC, TC260 AIGC tags, etc., without re‑encoding the image/video. remove-ai-watermarks metadata img.png --remove -o clean.png No
Video‑wide support Same capabilities for MP4, MOV, MKV, WebM, AVI, FLV; can also batch‑process folders. remove-ai-watermarks video all input.mp4 -o clean.mp4 Depends on mode (invisible needs GPU)
Extensible extras Optional pip extras install only the parts you need ([visible], [video], [qwen‑zimage], [migan], …). uv tool install "remove-ai-watermarks[visible]" Varies

How to Use It

  1. Install – the base package gives you metadata commands. Add extras for the features you need, e.g.:
    uv tool install remove-ai-watermarks               # metadata only
    uv tool install "remove-ai-watermarks[visible]"   # visible removal
    uv tool install "remove-ai-watermarks[qwen-zimage]"  # invisible removal (CUDA)
    
  2. Run a CLI command – examples:
    # Detect any AI provenance
    remove-ai-watermarks identify photo.jpg
    
    # Remove a visible Gemini watermark and its metadata
    remove-ai-watermarks visible photo.jpg -o clean.jpg
    
    # Strip only the metadata
    remove-ai-watermarks metadata photo.jpg --remove -o clean.jpg
    
    # Remove hidden SynthID watermark (GPU required)
    remove-ai-watermarks invisible photo.jpg -o clean.jpg --force
    
  3. Python API – import the package and call the high‑level functions:
    import remove_ai_watermarks as raiw
    
    # Detect marks
    info = raiw.identify("photo.jpg")
    
    # Remove everything (visible + invisible + metadata)
    result = raiw.remove_all("photo.jpg", "clean.jpg")
    print(result.visible_status, result.invisible_status)
    

Who Might Need This?

  • Content creators who generate images or videos with AI models and want to publish them without the provider’s branding.
  • Researchers studying AI provenance who need a way to cleanly separate the signal from the media for experiments.
  • Developers building pipelines that must deliver “un‑watermarked” assets for downstream processing (e.g., training data preparation, archiving).

Limitations & Safety Notes

  • The tool only works on media you own; it explicitly avoids removing watermarks that protect third‑party paid content.
  • Invisible‑watermark removal relies on diffusion models and is lossy – the regenerated image may differ subtly from the original.
  • Some jurisdictions (e.g., China) restrict the removal of AI provenance marks; the repository includes a legal‑safety note.
  • Detection is limited to the list of supported providers (Google, Microsoft, Doubao, Sora, Veo, etc.). New or custom watermarks will not be recognized unless added to the codebase.
  • GPU‑only for invisible removal; CPU fallback is not provided.

License & Community

  • The package is published on PyPI under an open‑source license (see LICENSE).
  • CI status badges, download stats, and a sponsor button are shown in the README.
  • The project maintains a small set of documentation files (docs/cli.md, docs/installation.md, docs/legal-and-safety.md, etc.) and a test suite.

Quick Takeaway

remove-ai-watermarks is a genuine, actively maintained Python library that gives you command‑line and programmatic access to detect and strip both visible and hidden AI provenance signals from images and videos. It is focused on lawful, self‑generated content and offers optional GPU‑accelerated diffusion for the hardest invisible watermarks.

Related

  • Project
  • Project
  • Project
  • Project
  • Project