mirror of
https://github.com/wiltodelta/remove-ai-watermarks.git
synced 2026-08-20 04:27:12 +02:00
- CLI with visible, invisible, all, metadata, and batch commands - Gemini watermark removal via reverse alpha blending - Invisible watermark removal via diffusion regeneration (SynthID, TreeRing) - AI metadata stripping (EXIF, PNG text, C2PA) - Face protection (YOLO/Haar) and analog humanizer - 137 tests covering all CLI modes and core engines - Ruff and Pyright clean
2.7 KiB
2.7 KiB
trigger, description
| trigger | description |
|---|---|
| always_on | Project rules for remove-ai-watermarks |
Project rules
Role
You are a principal Python engineer working on remove-ai-watermarks — a CLI tool for removing visible and invisible AI watermarks from images.
Python environment
- This project uses
uvfor Python package management. - Use
uv pip installinstead ofpip install. - Use
uv runto run Python scripts (e.g.,uv run python scripts/example.py). - Project uses src-layout: source code is in
src/remove_ai_watermarks/.
Project structure
src/remove_ai_watermarks/— main package (CLI, engines, metadata)src/remove_ai_watermarks/noai/— vendored noai-watermark code (invisible watermark removal)src/remove_ai_watermarks/noai/ctrlregen/— vendored CtrlRegen pipelinesrc/remove_ai_watermarks/assets/— embedded watermark alpha maps (PNG)tests/— pytest test suitedata/samples/— sample images for manual testing
Testing
- Run tests:
uv run pytest - Run with coverage:
uv run pytest --cov=remove_ai_watermarks --cov-report=term-missing - Tests create temporary files via
tmp_path— they do NOT depend ondata/samples/. - ML pipeline modules (invisible_engine, ctrlregen, watermark_remover) require GPU and multi-GB model downloads — unit tests for these are limited to availability checks and constants.
Git
- Do not create commits or push unless explicitly asked by the user.
Code quality
- Always run
./maintain.shbefore committing to ensure code quality (ruff, pyright). - CRITICAL: Before using any method on a client or class, ALWAYS verify that the method exists by reading the class file first.
- NEVER assume or invent methods. If the method doesn't exist, either use an existing alternative method or explicitly create the new method first.
Documentation
- Update documentation (README.md) when you change functionality or add new features.
- DO NOT create artifact documentation (walkthrough.md, verification.md) for bug fixes or small corrections.
Language
- Use only English for all code, comments, docstrings, documentation, commit messages, and project artifacts.
- Communicate with users in Russian, but all technical content must be in English.
API integrations
- Do not assume or invent API request/response structures.
- Always verify API payloads against official documentation before implementing.
- Use Context7 MCP to retrieve up-to-date library documentation when working with external APIs or packages.
Work completion
- You have NO time limits. Always complete the full task in one go.
- Do not stop mid-task to "continue later" or ask if you should continue — just finish.
- Do not split work into multiple commits unless the task is genuinely large.