echtermeyer/Data-Security

0

stars

115

commits

Jupyter Notebook

primary language

Mar 5, 2026

updated

README

Data-Security: Watermarking Research & WaterBench Application

A comprehensive watermarking research platform combining algorithm benchmarking and an interactive web application for exploring and testing image watermarking techniques.

Benchmarking Pipeline

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).


Overview

This repository serves two purposes:

  1. Benchmarking - Systematic evaluation of watermarking algorithms against various attacks
  2. WaterBench - An interactive web application for demonstrating watermarking capabilities and cryptographic ownership claims

Project Structure

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

Watermarking Methods

MethodTypeRobustnessDescription
LSBSpatialLowLeast Significant Bit - fast but fragile baseline
DWT-DCTTransformMediumWavelet + cosine transform domain
DWT-DCT-SVDTransformHighIndustry standard with SVD enhancement
MBRSDeep LearningHighOptimized for JPEG compression survival
VINEDeep LearningVery HighDiffusion-based restoration for editing robustness

Benchmark Results

The benchmark evaluates all methods against multiple attack categories:

  • Distortion: Brightness, Contrast, Blur, Noise,
  • Geometric: Rotation, Scaling, Cropping
  • Compression: JPEG quality compression

Robustness Comparison

Watermark Robustness Spider Plot

Spider plot comparing algorithm robustness across different attack types


Getting Started

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • PyTorch (with MPS/CUDA support recommended)

Benchmark Setup

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.py

Backend Setup

cd watermark-backend

# Install dependencies
pip install -r requirements.txt

# Start server
python src/server.py

The API will be available at http://localhost:8000. API docs at /docs.

Frontend Setup

cd watermark-app

# Install dependencies
npm install

# Start development server
npm run dev

The app will be available at http://localhost:5174.


WaterBench Application

Features

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

API Endpoints

EndpointMethodDescription
/api/embedPOSTEmbed watermark into image
/api/extractPOSTExtract watermark from image
/api/benchmarkPOSTRun benchmark on image
/api/auth/registerPOSTRegister user with public key
/api/watermark/claimPOSTEmbed signed ownership claim
/api/watermark/verifyPOSTVerify ownership claim

Technologies

Frontend: React 19, Vite, Tailwind CSS, WebCrypto API

Backend: FastAPI, PyTorch, Pillow, Cryptography

Benchmarking: PyTorch, Diffusers, HuggingFace Datasets, Kornia


License

This project is for research and educational purposes. Check the LICENSE for more information.

Contributors

davidbhoffmann

60 commits

eric-tronity

38 commits

bukifanni

11 commits

echtermeyer

6 commits

echtermeyer/Data-Security

0

stars

115

commits

Jupyter Notebook

primary language

Mar 5, 2026

updated

README

Data-Security: Watermarking Research & WaterBench Application

A comprehensive watermarking research platform combining algorithm benchmarking and an interactive web application for exploring and testing image watermarking techniques.

Benchmarking Pipeline

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).


Overview

This repository serves two purposes:

  1. Benchmarking - Systematic evaluation of watermarking algorithms against various attacks
  2. WaterBench - An interactive web application for demonstrating watermarking capabilities and cryptographic ownership claims

Project Structure

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

Watermarking Methods

MethodTypeRobustnessDescription
LSBSpatialLowLeast Significant Bit - fast but fragile baseline
DWT-DCTTransformMediumWavelet + cosine transform domain
DWT-DCT-SVDTransformHighIndustry standard with SVD enhancement
MBRSDeep LearningHighOptimized for JPEG compression survival
VINEDeep LearningVery HighDiffusion-based restoration for editing robustness

Benchmark Results

The benchmark evaluates all methods against multiple attack categories:

  • Distortion: Brightness, Contrast, Blur, Noise,
  • Geometric: Rotation, Scaling, Cropping
  • Compression: JPEG quality compression

Robustness Comparison

Watermark Robustness Spider Plot

Spider plot comparing algorithm robustness across different attack types


Getting Started

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • PyTorch (with MPS/CUDA support recommended)

Benchmark Setup

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.py

Backend Setup

cd watermark-backend

# Install dependencies
pip install -r requirements.txt

# Start server
python src/server.py

The API will be available at http://localhost:8000. API docs at /docs.

Frontend Setup

cd watermark-app

# Install dependencies
npm install

# Start development server
npm run dev

The app will be available at http://localhost:5174.


WaterBench Application

Features

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

API Endpoints

EndpointMethodDescription
/api/embedPOSTEmbed watermark into image
/api/extractPOSTExtract watermark from image
/api/benchmarkPOSTRun benchmark on image
/api/auth/registerPOSTRegister user with public key
/api/watermark/claimPOSTEmbed signed ownership claim
/api/watermark/verifyPOSTVerify ownership claim

Technologies

Frontend: React 19, Vite, Tailwind CSS, WebCrypto API

Backend: FastAPI, PyTorch, Pillow, Cryptography

Benchmarking: PyTorch, Diffusers, HuggingFace Datasets, Kornia


License

This project is for research and educational purposes. Check the LICENSE for more information.

Contributors

davidbhoffmann

60 commits

eric-tronity

38 commits

bukifanni

11 commits

echtermeyer

6 commits

Languages

Jupyter Notebook

66.2%

JavaScript

17.9%

Python

11.1%

TeX

4.6%