bcmi / SLBR-Visible-Watermark-Removal

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

Question about the mask in dataset. #21

Closed star-ice closed 1 year ago

star-ice commented 2 years ago

Is there any influence if the masks in the dataset are not accurate?

For example, I detected the watermarked area with YOLO, so the mask was generated as white squares. If I put these kinds of masks in the training process, will the result still be good or not?

jimleungjing commented 2 years ago

I'm not sure whether it works, and you can try it. I think that accurate mask will be better for watermark removal since accurate mask provides more edge details than square mask. If only square masks are available, this task will fall into the scope of implicit watermark removal. And the model will be required to be aware of the pixels that are not belonging to watermark, which is harder than explicit watermark removal task.

star-ice commented 2 years ago

Thanks for your reply. I've trained the model with unclear masks and it works. While with some backgrounds full of letters or complex patterns, the model could not recover the background nicely.

There is still another question. I utilised your model in the task of removing stamps from documents, and I also built the explicit masks with stamps in the training task, while black stamps and other stamps that have the same colour as the documents were not able to remove. Is there any method to improve the result? Thanks for your help.

The stamps on the documents are as follows: image image image image

jimleungjing commented 1 year ago

I recommend you to build two models for gray stamps and color stamps respectively. Gray stamps are more difficult to remove since the background is full of gray and black letters or other patterns, and you can make more data augmentation or try the removal model with scene text regonition model.

star-ice commented 1 year ago

Thanks for your answer! I'll try your idea and check the performance later. That's quite helpful.

huakngping commented 1 year ago

Thanks for your reply. I've trained the model with unclear masks and it works. While with some backgrounds full of letters or complex patterns, the model could not recover the background nicely.

There is still another question. I utilised your model in the task of removing stamps from documents, and I also built the explicit masks with stamps in the training task, while black stamps and other stamps that have the same colour as the documents were not able to remove. Is there any method to improve the result? Thanks for your help.

The stamps on the documents are as follows: image image image image

你好,我想问一下,你这个印章印记的去除效果还蛮好的,尤其是印章印记灰度图的提取,想了解一下你是修改模型哪一块的参数呢?

star-ice commented 1 year ago

你好,我是用了默认的参数训练的,需要用数据增强增加一些灰度样本,并且训练图像的大小也尽可能贴近默认参数的输入图像大小。

huakngping commented 1 year ago

你好,我是用了默认的参数训练的,需要用数据增强增加一些灰度样本,并且训练图像的大小也尽可能贴近默认参数的输入图像大小。

您好,我想再问一下,就是我使用这个模型进行训练的时候,最后test.py输出的测试结果中水印提取的很差,包含着很多的背景信息。就像这样:

微信图片_20230802155344

想请教一下,您有遇到这种情况吗?

star-ice commented 1 year ago

会不会是训练轮数不够导致的?看mask提取效果是不错的。 最后一个图片是什么呢? 还有就是在测试的时候也尽量把图片的预处理做的和训练时一致。

On Wed, 9 Aug 2023 at 11:12, huakngping @.***> wrote:

你好,我是用了默认的参数训练的,需要用数据增强增加一些灰度样本,并且训练图像的大小也尽可能贴近默认参数的输入图像大小。

您好,我想再问一下,就是我使用这个模型进行训练的时候,最后test.py输出的测试结果中水印提取的很差,包含着很多的背景信息。就像这样: [image: 微信图片_20230802155344] https://user-images.githubusercontent.com/98293596/259285785-030ce27e-c736-442f-8015-6fc4554d07e0.png

想请教一下,您有遇到这种情况吗?

— Reply to this email directly, view it on GitHub https://github.com/bcmi/SLBR-Visible-Watermark-Removal/issues/21#issuecomment-1670588850, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHFGWT65ZAXFYEZT7VZBDS3XUL5YHANCNFSM6AAAAAAQQUL5HQ . You are receiving this because you authored the thread.Message ID: @.***>