A neural net that un-watermarks images, with honest caveats
The author warns upfront that their own architecture doesn't generalize well and suggests you try something else instead.

What it does
Trains a fully-convolutional network to strip transparent rectangular overlays from images. It learns by generating random synthetic masks—varying height, width, opacity, color, and rotation—then predicting both the removed watermark and the underlying image. Inference takes an image plus a selection mask and outputs a cleaned output.png.
The interesting bit
The author skips downsampling entirely, using dilated convolutions to keep a large receptive field without exploding compute. The loss function is deliberately weird: abs(prediction, image_perturbations)**1/2, applied only around the masked region rather than the full image. It’s a narrow problem made tractable by cheating the scope.
Key highlights
- DenseNet-style blocks + dilated convolutions, no pooling layers
- Trains on Pascal VOC or CIFAR-10; needs ~12K steps before results look plausible
- Pretrained weights available, but must be manually dropped into
/tmp/ - Requires compiling Pillow from source with libjpeg-dev
- TensorFlow 1.x era code (judging by the
requirements.txtworkflow)
Caveats
- The README opens with a warning that the architecture does not generalize well and explicitly recommends Deep Image Prior as a better alternative
- Only works reliably on additive overlays; saturated regions reconstruct as gray mush
- Hyperparameters were barely tuned—“there’s room to get better results” is author-speak for “I moved on”
Verdict Worth a skim if you’re studying dilated convolutions or narrow-domain inpainting, but treat it as a teaching artifact rather than a tool. Anyone actually needing watermark removal should follow the author’s own advice and look elsewhere.