bcmi / SLBR-Visible-Watermark-Removal

[ACM MM 2021] Visible Watermark Removal via Self-calibrated Localization and Background Refinement
209 stars 35 forks source link

Param for controlling the strength of removal/inpainting #27

Closed rxavier-ml closed 1 year ago

rxavier-ml commented 1 year ago

Hi! Thank you for your work, it's very impressive.

Are there any parameters available during inference that would make watermark removal more aggressive at the cost of altering the underlying image?

jimleungjing commented 1 year ago

No. If you want to control the effect of watermark removal, you can train the model by the following two ways.

Let's suppose that watermarked image is J, original image is I, wateramrk alpha map is A, watermark is W and controllable parameter $\beta \in [0,1]$. $$J = I \times (1-A) + W\times A$$

We assume that the watermark will be removed completely by setting parameter $\beta = 1$ and no change with $\beta = 0$. You can train the model with parameter $\beta$ and alter the reconstructed target:

Input: $(J, \beta)$ Target: $I' = I \times (1-A \times (1-\beta)) + W\times A\times (1-\beta)$

Besides, you can also alter the model watermark removal effect by weakening the loss penalty: $$L = \beta \times L_{MSE}$$

More controlable methods can refer to the style transfer papers. I think the conditional generation methods will help you achieve the aggressive watermark removal goal.