codes for Image Inpainting with External-internal Learning and Monochromic Bottleneck

Overview

Image Inpainting with External-internal Learning and Monochromic Bottleneck

This repository is for the CVPR 2021 paper: 'Image Inpainting with External-internal Learning and Monochromic Bottleneck'

paper | project website

Introduction

The proposed method can be applied to improve the color consistency of leaning-based image inpainting results. The progressive internal color propagation shows strong performance even with large mask ratios.

Prerequisites

  • Python 3.6
  • Pytorch 1.6
  • Numpy

Installation

git clone https://github.com/Tengfei-Wang/external-internal-inpainting.git
cd external-internal-inpainting

Quick Start

To try our internal colorization method:

python main.py  --img_path images/input2.png --gray_path images/gray2.png  --mask_path images/mask2.png  --pyramid_height 3

The colorization results are placed in ./results.

Citation

If you find this work useful for your research, please cite:

@InProceedings{wang2021image,
     title={Image Inpainting with External-internal Learning and Monochromic Bottleneck}, 
     author={Tengfei Wang, Hao Ouyang and Qifeng Chen},
     booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
     year = {2021}
}             

Contact

Please send emails to [email protected] if there is any question

You might also like...
Reducing Information Bottleneck for Weakly Supervised Semantic Segmentation (NeurIPS 2021)
Reducing Information Bottleneck for Weakly Supervised Semantic Segmentation (NeurIPS 2021)

Reducing Information Bottleneck for Weakly Supervised Semantic Segmentation (NeurIPS 2021) The implementation of Reducing Infromation Bottleneck for W

Official PyTorch Implementation for InfoSwap: Information Bottleneck Disentanglement for Identity Swapping
Official PyTorch Implementation for InfoSwap: Information Bottleneck Disentanglement for Identity Swapping

InfoSwap: Information Bottleneck Disentanglement for Identity Swapping Code usage Please check out the user manual page. Paper Gege Gao, Huaibo Huang,

PyTorch implementation of 1712.06087
PyTorch implementation of 1712.06087 "Zero-Shot" Super-Resolution using Deep Internal Learning

Unofficial PyTorch implementation of "Zero-Shot" Super-Resolution using Deep Internal Learning Unofficial Implementation of 1712.06087 "Zero-Shot" Sup

Official Pytorch implementation of Meta Internal Learning

Official Pytorch implementation of Meta Internal Learning

[ICCV'2021] Image Inpainting via Conditional Texture and Structure Dual Generation
[ICCV'2021] Image Inpainting via Conditional Texture and Structure Dual Generation

[ICCV'2021] Image Inpainting via Conditional Texture and Structure Dual Generation

[ACM MM 2021] Diverse Image Inpainting with Bidirectional and Autoregressive Transformers

Diverse Image Inpainting with Bidirectional and Autoregressive Transformers Installation pip install -r requirements.txt Dataset Preparation Given the

Auto-Lama combines object detection and image inpainting to automate object removals
Auto-Lama combines object detection and image inpainting to automate object removals

Auto-Lama Auto-Lama combines object detection and image inpainting to automate object removals. It is build on top of DE:TR from Facebook Research and

Apply a perspective transformation to a raster image inside Inkscape (no need to use an external software such as GIMP or Krita).
Apply a perspective transformation to a raster image inside Inkscape (no need to use an external software such as GIMP or Krita).

Raster Perspective Apply a perspective transformation to bitmap image using the selected path as envelope, without the need to use an external softwar

CVPR 2021:
CVPR 2021: "Generating Diverse Structure for Image Inpainting With Hierarchical VQ-VAE"

Diverse Structure Inpainting ArXiv | Papar | Supplementary Material | BibTex This repository is for the CVPR 2021 paper, "Generating Diverse Structure

Comments
  • Image preprocessing problems

    Image preprocessing problems

    Hi, this is a good job. According to the gray processing method mentioned in your paper: 0.11 * b + 0.59 * g + 0.30 * R for mask gray processing. The image completed by GatedConv is first gray processed and then converted into RGB image. When I put the uncompleted image, mask and processed completed gray image into the network, there will be white uncompleted area in the generated image. Is there a mistake in my image processing?

    opened by sangruolin 1
  • When running main.py encountered an error while testing its own dataset

    When running main.py encountered an error while testing its own dataset

    Traceback (most recent call last): File "main.py", line 111, in main()
    File "main.py", line 27, in main train(opt.pyramid_height, mask, img, img_gray, torch.cuda.FloatTensor, opt) File "main.py", line 77, in train mask_var_pyr, img_var_pyr, img_gray_var_pyr = get_pyramids(mask, img, img_gray, pyramid_height, dtype) File "main.py", line 67, in get_pyramids img_gray_var_pyr.append(get_pyramid_image(img_gray, w_n, h_n)[:,:1,:,:].type(dtype)) File "main.py", line 33, in get_pyramid_image img = np.array(img).transpose(2,0,1)/ 255.
    ValueError: axes don't match array

    I spent a long time trying to solve the problem, but I still failed. I hope I can get your help. Thank you and look forward to your reply!

    opened by Drangonliao123 1
Owner
CV
null
AOT-GAN for High-Resolution Image Inpainting (codebase for image inpainting)

AOT-GAN for High-Resolution Image Inpainting Arxiv Paper | AOT-GAN: Aggregated Contextual Transformations for High-Resolution Image Inpainting Yanhong

Multimedia Research 214 Jan 3, 2023
My implementation of Image Inpainting - A deep learning Inpainting model

Image Inpainting What is Image Inpainting Image inpainting is a restorative process that allows for the fixing or removal of unwanted parts within ima

Joshua V Evans 1 Dec 12, 2021
Implementation for our ICCV2021 paper: Internal Video Inpainting by Implicit Long-range Propagation

Implicit Internal Video Inpainting Implementation for our ICCV2021 paper: Internal Video Inpainting by Implicit Long-range Propagation paper | project

null 202 Dec 30, 2022
A self-supervised 3D representation learning framework named viewpoint bottleneck.

Pointly-supervised 3D Scene Parsing with Viewpoint Bottleneck Paper Created by Liyi Luo, Beiwen Tian, Hao Zhao and Guyue Zhou from Institute for AI In

null 63 Aug 11, 2022
A self-supervised 3D representation learning framework named viewpoint bottleneck.

Pointly-supervised 3D Scene Parsing with Viewpoint Bottleneck Paper Created by Liyi Luo, Beiwen Tian, Hao Zhao and Guyue Zhou from Institute for AI In

null 42 Sep 24, 2021
Code for the paper: "On the Bottleneck of Graph Neural Networks and Its Practical Implications"

On the Bottleneck of Graph Neural Networks and its Practical Implications This is the official implementation of the paper: On the Bottleneck of Graph

null 75 Dec 22, 2022
Bottleneck Transformers for Visual Recognition

Bottleneck Transformers for Visual Recognition Experiments Model Params (M) Acc (%) ResNet50 baseline (ref) 23.5M 93.62 BoTNet-50 18.8M 95.11% BoTNet-

Myeongjun Kim 236 Jan 3, 2023
Implementation of Bottleneck Transformer in Pytorch

Bottleneck Transformer - Pytorch Implementation of Bottleneck Transformer, SotA visual recognition model with convolution + attention that outperforms

Phil Wang 621 Jan 6, 2023