This repo contains modification of the official implementation of Tree-Ring Watermarks for the course project of Advanced Machine Learning course (Spring 2024).
Team name : Dilwale Diffusion Le Jayenge
Team Members :
Harsh Shah 200050049
Sandeepan Naskar 200050126
Shrey Bavishi 200050132
Jash Kabra 200050054
We have implemented discrete cosine tranformation instead of fft in the original work to increase storage efficiency as improve structural similarity. Structural similarity is obtained quantitatively via LPIPS and SSIM losses.
To run the experiments with fft or dct transformations, change config.py
, and then use the following commands.
For non-adversarial case, you can simply run:
python run_tree_ring_watermark.py --run_name no_attack --w_channel 3 --w_pattern ring --start 0 --end 1000 --with_tracking --reference_model ViT-g-14 --reference_model_pretrain laion2b_s12b_b42k
You can modify arguments to perform attack. For example, for rotation with 75 degrees:
python run_tree_ring_watermark.py --run_name rotation --w_channel 3 --w_pattern ring --r_degree 75 --start 0 --end 1000 --with_tracking