Papers › Free-Form Image Inpainting with Gated Convolution

Free-Form Image Inpainting with Gated Convolution

10 Jun 2018ICCV 2019 10arXiv:1806.03589archive 2025-07-28

Jiahui Yu, Zhe Lin, Jimei Yang, Xiaohui Shen, Xin Lu, Thomas Huang

We present a generative image inpainting system to complete images with free-form mask and guidance. The system is based on gated convolutions learned from millions of images without additional labelling efforts. The proposed gated convolution solves the issue of vanilla convolution that treats all input pixels as valid ones, generalizes partial convolution by providing a learnable dynamic feature selection mechanism for each channel at each spatial location across all layers. Moreover, as free-form masks may appear anywhere in images with any shape, global and local GANs designed for a single rectangular mask are not applicable. Thus, we also present a patch-based GAN loss, named SN-PatchGAN, by applying spectral-normalized discriminator on dense image patches. SN-PatchGAN is simple in formulation, fast and stable in training. Results on automatic image inpainting and user-guided extension demonstrate that our system generates higher-quality and more flexible results than previous methods. Our system helps user quickly remove distracting objects, modify image layouts, clear watermarks and edit faces. Code, demo and models are available at: https://github.com/JiahuiYu/generative_inpainting

PaperPDFConference PDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

The archive's official repository (JiahuiYu/generative_inpainting) was not harvested; the 7 samples below come from 3 community repositories.

Syntology 7 code samples harvested from 3 repositories linked to this paper: 7 ran (of which 0 constructed an object rather than computing a result; 6 with no instrument failure: 0 honoured, 0 violated, 6 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified. Where Syntology's instrument failed: 1 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: community (archive-listed): 7 samples from 3 repositories, 7 ran (6 with no instrument failure; 1 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written between 2026-09-22 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

30 repositories listed; official and paper-mentioned ones first.

JiahuiYu/generative_inpainting officialmentioned in papermentioned on GitHubtfNOASSERTIONSyntology: not harvested report
CS269-Capstone/t-snake-capstone mentioned on GitHubtfNOASSERTIONSyntology: not harvested report
CS269-Capstone/t-snake-mask-generation mentioned on GitHubtfNOASSERTIONSyntology: not harvested report
ChopsticksAN/generative_inpainting mentioned on GitHubtfNOASSERTIONSyntology: not harvested report
Ir1d/tf-models mentioned on GitHubtfNOASSERTIONSyntology: not harvested report
SayedNadim/Free_Form_Image_Inpainting_Gated_Conv mentioned on GitHubtfMITSyntology: 1 sample, 1 ran (0 instrument-failed) · 0 unverified report
SayedNadim/Gated_Convolution_Tensorflow mentioned on GitHubtfMITSyntology: not harvested report
ShnitzelKiller/generative_inpainting mentioned on GitHubtfNOASSERTIONSyntology: not harvested report
TerminatorSd/generative mentioned on GitHubtfNOASSERTIONSyntology: not harvested report
avalonstrel/GatedConvolution mentioned on GitHubtfNOASSERTIONSyntology: not harvested report
boge8888/Watermark-removal-GUI mentioned on GitHubtfNOASSERTIONSyntology: not harvested report
btxuyenHCMUS/generative mentioned on GitHubtfNOASSERTIONSyntology: not harvested report
btxuyenHCMUS/inpainting mentioned on GitHubtfMITSyntology: not harvested report
csqiangwen/DeepFillv2_Pytorch mentioned on GitHubpytorchMITSyntology: 2 samples, 2 ran (1 instrument-failed) · 0 unverified report
feixuetuba/inpainting mentioned on GitHubpytorchSyntology: not harvested report
feixuetuba/inpating mentioned on GitHubpytorchSyntology: not harvested report
g2zac/generative_inpainting mentioned on GitHubtfNOASSERTIONSyntology: not harvested report
huynhhoanghuy/Image-Inpainting mentioned on GitHubtfNOASSERTIONSyntology: not harvested report
jiajunhua/JiahuiYu-generative_inpainting mentioned on GitHubtfNOASSERTIONSyntology: not harvested report
katychou/generative01 mentioned on GitHubtfNOASSERTIONSyntology: not harvested report
nipponjo/deepfillv2-pytorch mentioned on GitHubpytorchSyntology: not harvested report
nuneslu/VeIGAN mentioned on GitHubtfNOASSERTIONSyntology: not harvested report
pfnet-research/Chainer-DeepFill mentioned on GitHubMITSyntology: 4 samples, 4 ran (0 instrument-failed) · 0 unverified report
rajprakrit/DeepFillv2 mentioned on GitHubpytorchMITSyntology: not harvested report
runze-wang-sjtu/generative_inpainting mentioned on GitHubtfNOASSERTIONSyntology: not harvested report
sirius-image-inpainting/Free-Form-Image-Inpainting-With-Gated-Convolution mentioned on GitHubpytorchGPL-3.0Syntology: not harvested report
vrindaprabhu/deepfillv2_colab mentioned on GitHubpytorchSyntology: not harvested report
xurongchao/mv-inpainting mentioned on GitHubtfNOASSERTIONSyntology: not harvested report
zuruoke/watermark-removal mentioned on GitHubtfSyntology: not harvested report
avalonstrel/GatedConvolution_pytorch pytorchNOASSERTIONSyntology: not harvested report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

7 samples harvested: 7 ran (of which 0 constructed an object rather than computing a result; 6 with no instrument failure: 0 honoured, 0 violated, 6 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · our draft was wrong
6ran

Licence: 1 of the 7 samples is pointer only, meaning Syntology does not serve that copy's text. For that sample, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 3 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 1 sample that ran, the graph records a signature this page does not show: an argument's recorded type or element kind is a printout of an object in Syntology's harness (such as a mock object, a class or a pandas printout), not the type of an input, so it does not describe the call's shape. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

SayedNadim/Free_Form_Image_Inpainting_Gated_Conv community (archive-listed) 1 sample, 1 ran (0 instrument-failed) · 0 unverified
dataset_files flist_maker.py ran fingerprinted MIT (permissive) · d6d0565ac9e754d3 · report fixture: signature rootdir:str/0/str, pattern:str/0/str · returned list · level recorded 2026-09-26
csqiangwen/DeepFillv2_Pytorch community (archive-listed) 2 samples, 2 ran (1 instrument-failed) · 0 unverified
l2normalize in 31 papers network_module.py ran · our draft was wrong fingerprinted MIT (permissive) here; the stored copy is pointer only · bedff51745d2cf84 · report fixture: signature v:Tensor/2/float, eps:float/0/float · returned Tensor · level recorded 2026-09-22
text_readlines utils.py ran fingerprinted MIT (permissive) · 2c0f9420e07c7b34 · report fixture: signature filename:str/0/str · returned list · level recorded 2026-09-25
pfnet-research/Chainer-DeepFill community (archive-listed) 4 samples, 4 ran (0 instrument-failed) · 0 unverified
batch_postprocess_images src/utils.py ran MIT (permissive) · 4caf963a3beebcf2 · report fixture: signature img:ndarray/4/float, batch_w:int/0/int, batch_h:int/0/int · returned ndarray · level recorded 2026-09-26
bbox2mask in 8 papers src/inpaint_ops.py ran MIT (permissive) · 74b8bbb02eed8073 · report fixture: returned ndarray · level recorded 2026-09-26
free_form_mask src/inpaint_ops.py ran MIT (permissive) · 5e0f61f83bc68c0f · report fixture: signature xp:XPModule/0/?, batchsize:int/0/int, size:tuple/1/int, maxVertex:int/0/int, minLength:int/0/int, maxLength:int/0/int, minBrushWidth:int/0/int, maxBrushWidth:int/0/int, maxAngle:int/0/int · returned Tensor · level recorded 2026-09-26
random_bbox src/inpaint_ops.py ran MIT (permissive) · 06995870b9c8a9ae · report fixture: signature config:Config/0/? · returned tuple · level recorded 2026-09-26

Tasks

FormImage Inpaintingfeature selection

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Inpainting Places2 DeepFill v2 FID 9.27 #8 of 14 Archive leaderboard report
Image Inpainting Places2 DeepFill v2 P-IDS 4.01 #8 of 14 Archive leaderboard report
Image Inpainting Places2 DeepFill v2 U-IDS 21.32 #8 of 14 Archive leaderboard report
Image Inpainting Places2 val DeepFillv2 (20-30% free form) FID 13.5 #3 of 7 Archive leaderboard report
Image Inpainting Places2 val DeepFillv2 (20-30% free form) PD 63.0 #3 of 7 Archive leaderboard report
Image Inpainting Places2 val DeepFillv2 (128×128 center mask) FID 15.3 #5 of 7 Archive leaderboard report
Image Inpainting Places2 val DeepFillv2 (128×128 center mask) PD 96.3 #5 of 7 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

1x1 ConvolutionConvolutionGated ConvolutionGated Linear Unit

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections