nju-luke / watermarking

This is a project for watermarking using DWT and SVD。
18 stars 7 forks source link

recover() function #4

Open daniellerch opened 5 years ago

daniellerch commented 5 years ago

You extract the mark using: watermark_extracted = self.recover("W")

The recover() function uses: components = eval("self.{}_components".format(name))

So, you are using self.W_components. These are the components of the watermark read previously in init(). An these are extracted from the original watermark.

It seems that you need the original mark to extract the hidden mark. U and V from the real watermark and S from the recovered watermark. I'm not sure if this is correct. It could be a leak of information from U and V. Can you provide the reference of the paper you used to implement this?

What worries me is that I don't know if I can be sure that the mark comes from the marked image.

Thanks.

daniellerch commented 5 years ago

It seems that there is a leak.

If you replace: self.S_W = (img_components.S - self.imgcomponents.S) / ratio

with: self.S_W = np.ones((128,))

You can also recover the mark.

This is a problem, so we are not using any information from the marked image.

nju-luke commented 5 years ago

Thank you for your question.

  1. There's many paper talked about this, like this one https://arxiv.org/vc/arxiv/papers/1309/1309.2423v5.pdf.

  2. self.S_W is the diag value of SVD, which represents the importance of different dimensions. Therefore, self.S_W = np.ones((128,)) means all dimensions have the same contribution, which will lead to an ordinary result.

edwardocano commented 4 years ago

@nju-luke I have the same question. It is a blind metod so why is useful the original picture?

edwardocano commented 4 years ago

@daniellerch could you solve this problem?

daniellerch commented 4 years ago

@edwardocano as I have commented in my previous message, I think that the extraction process is not done correctly. At this point I decided to look for other options.

edwardocano commented 4 years ago

@daniellerch thanks for reply i wrote you an email. I also tried to fix the problem but i thing that the workflow of the script is wrong. Could you share the other options that you have?