Papers › Incremental Transformer Structure Enhanced Image Inpainting with Masking Positional Encoding

Incremental Transformer Structure Enhanced Image Inpainting with Masking Positional Encoding

2 Mar 2022CVPR 2022 1arXiv:2203.00867archive 2025-07-28

Qiaole Dong, Chenjie Cao, Yanwei Fu

Image inpainting has made significant advances in recent years. However, it is still challenging to recover corrupted images with both vivid textures and reasonable structures. Some specific methods only tackle regular textures while losing holistic structures due to the limited receptive fields of convolutional neural networks (CNNs). On the other hand, attention-based models can learn better long-range dependency for the structure recovery, but they are limited by the heavy computation for inference with large image sizes. To address these issues, we propose to leverage an additional structure restorer to facilitate the image inpainting incrementally. The proposed model restores holistic image structures with a powerful attention-based transformer model in a fixed low-resolution sketch space. Such a grayscale space is easy to be upsampled to larger scales to convey correct structural information. Our structure restorer can be integrated with other pretrained inpainting models efficiently with the zero-initialized residual addition. Furthermore, a masking positional encoding strategy is utilized to improve the performance with large irregular masks. Extensive experiments on various datasets validate the efficacy of our model compared with other competitors. Our codes are released in https://github.com/DQiaole/ZITS_inpainting.

PaperPDFConference PDFCodeCode Syntology ran

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

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2203.00867")

Code

Syntology Ran 6 of 16 code samples harvested from 2 repositories linked to this paper; 10 have no recorded run. Of those that ran: 1 ran · honoured contract; 5 ran with no contract checked.

By repository: official repository: 9 samples from 1 repository, 6 ran; community (archive-listed): 7 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

dqiaole/zits_inpainting officialmentioned in papermentioned on GitHubpytorchApache-2.0 report
dqiaole/zits mentioned on GitHubpytorchApache-2.0 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

16 samples harvested; 6 ran; 1 honoured the contract we drafted; 10 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
5ran
10unverified

Licence: 0 of the 16 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “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. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (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 from a repository marked official are listed first. 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 four 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; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). 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.

CausalSelfAttention DQiaole/ZITS_inpainting/src/models/TSR_model.py official repository ran fingerprinted Apache-2.0 (permissive) · 374b0040c780395d · report
GELU DQiaole/ZITS_inpainting/src/models/TSR_model.py official repository ran fingerprinted Apache-2.0 (permissive) · c088eb9584bb3903 · report
GELU2 DQiaole/ZITS_inpainting/src/models/TSR_model.py official repository ran fingerprinted Apache-2.0 (permissive) · 0dcf0903f8538d11 · report
SelfAttention DQiaole/ZITS_inpainting/src/models/TSR_model.py official repository ran Apache-2.0 (permissive) · 96c2a9a4d1843cec · report
gelu DQiaole/ZITS_inpainting/src/models/TSR_model.py official repository ran · honoured contract fingerprinted Apache-2.0 (permissive) · 50e1ffed03f484ec · report
my_Block_2 DQiaole/ZITS_inpainting/src/models/TSR_model.py official repository ran fingerprinted Apache-2.0 (permissive) · 5db9dac361c10f1f · report
AxialAttention DQiaole/ZITS_inpainting/src/models/TSR_model.py official repository unverified Apache-2.0 (permissive) · 79e5b2a4b67a561a · report
BlockAxial DQiaole/ZITS_inpainting/src/models/TSR_model.py official repository unverified Apache-2.0 (permissive) · fba8e898c2b6bfd4 · report
EdgeLineGPT256RelBCE DQiaole/ZITS_inpainting/src/models/TSR_model.py official repository unverified Apache-2.0 (permissive) · cdf9104f2e54ae72 · report
SampleEdgeLineLogits dqiaole/zits/src/utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 42c0844d8edaf70f · report
calculate_activation_statistics dqiaole/zits/src/inpainting_metrics.py community (archive-listed) unverified Apache-2.0 (permissive) · 1c2fb75a32c87a57 · report
calculate_frechet_distance dqiaole/zits/src/inpainting_metrics.py community (archive-listed) unverified Apache-2.0 (permissive) · d059051e90165ebe · report
create_mask dqiaole/zits/src/utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 817b9a0ad441fb50 · report
get_activations dqiaole/zits/src/inpainting_metrics.py community (archive-listed) unverified Apache-2.0 (permissive) · 18bfc140d0a26202 · report
stitch_images dqiaole/zits/src/utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 9ff337bc4bf82da5 · report
to_int dqiaole/zits/datasets/dataset_FTR.py community (archive-listed) unverified Apache-2.0 (permissive) · bad108729054f08a · report

Tasks

Image Inpainting

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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