Skip to content

Harsh-Sensei/Watermarking-diffusion-models

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modification to Tree-ring watermarking technique to improve structural similarity

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

Usage

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.

Perform main experiments and calculate CLIP Score

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

About

CS726 Advance Machine Learning (Spring 2024) course project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published