YuxinWenRick / tree-ring-watermark

MIT License
250 stars 32 forks source link

About the visualization of the ring pattern in Fourier domain #16

Closed qilong-zhang closed 10 months ago

qilong-zhang commented 10 months ago

Hi Yuxin,

Your work is really intersting and novel! I want to further understand the detail of your method. However, I have trouble visualizing the watermark pattern. I notice that gt_patch is (1,4,64,64) and I can observe the ring in each channel, while I cannot find that in that init_latents_w, reversed_latents_no_w and reversed_latents_w. Could you help me? Thanks!

YuxinWenRick commented 10 months ago

Hi Qilong, thanks for your interest!

gt_patch contains the ring pattern in every channel as a key, but for init_latents_w, we only inject the key into one of the channels. If you are running 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 would expect the pattern is in the last channel since --w_channel 3. Could you double-check if you can see it in the last channel? Also, I don't think we expect any ring pattern for reversed_latents_no_w since it's not watermarked.

Let me know if you have further questions!

qilong-zhang commented 10 months ago

@YuxinWenRick Thanks for your reply. I can obtain the watermark now

zzzucf commented 8 months ago

Hi, I wonder how to visualize the gt_patch, just like what paper shows in Figure 1? It is complex type.

YuxinWenRick commented 8 months ago

Hi @zzzucf , yeah, you are right that we cannot really visualize the complex numbers, so the figure shown in the paper is just the visualization of the real part. You can follow this code to do the visualization.

zzzucf commented 8 months ago

Thank you, that solves my confusion. I really appreciate it.