Fast Watermark Removal
A high-performance TorchScript model for removing watermarks from images. This model uses a dual-stage architecture optimized for speed and quality.
Test the Model
Try the model instantly in your browser โ no setup required:
Remove Watermarks โ clearpics.ai
Features
- Fast inference: ~500ms per image (RTX 4090)
- High quality: Preserves image details while effectively removing watermarks
- Production-ready: Compiled TorchScript model, no training code needed
- Memory efficient: Requires 11.5GB VRAM
Technical Details
- Architecture: Dual-stage with Swin2 Transformers
- Format: TorchScript (.ts) compiled model
- Input: RGB images (any resolution)
- Output: RGB images (max 768px, aspect ratio preserved)
- Precision: FP32 with TensorFloat32 matmul on Ampere+ GPUs
- Batch size: 1
Limitations
- Output resolution: Limited to 768px maximum dimension (aspect ratio preserved)
Commercial License
A commercial license with 1536px maximum output resolution is available for production use. The 1536px model maintains identical:
- VRAM requirements (11.5GB)
- Inference times (~500ms)
- Image Output
Contact: contact by email for commercial licensing inquiries
Installation
Requirements
- Python 3.10+
- CUDA-capable GPU with 11.5GB+ VRAM
- PyTorch 2.0+
Setup
# Install dependencies
pip install -r requirements.txt
Usage
Single Image
python inference.py -i /path/to/watermarked/image.jpg -m model.ts -o output_folder
Batch Processing
python inference.py -f /path/to/images/folder -m model.ts
Arguments
-i, --image: Path to single input watermarked image-f, --folder: Path to folder containing watermarked images (processes all .jpg and .webp files)-m, --model_path: Path to TorchScript model file (required)-o, --output_folder: Output folder for results (default:tests)
Output
The script saves two files per input:
- Original image: Copied to output folder with original filename
- Clean image: Saved as WebP with
-clean.webpsuffix
Images are automatically resized to maintain aspect ratio while respecting the 768px maximum dimension.
How It Works
The model uses a two-stage pipeline:
- Stage 1: Removes 90-95% of watermarks
- Stage 2: Removes remaining watermarks
- Post-processing: Automatic resizing to original aspect ratio (capped at 768px)
All processing (including resizing and normalization) is performed within the compiled TorchScript model for optimal performance.
Future Improvements
I'm actively exploring ways to enhance this model's capabilities. If you have suggestions, encounter issues, or are interested in collaborating on improvements, please reach out!
License
This model is provided for non-commercial research and personal use only. For commercial applications, please contact by email for licensing options.
Support
- Issues: Open an issue on the HuggingFace repository
- Questions: jason@engageify.com
- Commercial licensing: jason@engageify.com
- Downloads last month
- -