rlouage / remove-watermark

My attempt to create a GAN that removes watermarks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

remove-watermark

A model based on Pix2Pix (https://arxiv.org/abs/1611.07004) to remove watermark from images. The implementation of Pix2Pix is based on https://github.com/eriklindernoren/PyTorch-GAN.

implementation

The model takes a 256² crop image as input and outputs an 256² image with the watermark removed. To transform a higher resolution image the model takes 256² crops of the images and stitches them together, this can lead to weird artificats around the borders of the squares.

An additional perception loss is added to the generator based on vgg11. This can probably be changed to vgg19 but due to computational limits this is not done.

dataset

The dataset I used for this is not publicly available and thus I won't share it (also due to legal reasons). The train dataset consists of around 20k Shutterstock images and their watermarked counterpart. The validation set consists of around 200 images. Some sample images are shown below

training

The model was trained for about 100 hours on a gtx 970.

results

After 100 epochs these are the results. This can probably be improved if we train the model longer. More results can be found in the results folder.

res 2 of validation data res 3 of validation data res 4 of validation data res 5 of validation data

About

My attempt to create a GAN that removes watermarks


Languages

Language:Jupyter Notebook 58.7%Language:Python 41.3%