Papers › CR-Fill: Generative Image Inpainting With Auxiliary Contextual Reconstruction

CR-Fill: Generative Image Inpainting With Auxiliary Contextual Reconstruction

1 Jan 2021ICCV 2021 10archive 2025-07-28

Yu Zeng, Zhe Lin, Huchuan Lu, Vishal M. Patel

Recent deep generative inpainting methods use attention layers to allow the generator to explicitly borrow feature patches from the known region to complete a missing region. Due to the lack of supervision signals for the correspondence between missing regions and known regions, it may fail to find proper reference features, which often leads to artifacts in the results. Also, it computes pair-wise similarity across the entire feature map during inference bringing a significant computational overhead. To address this issue, we propose to teach such patch-borrowing behavior to an attention-free generator by joint training of an auxiliary contextual reconstruction task, which encourages the generated output to be plausible even when reconstructed by surrounding regions. The auxiliary branch can be seen as a learnable loss function, i.e. named as contextual reconstruction (CR) loss, where query-reference feature similarity and reference-based reconstructor are jointly optimized with the inpainting generator. The auxiliary branch (i.e. CR loss) is required only during training, and only the inpainting generator is required during the inference. Experimental results demonstrate that the proposed inpainting model compares favourably against the state-of-the-art in terms of quantitative and visual performance. Code is available at https://github.com/zengxianyu/crfill.

PaperPDFCode

Code

zengxianyu/crfill officialmentioned in paperpytorch 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

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Image Inpainting

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Inpainting Places2 CR-Fill FID 9.657 #9 of 14 Archive leaderboard report
Image Inpainting Places2 CR-Fill LPIPS 0.233 #9 of 14 Archive leaderboard report
Image Inpainting Places2 CR-Fill P-IDS 5.53 #9 of 14 Archive leaderboard report
Image Inpainting Places2 CR-Fill U-IDS 22.90 #9 of 14 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

Inpainting

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