Quick start

To assess implemented watermarking algorithms and attacks on watermarks, follow the step-by-step procedure below.

  1. Clone the repository and navigate to its directory (all subsequent commands should be run from this location):

git clone https://github.com/ispras/wibe.git
  1. Update the submodules:

git submodule update --init --recursive
  1. Create and activate a virtual environment (the exact command varies slightly between OSes – you know how to do this):

python -m venv venv
  1. Download the pre-trained model weights:

(venv) python download_models.py
  1. Install the dependencies:

(venv) python install_requirements.py
  1. Set the HF_TOKEN environment variable with your HuggingFace token (see HuggingFace Authentication Setup for details), then authenticate:

(venv) python huggingface_login.py
  1. All set! Specify the path to your Сonfiguration file (e.g. configs/trustmark_demo.yml) as a required parameter:

(venv) python -m wibench --config configs/trustmark_demo.yml -d

You can find some predifined configurations in the config directory.

8. Upon completion of computations, you can view watermarked images and explore interactive charts for different combinations of watermarking algorithms, attacks, and computed performance metrics. To explore interactive wind rose chart with average TPR@0.1%FPR for all algorithms and attacks evaluated so far, run the following command:

(venv) python make_plots.py --results_directory path_to_results_directory

HuggingFace Authentication Setup

The huggingface_hub requires a token generated on the page with the following setup:

  • Token Configuration:
    • Enable “Read access to contents of all public gated repos you can access” (Required for accessing restricted model repositories)

  • Repository Access:
    • Visit FLUX.1-dev repository and request access to it

    • Click “Agree and access repository” (Grants legal approval for model usage)