bsmhmmlf / Gaussian-Shading

[CVPR 2024] Gaussian Shading: Provable Performance-Lossless Image Watermarking for Diffusion Models
MIT License
48 stars 3 forks source link

Parameter settings for detection scenario #2

Closed xinxinzi8 closed 4 months ago

xinxinzi8 commented 4 months ago

Hi author, could you please tell me how to set the parameter when running the experiment for detection scenario? Should I set the user_number =1 with channel_copy=1 and hw_copy =8 ? Thank you!

bsmhmmlf commented 4 months ago

@xinxinzi8 If you want to get the results of the detection scenario, you need to set channel_copy=1 and hw_copy =8, and then focus on the tpr_detection . user_number is fine to set to whatever you want because it only affects tpr_traceability, which is a metric for the traceability scenario that has nothing to do with detection.

xinxinzi8 commented 4 months ago

Thank you very much!

xinxinzi8 commented 4 months ago

Hello, I have another question about this line self.tau_onebit = (i+1) / self.marklength in watermark.py. Whyi+1 is used when calculate tau_onebit and tau_bits? According to the formula of FPR($\tau$) = B($\tau$ + 1, k - $\tau$, 0.5), I think i means $\tau$ here. Thank you very much!

bsmhmmlf commented 4 months ago

Hello, I have another question about this line self.tau_onebit = (i+1) / self.marklength in watermark.py. Whyi+1 is used when calculate tau_onebit and tau_bits? According to the formula of FPR(τ) = B(τ + 1, k - τ, 0.5), I think i means τ here. Thank you very much!

@xinxinzi8 Thank you for pointing out this error! Here it should beself.tau_onebit = i / self.marklength and self.tau_bits = i / self.marklength . If the original code is followed, the theoretical FPR should be smaller, and the conditions are more stringent for calculating the TPR. We will fix this error as soon as possible!