{"slug": "remove-ai-watermarks", "title": "Remove AI Watermarks", "summary": "Tool that removes both visible and invisible AI watermarks from images generated by models like Google Gemini, ChatGPT, and Midjourney. It strips metadata such as SynthID, C2PA credentials, and EXIF labels, and offers features like batch processing and an \"Analog Humanizer\" to bypass AI image classifiers. The tool is available as a command-line interface or through a free web service at raiw.cc.", "body_md": "Remove **visible** and **invisible** AI watermarks from images generated by Google Gemini (Nano Banana), ChatGPT / DALL-E, Stable Diffusion, Adobe Firefly, Midjourney, and other AI models.\n\nStrips SynthID, C2PA Content Credentials, EXIF/XMP \"Made with AI\" labels, and visible sparkle overlays — all in one command.\n\n**Visible watermark removal**— Gemini / Nano Banana sparkle logo via reverse alpha blending (fast, offline, deterministic)** Invisible watermark removal**— SynthID, StableSignature, TreeRing via diffusion-based regeneration** AI metadata stripping**— EXIF, PNG text chunks, C2PA provenance manifests (PNG / JPEG / AVIF / HEIF / JPEG-XL), XMP DigitalSourceType**\"Made with AI\" label removal**— removes the metadata that triggers AI labels on Instagram, Facebook, X (Twitter)** Analog Humanizer**— film grain and chromatic aberration to bypass AI image classifiers** Smart Face Protection**— automatic extraction and blending of human faces to prevent AI distortion** Batch processing**— process entire directories** Detection**— three-stage NCC watermark detection with confidence scoring\n\nTry it online— don't want to install anything? Use[raiw.cc], a free web service powered by this library.\n\n| Before (Watermarked) | After (Cleaned) |\n|---|---|\n\n| AI model | Visible watermark | Invisible watermark | Metadata | Our approach |\n|---|---|---|---|---|\nGoogle Gemini / Nano Banana / Gemini 3 Pro |\n✅ Sparkle logo | ✅ SynthID v1 + v2 (default SDXL pipeline at native ~1024 px) | ✅ C2PA + EXIF | Alpha reversal + diffusion + metadata strip |\nOpenAI DALL-E 3 / ChatGPT |\n— | — | ✅ C2PA manifest | Metadata strip |\nOpenAI ChatGPT Images 2.0 (gpt-image-2) |\n— | ✅ C2PA manifest (verified) | Diffusion regeneration + metadata strip | |\nStable Diffusion (AUTOMATIC1111, ComfyUI) |\n— | ✅ DWT / steganographic | ✅ PNG text chunks | Diffusion regeneration + metadata strip |\nAdobe Firefly |\n— | — | ✅ Content Credentials (C2PA) | Metadata strip |\nMidjourney |\n— | — | ✅ EXIF + XMP (prompt, model, seed) | Metadata strip |\nStableSignature (Meta) |\n— | ✅ In-model watermark | — | Diffusion regeneration |\nTreeRing |\n— | ✅ Latent space watermark | — | Diffusion regeneration |\n\nVisible watermarks (logo overlays) are currently used only by Google Gemini / Nano Banana. Other services rely on invisible watermarks and/or metadata. Our diffusion-based regeneration works against any invisible watermark in pixel or frequency domain.\n\nGoogle Gemini (internally codenamed **Nano Banana**) adds a visible sparkle logo to generated images using alpha blending:\n\n```\nwatermarked = α × logo + (1 − α) × original\n```\n\nWe reverse this with a known alpha map (extracted from Gemini / Nano Banana output on a pure-black background):\n\n```\noriginal = (watermarked − α × logo) / (1 − α)\n```\n\nA three-stage NCC (Normalized Cross-Correlation) detector finds the watermark position and scale dynamically, so it works even if the image was resized or cropped. After removal, residual sparkle-edge artifacts are cleaned via gradient-masked inpainting.\n\n**Speed**: ~0.05s per image. No GPU needed.\n\nGoogle embeds **SynthID** into every image generated by Gemini / Nano Banana. Other AI services use StableSignature, TreeRing, and similar schemes. These imperceptible frequency-domain patterns survive cropping, resizing, and JPEG compression.\n\nThe removal pipeline (default profile, SDXL):\n\n```\nimage → resize to ~1024px (SDXL native) → encode to latent space (VAE)\n      → add controlled noise (forward diffusion)\n      → denoise (reverse diffusion, ~50 steps at strength 0.05)\n      → decode back to pixels (VAE) → upscale to original resolution\n```\n\nSDXL is the default since May 2026: empirically defeats SynthID v2 on Gemini 3 Pro outputs, where the older SD-1.5 pipeline at 768 px did not. The SD-1.5 path was removed once it was verified not to handle v2.\n\n**Face Protection**: before diffusion, YOLO detects people in the image and extracts them. After diffusion, the original faces are blended back with a soft elliptical mask to prevent AI distortion of facial features.\n\n**Analog Humanizer**: optional film grain and chromatic aberration injection that makes the output indistinguishable from a photo of a screen, defeating AI-generated image classifiers.\n\nAI tools embed generation metadata that social platforms use to show \"Made with AI\" labels:\n\n**EXIF tags**— prompt, seed, model hash, sampler settings (Stable Diffusion, Midjourney)** XMP DigitalSourceType**—`trainedAlgorithmicMedia`\n\ntag used by Instagram, Facebook, and X (Twitter) to show \"Made with AI\"**PNG text chunks**— ComfyUI workflows, AUTOMATIC1111 parameters** C2PA Content Credentials**— cryptographic provenance manifests from Google Imagen, OpenAI DALL-E, Adobe Firefly\n\nThe cleaner parses each layer, removes AI-related fields, and preserves standard metadata (Author, Copyright, Title).\n\nInstall as an isolated CLI tool — no need to manage virtual environments:\n\n```\n# Using pipx (https://pipx.pypa.io)\npipx install git+https://github.com/wiltodelta/remove-ai-watermarks.git\n\n# Or using uv (https://docs.astral.sh/uv)\nuv tool install git+https://github.com/wiltodelta/remove-ai-watermarks.git\n```\n\nTo update to the latest version:\n\n```\npipx upgrade remove-ai-watermarks\n\n# or\nuv tool upgrade remove-ai-watermarks\n```\n\n**Prerequisites:** Python 3.10+ and `pip`\n\n(or [ uv](https://docs.astral.sh/uv/)).\n\n```\n# 1. Clone the repository\ngit clone https://github.com/wiltodelta/remove-ai-watermarks.git\ncd remove-ai-watermarks\n\n# 2. Install the package in editable mode\npip install -e .\n\n# Or, if you use uv:\nuv pip install -e .\n```\n\nAfter installation the `remove-ai-watermarks`\n\ncommand is available system-wide.\n\nNote: The base install covers visible watermark removal and metadata stripping. For invisible watermark removal (SynthID etc.), install GPU dependencies:\n\n```\npip install -e \".[gpu]\"   # or: uv pip install -e \".[gpu]\"\n```\n\nInvisible removal uses diffusion models and a GPU for reasonable speed.\n\n```\n# On first run, the model (~2 GB) will be downloaded automatically.\n# Device is auto-detected: CUDA (Linux/Windows) > MPS (macOS) > CPU.\n# To force a device: --device cuda / --device mps / --device cpu\n\n# Optional: set a HuggingFace token for gated/private models\ncp .env.example .env\n# Edit .env and set HF_TOKEN=hf_your_token_here\n# Install with dev dependencies (pytest, ruff, pyright)\npip install -e \".[dev]\"\n# Or with uv:\nuv pip install -e \".[dev]\"\n\n# Run tests\npytest\n\n# Run linters\n./maintain.sh\n# Remove all watermarks from a single image (visible + invisible + metadata)\nremove-ai-watermarks all image.png -o clean.png\n\n# Process an entire directory\nremove-ai-watermarks batch ./images/ --mode all\n# Visible watermark only (Gemini / Nano Banana sparkle) — fast, offline\nremove-ai-watermarks visible image.png -o clean.png\n\n# Invisible watermark only (SynthID etc.) — requires GPU\nremove-ai-watermarks invisible image.png -o clean.png --humanize 4.0\n\n# Check / strip AI metadata (C2PA, EXIF, \"Made with AI\" labels)\nremove-ai-watermarks metadata image.png --check\nremove-ai-watermarks metadata image.png --remove\n\n# Batch with a specific mode\nremove-ai-watermarks batch ./images/ --mode visible\npython\nfrom remove_ai_watermarks.gemini_engine import GeminiEngine\nimport cv2\n\nengine = GeminiEngine()\nimage = cv2.imread(\"watermarked.png\")\n\n# Detect\nresult = engine.detect_watermark(image)\nprint(f\"Detected: {result.detected} (confidence: {result.confidence:.1%})\")\n\n# Remove\nclean = engine.remove_watermark(image)\ncv2.imwrite(\"clean.png\", clean)\npython\nfrom remove_ai_watermarks.metadata import has_ai_metadata, remove_ai_metadata\nfrom pathlib import Path\n\nif has_ai_metadata(Path(\"image.png\")):\n    remove_ai_metadata(Path(\"image.png\"), Path(\"clean.png\"))\n```\n\n- Python ≥ 3.10\n**Visible removal / metadata**: CPU only, no GPU required** Invisible removal**: GPU recommended (CUDA or MPS), works on CPU (slow)\n\n**SSL certificate error** (`CERTIFICATE_VERIFY_FAILED`\n\n):\n\n```\n# Install certifi (the tool auto-detects it)\npip install certifi\n\n# macOS only: run the Python certificate installer\n/Applications/Python\\ 3.*/Install\\ Certificates.command\n```\n\n**First run is slow** — this is expected. The tool downloads model weights (~2 GB) on first launch. Subsequent runs use cached models.\n\n[noai-watermark](https://github.com/mertizci/noai-watermark)by mertizci — invisible watermark removal engine[GeminiWatermarkTool](https://github.com/allenk/GeminiWatermarkTool)by Allen Kuo (MIT) — visible watermark removal algorithm[CtrlRegen](https://github.com/yepengliu/CtrlRegen)by Liu et al. (ICLR 2025) — controllable regeneration pipeline- NeuralBleach (MIT) — analog humanizer technique\n\nTracked but not yet implemented:\n\n**SynthID-Image v2 automated regression test**. The default SDXL profile defeats v2 per manual checks against the[Gemini app](https://support.google.com/gemini/answer/16722517)'s \"Verify with SynthID\" feature on a Gemini 3 Pro output (May 2026). An automated end-to-end test would need either programmatic access to the[SynthID Detector portal](https://blog.google/innovation-and-ai/products/google-synthid-ai-content-detector/)(waitlist for media professionals and researchers) or an offline surrogate detector. Open.**AVIF / HEIF / JPEG-XL detection limits**. Removal strips top-level C2PA`uuid`\n\nand JUMBF`jumb`\n\nboxes. EXIF/XMP boxes inside these containers are not yet scrubbed (PNG and JPEG are fully covered).**Video pipeline (**: per-frame inpainting and tracking for Sora 2 dynamic logo, Veo 3.1 badge, Kling, Runway. Separate package, not folded into this repo.`noai-video`\n\n)\n\nWon't fix:\n\n**Nightshade / Glaze / PhotoGuard removal**. These are defensive perturbations used by artists to protect their work from being scraped into AI training sets. Removing them attacks artists, not AI provenance. Out of scope.\n\nWatermarking and provenance for AI-generated content is now regulated in several jurisdictions. The table below summarises the May 2026 status. None of this is legal advice.\n\n| Jurisdiction | Instrument | Status (May 2026) | Relevance |\n|---|---|---|---|\n| EU | AI Act, Article 50(2) | Marking obligations postponed to 2 December 2026 under the December 2025 omnibus agreement. Code of Practice finalising May/June 2026. |\nRemoving mandated provenance markers with intent to deceive may be sanctioned under national implementations. |\n| US (federal) | COPIED Act | Enacted 2025. | Criminalises removal of provenance information with intent to deceive about content origin. The tool itself is lawful; usage may not be. |\n| US (state) | CA AB 2655, TX SB 751, similar | In force. | Content-specific (election deepfakes, sexual deepfakes). Not tool-specific. |\n| China | Deep Synthesis Regulation, 2025 updates | In force. | Mandatory visible label for AI content. Removal is an administrative offence. |\n| UK | Online Safety Act, 2025 transparency extension | In force. | Platform obligations, not user obligations. |\n\nThis tool defends already-distributed AI imagery against automatic detection systems (social-platform \"Made with AI\" labels, third-party classifiers, content-policy filters). It does **not** retroactively anonymise generation.\n\nIn particular, **SynthID-Image v2** (Google, deployed October 2025 with Gemini 3 Pro / Nano Banana Pro / Imagen 4 / Veo) embeds a **136-bit payload** ([arxiv 2510.09263](https://arxiv.org/abs/2510.09263)). The payload is believed to encode a user / session identifier. If the original watermarked file ever passed through a system controlled by the prompt originator (a saved Gemini account history, a screenshot uploaded to a Google product, a backup), Google retains the ability to link that original to the generating account. Stripping the watermark from a copy you possess does not erase Google's server-side record.\n\nUse cases where the threat model fits:\n\n- You generated the image yourself, want to publish it as your own work, and accept the consequences if Google ever publishes their detector logs.\n- You are running a security / robustness evaluation.\n- You are preserving art or historical record against false-positive \"AI-generated\" labels.\n\nUse cases where the threat model **does not** fit:\n\n- Generating an image, expecting that removing the watermark anonymises you to Google. It doesn't.\n- Distributing AI-generated content while claiming human authorship. The watermark is one of several traceability layers.\n\nThis tool is intended for legitimate purposes such as:\n\n- Privacy protection (removing metadata that leaks user account identifiers).\n- Art preservation and fair-use research.\n- Removing false-positive \"Made with AI\" labels from human-edited photographs.\n- Security research and watermark robustness study.\n\nRemoving AI provenance markers to misrepresent AI-generated content as human-created may violate the laws above, the DMCA, and platform terms of service. Users are solely responsible for ensuring their use complies with all applicable laws. The authors do not condone use of this tool for deception, fraud, or any activity that violates applicable laws or regulations.\n\nMIT", "url": "https://wpnews.pro/news/remove-ai-watermarks", "canonical_source": "https://github.com/wiltodelta/remove-ai-watermarks", "published_at": "2026-05-19 22:30:31+00:00", "updated_at": "2026-05-19 23:06:10.560996+00:00", "lang": "en", "topics": ["artificial-intelligence", "cybersecurity", "developer-tools", "products", "research"], "entities": ["Google Gemini", "Nano Banana", "ChatGPT", "DALL-E", "Stable Diffusion", "Adobe Firefly", "Midjourney", "SynthID"], "alternates": {"html": "https://wpnews.pro/news/remove-ai-watermarks", "markdown": "https://wpnews.pro/news/remove-ai-watermarks.md", "text": "https://wpnews.pro/news/remove-ai-watermarks.txt", "jsonld": "https://wpnews.pro/news/remove-ai-watermarks.jsonld"}}