Watermark-Removal is a machine-learning-based image restoration tool that uses an inpainting approach to instinctively remove watermarks, making outputs nearly indistinguishable from the ground truth image. The project is implemented in TensorFlow 1.15.0 and supports one-command CLI usage, runnable locally or in Google Colab. Inspired by CVPR 2018’s Contextual Attention and ICCV 2019’s Gated Convolution, it’s open-sourced on GitHub with 3.5k stars and 417 forks, actively maintained by the community.
Source code: https://github.com/zuruoke/watermark-removal
use Google colab
-
First of all, clone this repo
!git clone https://github.com/zuruoke/watermark-removal
-
Change Directory to the repo
!cd watermark-removal
-
Since Google Colab uses the latest Tensorflow 2x version and this project uses 1.15.0, downgrade to Tensorflow 1.15.0 version and restart the runtime, (
although the new version of Google Colab does not need you to restart the runtime
).!pip install tensorflow==1.15.0
-
Install tensorflow toolkit neuralgym.
!pip install git+https://github.com/JiahuiYu/neuralgym
-
Download the model dirs using this link and put it under
model/
(renamecheckpoint.txt
tocheckpoint
because sometimes google drive automatically adds .txt after download)
And you’re all Set!!
-
Now remove the watermark on the image by runing the
main.py
file!python main.py --image path-to-input-image --output path-to-output-image --checkpoint_dir model/ --watermark_type istock
@article{yu2018generative, title={Generative Image Inpainting with Contextual Attention}, author={Yu, Jiahui and Lin, Zhe and Yang, Jimei and Shen, Xiaohui and Lu, Xin and Huang, Thomas S}, journal={arXiv preprint arXiv:1801.07892}, year={2018}}@article{yu2018free, title={Free-Form Image Inpainting with Gated Convolution}, author={Yu, Jiahui and Lin, Zhe and Yang, Jimei and Shen, Xiaohui and Lu, Xin and Huang, Thomas S}, journal={arXiv preprint arXiv:1806.03589}, year={2018}}
Libre Depot original article,Publisher:Libre Depot,Please indicate the source when reprinting:https://www.libredepot.top/5599.html