← 返回 Skills 市场
h1bomb

Gemini Watermark

作者 h1bomb · GitHub ↗ · v2.1.0
cross-platform ✓ 安全检测通过
351
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install gemini-watermark
功能描述
Remove visible Gemini AI watermarks from images via reverse alpha blending. Use for cleaning Gemini-generated images, removing the star/sparkle logo watermar...
使用说明 (SKILL.md)

Gemini Watermark Remover

Remove the visible Gemini AI watermark (star/sparkle logo) from generated images using mathematically accurate reverse alpha blending.

Fully offline — pure Python, no external binary downloads, no network access.

When to Use

  • Remove the Gemini watermark from AI-generated images
  • Batch process a directory of Gemini-generated images
  • Clean images before publishing or sharing
  • Automate watermark removal in pipelines

Quick Start

Install Dependencies (one-time)

pip install Pillow numpy

# Recommended: use uv for faster, isolated installs
uv pip install Pillow numpy

Requires: Python ≥ 3.9. No Rust toolchain, no compiled binaries, no downloads.

Basic Usage

# Single image (auto-detect watermark, save as photo_cleaned.jpg)
python3 scripts/remove_watermark.py photo.jpg

# Specify output path
python3 scripts/remove_watermark.py photo.jpg -o clean_photo.jpg

# Batch process directory
python3 scripts/remove_watermark.py ./input_dir -o ./output_dir

# Force removal without detection
python3 scripts/remove_watermark.py photo.jpg -o clean.jpg --force

How It Works

Gemini adds a semi-transparent white star/sparkle logo to generated images using alpha blending:

watermarked = alpha * 255 + (1 - alpha) * original

This tool reverses the equation to recover the original pixels:

original = (watermarked - alpha * 255) / (1 - alpha)

The alpha map (watermark transparency pattern) is generated mathematically as a 4-pointed star (central Gaussian core + 4 elongated cardinal rays) at two sizes:

  • 48×48 with 32 px margin — images where either dimension ≤ 1024 px
  • 96×96 with 64 px margin — images where both dimensions > 1024 px

For improved accuracy you can supply your own alpha map derived from a background capture of the Gemini watermark on a white background (--alpha-map).

Detection

Before removal, a three-stage algorithm checks whether a watermark is present:

  1. Spatial NCC (50% weight) — normalised cross-correlation with the alpha map
  2. Gradient NCC (30% weight) — edge signature matching via Sobel operators
  3. Variance Analysis (20% weight) — texture dampening detection

Images without detected watermarks are automatically skipped.

CLI Parameters

Parameter Short Default Description
input (required) Input image file or directory
--output -o {name}_cleaned.{ext} Output file or directory
--force -f false Skip detection, process unconditionally
--threshold -t 0.35 Detection confidence threshold (0.0–1.0)
--force-small false Force 48×48 watermark size
--force-large false Force 96×96 watermark size
--alpha-map (built-in) Custom grayscale alpha map image
--verbose -v false Enable detailed output
--quiet -q false Suppress all non-error output

Supported Formats

Format Read Write
JPEG (.jpg, .jpeg) Yes Yes (quality 100)
PNG (.png) Yes Yes
WebP (.webp) Yes Yes
BMP (.bmp) Yes Yes

Usage Examples

# Verbose output (shows detection confidence, watermark coordinates)
python3 scripts/remove_watermark.py photo.png -o clean.png -v

# Lower detection threshold (more sensitive)
python3 scripts/remove_watermark.py photo.jpg -t 0.15

# Force large watermark size regardless of image dimensions
python3 scripts/remove_watermark.py photo.jpg --force-large -o clean.jpg

# Batch process, quiet mode
python3 scripts/remove_watermark.py ./gemini_images/ -o ./cleaned/ -q

# Supply a custom alpha map for higher accuracy
python3 scripts/remove_watermark.py photo.jpg --alpha-map my_alpha.png

Deriving a Custom Alpha Map

For pixel-perfect removal, capture the Gemini watermark on a pure white background and compute:

alpha(x, y) = max(R, G, B) / 255

Save the result as a grayscale PNG and pass it via --alpha-map.

Output

  • Single file — saves to -o path, or {name}_cleaned.{ext} by default
  • Directory — saves all processed images to the output directory
  • Skipped images — images without detected watermarks are not modified (unless --force)
  • Exit code — 0 on success, 1 if any image fails

Troubleshooting

"No watermark detected" on a watermarked image

  • Try lowering the threshold: -t 0.1
  • Or bypass detection entirely: --force
  • Consider supplying a custom alpha map for your watermark variant

Image looks distorted after removal

  • The image may not have a Gemini watermark. Use detection (avoid --force)
  • Try --force-small or --force-large to match the correct size
  • Supply a custom alpha map for better precision

"Image too small" warning

The image dimensions are smaller than the watermark region. This typically means the image does not have a Gemini watermark.

ModuleNotFoundError: Pillow or numpy

pip install Pillow numpy
# or
uv pip install Pillow numpy

Limitations

  • Visible watermark only — this tool removes the visible star/sparkle logo watermark
  • Cannot remove SynthID — Google's invisible watermark (SynthID) is embedded at the pixel level during generation and cannot be reversed
  • Fixed position only — handles watermarks in the standard bottom-right position only
  • Built-in alpha map is approximate — use --alpha-map with a captured reference for exact results
安全使用建议
This skill appears internally consistent and purely offline, but consider these practical points before installing: (1) review the included Python file yourself or run it in a sandbox before processing sensitive systems; (2) install Pillow and numpy from PyPI and keep package sources trusted; (3) operate on copies of images (the tool writes outputs and can overwrite if directed); (4) removing visible watermarks may violate terms of use, copyright, or platform policies—ensure you have rights to modify the images; (5) if you need stronger assurance, run the script in an isolated environment (container/VM) and inspect the code for any modifications before using it on bulk or sensitive data.
功能分析
Type: OpenClaw Skill Name: gemini-watermark Version: 2.1.0 The skill bundle is benign. The `SKILL.md` provides clear, legitimate instructions for removing watermarks and contains no prompt injection attempts against the AI agent. The `scripts/remove_watermark.py` code adheres to its stated purpose, performing image processing locally without network access, external binary execution, or attempts to access sensitive system resources or credentials. While the `--alpha-map` argument allows specifying an arbitrary file path, the script only attempts to load it as an image using Pillow, which is a standard and expected behavior for a custom input, and does not process its content in any malicious way (e.g., exfiltration or execution).
能力评估
Purpose & Capability
Name/description (remove Gemini AI visible watermark) match the delivered code and docs. The included Python script implements reverse alpha blending and detection, and no unrelated binaries, credentials, or services are requested.
Instruction Scope
SKILL.md instructs only local image processing, dependency installation (Pillow, numpy), and optional local alpha-map use. Runtime instructions do not ask the agent to read unrelated system files, environment variables, or to contact external endpoints.
Install Mechanism
No install spec is provided (instruction-only install). The runtime is pure Python with standard PyPI dependencies; no downloads from untrusted URLs or extracted archives are performed by the skill itself.
Credentials
The skill declares no required environment variables, config paths, or credentials and the code does not access environment secrets. Dependency requirements (Pillow, numpy) are proportionate to image processing.
Persistence & Privilege
always is false and the skill does not request persistent system-wide changes or modify other skills. It only reads input files, optional local alpha maps, and writes output images to user-specified paths.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gemini-watermark
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gemini-watermark 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.1.0
- New version 2.1.0 introduces complete standalone documentation in SKILL.md. - Describes reverse alpha blending approach for removing Gemini AI's visible star/sparkle logo watermark from images. - Supports single image and batch directory processing, with options for detection, force removal, custom alpha maps, and multiple output formats (JPEG, PNG, WebP, BMP). - Includes detailed CLI usage, advanced detection techniques, troubleshooting tips, and precise description of supported and unsupported scenarios. - Requires only Python (≥3.9), Pillow, and numpy; no external binaries or network access.
元数据
Slug gemini-watermark
版本 2.1.0
许可证
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Gemini Watermark 是什么?

Remove visible Gemini AI watermarks from images via reverse alpha blending. Use for cleaning Gemini-generated images, removing the star/sparkle logo watermar... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 351 次。

如何安装 Gemini Watermark?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install gemini-watermark」即可一键安装,无需额外配置。

Gemini Watermark 是免费的吗?

是的,Gemini Watermark 完全免费(开源免费),可自由下载、安装和使用。

Gemini Watermark 支持哪些平台?

Gemini Watermark 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Gemini Watermark?

由 h1bomb(@h1bomb)开发并维护,当前版本 v2.1.0。

💬 留言讨论