High_Resolution_Image_Inpainting
High_Resolution_Image_Inpainting copied to clipboard
https://arxiv.org/abs/2104.13464
Deep Two-Stage High-Resolution Image Inpainting
Abstract
In recent years, the field of image inpainting has developed rapidly, but most deep methods are strongly tied to the resolution of the images on which they were trained. A slight resolution increase leads to artifacts and unsatisfactory filling quality. These methods are therefore unsuitable for interactive image processing. In this article, we propose a method that solves the problem of inpainting arbitrary-size images. We also describe a way to better restore texture fragments in the filled area. Moreover, this approach can work with existing inpainting models, making them resolution independent. We also created a GIMP plugin that implements our technique.
Testing
Requirements
- Python 3.7
- Install requirements with
pip install -r requirements.txt
Usage
- Download weights and save it in
weights
folder. - Put your images as shown in
Test/Inputs
- Run:
python test.py
Results from our comparison
You can find all the images involved in our comparison here
GIMP plugin
Tested with
- GIMP 2.10
- Ubuntu 18.04 LTS
- macOS Mojave 10.14.6
Installation
- Open GIMP and go to Preferences -> Folders -> Plug-ins, add the folder
gimp-plugins
from this repo and close GIMP. - Download weights and save it in
gimp-plugins/Inpainting/weights
folder. - Open terminal and run:
bash installGimpML.sh
- Open GIMP.
Usage
You can find example of usage: youtube.
Please note that the mask must be exactly binary. Otherwise the filling result will be terrible.
To do this, remove antialiasing in selection:
@article{Moskalenko_2020,
doi = {10.51130/graphicon-2020-2-4-18},
url = {https://doi.org/10.51130%2Fgraphicon-2020-2-4-18},
year = 2020,
month = {dec},
pages = {short18--1--short18--9},
author = {Andrey Moskalenko and Mikhail Erofeev and Dmitriy Vatolin},
title = {Deep Two-Stage High-Resolution Image Inpainting},
journal = {Proceedings of the 30th International Conference on Computer Graphics and Machine Vision ({GraphiCon} 2020). Part 2}
}
References
We are largely benefiting from:
[1] https://github.com/hughplay/DFNet
[2] https://github.com/kritiksoman/GIMP-ML/