Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect if image has a watermark?

Our website allows people to upload images. However, we don't allow watermarked images, yet many do still get uploaded by users. Is there some software/code that can (at least in most cases) catch images that do have watermarks such as logos/images? I'm not sure if there is some sort of a standard.

like image 862
Chris Avatar asked Aug 31 '11 17:08

Chris


3 Answers

You can do it via image classification. Basically, train a CNN(Convolutional neural Network) model by feeding in some images with watermark and some without watermark in it and then use this model to judge the probability of watermark in any new image.

You can apply transfer learning on some existing pre-trained models(as of today inception v3 is the best out there) which can be retrained for your specific classification purpose.

For example this link shows how to do it to identify whether an image is that of a sunflower or a daisy or a rose. https://www.tensorflow.org/tutorials/image_retraining

Here is a quick 5 minute tutorial about building a tensorflow image classifier: https://youtu.be/QfNvhPx5Px8

like image 195
Arijeet Patidar Avatar answered Oct 11 '22 22:10

Arijeet Patidar


To detect any kind of logo on an image would be quite complicated. You would need something similar to face recognition, and a lot of AI...

To make it reasonably efficient you would need a library of logos to look for, and know where they are applied on the images. If the logo is always in the same place, you could just mask out the pixels where it would be, and calculate how close it is to the pixels of the logo. If logos varies in size and position, it gets more complicated.

like image 29
Guffa Avatar answered Oct 12 '22 00:10

Guffa


You can't automatically detect a watermark. The best thing to do is make it real easy for others to report images that have a watermark and once reported, put them in a holding state where they aren't displayed until it's verified they either do or don't have a watermark.

like image 24
Samuel Neff Avatar answered Oct 11 '22 23:10

Samuel Neff