Automatically detects watermarks in image corners and removes them using LaMa AI model.
This skill requires the watermark-remover Python package. Install it first:
# Install from PyPI (when published)
pip install watermark-remover
# Or install from source
git clone https://github.com/yourusername/watermark-remover.git
cd watermark-remover
pip install -e .
Dependencies: Python 3.9+, opencv-python, numpy, Pillow, iopaint
Scripts in scripts/ subdirectory. Replace ${SKILL_DIR} with this SKILL.md's directory path.
| Script | Purpose |
|---|---|
| -------- | --------- |
scripts/main.py | Watermark removal CLI wrapper |
python ${SKILL_DIR}/scripts/main.py <input> [options]
| Option | Description | Default |
|---|---|---|
| -------- | ------------- | --------- |
| Image file or directory | Required |
--output | Output path | /no_watermark |
--corner-ratio | Corner area ratio (0-1) | 0.15 |
--threshold | Detection sensitivity (lower = more sensitive) | 30 |
--padding | Mask dilation pixels | 10 |
--preview | Generate mask preview only | false |
--no-lama | Use OpenCV instead of LaMa | false |
# Single image
python ${SKILL_DIR}/scripts/main.py image.jpg
# Directory with custom output
python ${SKILL_DIR}/scripts/main.py ./photos/ --output ./cleaned/
# Preview detection (shows red marks on watermarks)
python ${SKILL_DIR}/scripts/main.py ./photos/ --preview
# Adjust detection sensitivity
python ${SKILL_DIR}/scripts/main.py image.jpg --corner-ratio 0.2 --threshold 20
# Use OpenCV inpaint (faster but lower quality)
python ${SKILL_DIR}/scripts/main.py image.jpg --no-lama
JPG, JPEG, PNG, BMP, TIFF, WEBP
共 1 个版本