A comprehensive watermarking research platform combining algorithm benchmarking and an interactive web application for exploring and testing image watermarking techniques.
Figure 1: Our benchmarking pipeline follows a three step process given an image: (1) encode a message as an invisible watermark in the image using one of the methods discussed in \autoref{sec:related_work}, (2) compute image quality metrics on the watermarked image to assess its imperceptibility, (3) attack the watermarked image with a transformation (e.g. cropping the image) (4) use the methods decoder to extract the message from the attacked watermarked image and (5) compute watermark detection metrics.
The research paper and presentation slides are available in docs/ (Paper | Presentation).
This repository serves two purposes:
- Benchmarking - Systematic evaluation of watermarking algorithms against various attacks
- WaterBench - An interactive web application for demonstrating watermarking capabilities and cryptographic ownership claims
Data-Security/
├── benchmark/ # Benchmarking scripts and results
│ ├── pipeline.py # Main benchmark execution engine
│ ├── visualization.py # Results visualization and plotting
│ ├── vendor/ # Watermarking algorithm implementations
│ ├── results/ # Benchmark result JSON files
│ └── figures/ # Generated plots and visualizations
│
├── watermark-app/ # React frontend application
│ └── src/
│ ├── pages/ # Landing, Challenge, Benchmark, Ownership
│ └── components/ # Reusable UI components
│
└── watermark-backend/ # FastAPI backend server
└── src/
├── server.py # FastAPI application entry
├── api_routes.py# REST API endpoints
└── vendor/ # Algorithm implementations
| Method | Type | Robustness | Description |
|---|---|---|---|
| LSB | Spatial | Low | Least Significant Bit - fast but fragile baseline |
| DWT-DCT | Transform | Medium | Wavelet + cosine transform domain |
| DWT-DCT-SVD | Transform | High | Industry standard with SVD enhancement |
| MBRS | Deep Learning | High | Optimized for JPEG compression survival |
| VINE | Deep Learning | Very High | Diffusion-based restoration for editing robustness |
The benchmark evaluates all methods against multiple attack categories:
- Distortion: Brightness, Contrast, Blur, Noise,
- Geometric: Rotation, Scaling, Cropping
- Compression: JPEG quality compression
Spider plot comparing algorithm robustness across different attack types
- Python 3.10+
- Node.js 18+
- PyTorch (with MPS/CUDA support recommended)
cd benchmark
# Install dependencies
pip install torch torchvision diffusers transformers accelerate \
invisible-watermark datasets numpy opencv-python kornia pillow
# Run benchmarks
python pipeline.py
# Generate visualizations
python visualization.pycd watermark-backend
# Install dependencies
pip install -r requirements.txt
# Start server
python src/server.pyThe API will be available at http://localhost:8000. API docs at /docs.
cd watermark-app
# Install dependencies
npm install
# Start development server
npm run devThe app will be available at http://localhost:5174.
Challenge Mode - Interactive attack simulation
- Select image and watermarking algorithm
- Apply real-time attacks (blur, noise, rotation, compression)
- Extract and verify watermark survival
Ownership Claims - Cryptographic proof of authorship
- RSA-2048 key generation in browser
- Sign ownership claims with private key
- Verify claims with public key infrastructure
Benchmark View - Algorithm comparison dashboard
- Imperceptibility metrics (PSNR, SSIM)
- Performance metrics (embed/extract time)
- Robustness scores per attack type
| Endpoint | Method | Description |
|---|---|---|
/api/embed |
POST | Embed watermark into image |
/api/extract |
POST | Extract watermark from image |
/api/benchmark |
POST | Run benchmark on image |
/api/auth/register |
POST | Register user with public key |
/api/watermark/claim |
POST | Embed signed ownership claim |
/api/watermark/verify |
POST | Verify ownership claim |
Frontend: React 19, Vite, Tailwind CSS, WebCrypto API
Backend: FastAPI, PyTorch, Pillow, Cryptography
Benchmarking: PyTorch, Diffusers, HuggingFace Datasets, Kornia
This project is for research and educational purposes. Check the LICENSE for more information.

