SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 136780474 · ECCV · 2022

Hourglass Attention Network for Image Inpainting

Sanping Zhou, Ye Deng, Siqi Hui, Rongye Meng, Jinjun Wang

Open in the Atlas

Code that ran

14 of 15 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 9 have no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/136780474.json · badge: /api/ran/136780474.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
dengyecode/hourglassattention canonical (classifier label)
classifier basis: census
14 ran · 1 no recorded run
FunctionStatusWhere it lives
ContentLoss Ran
ran on a synthesized input
dengyecode/hourglassattention/model/external_function.py
code served (permissive licence) · get_code("04079e128fb56a07")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for input and target
# Using distinct dimensions: batch=2, features=4
input_tensor = torch.randn(2, 4)
target_tensor = torch.randn(2, 4)

ARGS = {
    "input": input_tensor,
    "target": target_tensor,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
cal_gradient_penalty Ran
ran on a synthesized input
dengyecode/hourglassattention/model/external_function.py
code served (permissive licence) · get_code("c7fc9cb42e540ede")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Define a minimal discriminator network
class SimpleDiscriminator(nn.Module):
    def __init__(self):
        super(SimpleDiscriminator, self).__init__()
        self.fc = nn.Linear(12, 1)  # Input: flattened 2x2x3 = 12, output: 1
    
    def forward(self, x):
        x = x.view(x.size(0), -1)
        return self.fc(x)

# Create instances
netD = SimpleDiscriminator()

# Create real and fake data tensors
# Batch size: 2, spatial dims: 2x2, channels: 3
batch_size = 2
real_data = torch.randn(batch_size, 3, 2, 2)
fake_data = torch.randn(batch_size, 3, 2, 2)

ARGS = {
    'netD': netD,
    'real_data': real_data,
    'fake_data': fake_data,
    'type': 'mixed',
    'constant': 1.0,
    'lambda_gp': 10.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_errors Ran
ran on a synthesized input
dengyecode/hourglassattention/util/evaluation.py
code served (permissive licence) · get_code("9223b397ffc8582a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import math

np.random.seed(0)

# Create two small numpy arrays representing ground truth and predictions
# Using distinct dimensions (4 x 3) to make shapes unambiguous
gt = np.random.randint(0, 256, size=(4, 3)).astype(np.float32)
pre = np.random.randint(0, 256, size=(4, 3)).astype(np.float32)

ARGS = {
    "gt": gt,
    "pre": pre,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_nonlinearity_layer Ran
ran on a synthesized input
dengyecode/hourglassattention/model/base_function.py
code served (permissive licence) · get_code("62cbd3fb459fec6e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned PReLU. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Test different activation types
ARGS = {
    'activation_type': 'PReLU'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PReLU — a PReLU output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PReLU output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_norm_layer Ran
ran on a synthesized input
dengyecode/hourglassattention/model/base_function.py
code served (permissive licence) · get_code("d6b29aa14a3540ff")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned partial. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import functools

torch.manual_seed(0)

ARGS = {
    'norm_type': 'batch'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type partial — a partial output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a partial output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_pad Ran
ran on a synthesized input
dengyecode/hourglassattention/model/base_function.py
code served (permissive licence) · get_code("365bff967b0ae6db")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

def get_pad(in_, ksize, stride, atrous=1):
    out_ = np.ceil(float(in_) / stride)
    return int(((out_ - 1) * stride + atrous * (ksize - 1) + 1 - in_) / 2)

ARGS = {
    "in_": 64,
    "ksize": 3,
    "stride": 2,
    "atrous": 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_transform Ran
ran on a synthesized input
dengyecode/hourglassattention/dataloader/data_loader.py
code served (permissive licence) · get_code("794824c043b9146c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Compose. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torchvision.transforms as transforms

class OptConfig:
    def __init__(self, loadSize, fineSize, isTrain, resize_or_crop, no_augment, no_flip, no_rotation):
        self.loadSize = loadSize
        self.fineSize = fineSize
        self.isTrain = isTrain
        self.resize_or_crop = resize_or_crop
        self.no_augment = no_augment
        self.no_flip = no_flip
        self.no_rotation = no_rotation

opt_train = OptConfig(
    loadSize=[256, 256],
    fineSize=[224, 224],
    isTrain=True,
    resize_or_crop='resize_and_crop',
    no_augment=False,
    no_flip=False,
    no_rotation=False
)

ARGS = {
    'opt': opt_train
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_image_file Ran
ran, violated the contract we drafted
dengyecode/hourglassattention/dataloader/image_folder.py
pointer only (licence: MIT); the stored copy get_code serves, from sgoldyaev/DeepFashion.ADGAN, is pointer only (licence: NONE) · get_code("ab4109634b75ef8b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from sgoldyaev/DeepFashion.ADGAN, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

l2normalize Ran
ran; our contract draft was wrong, not the code
dengyecode/hourglassattention/model/external_function.py
pointer only (licence: MIT); the stored copy get_code serves, from xxxliu95/RA_FA_Cardiac, is pointer only (licence: NONE) · get_code("bedff51745d2cf84")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from xxxliu95/RA_FA_Cardiac, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

make_dataset Ran
ran on a synthesized input
dengyecode/hourglassattention/dataloader/image_folder.py
code served (permissive licence) · get_code("8614682bdf097a6c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile

# Create a temporary directory with some image files for testing
temp_dir = tempfile.mkdtemp()

# Create some dummy image files
image_files = ['test1.jpg', 'test2.png', 'test3.bmp']
for img_file in image_files:
    open(os.path.join(temp_dir, img_file), 'w').close()

# Create a temporary txt file with image paths
temp_txt = tempfile.NamedTemporaryFile(mode='w', suffix='.txt', delete=False)
temp_txt.write(os.path.join(temp_dir, 'test1.jpg') + '\n')
temp_txt.write(os.path.join(temp_dir, 'test2.png') + '\n')
temp_txt.close()

# Test with directory path
ARGS = {
    'path_files': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
make_dataset_txt Ran
ran on a synthesized input
dengyecode/hourglassattention/dataloader/image_folder.py
code served (permissive licence) · get_code("646ae870cdce9807")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import os

# Create a temporary text file with image paths
temp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.txt', delete=False)
temp_file.write("image1.jpg\n")
temp_file.write("image2.png\n")
temp_file.write("image3.jpg\n")
temp_file.close()

ARGS = {
    "files": temp_file.name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
make_layers Ran
ran; our contract draft was wrong, not the code
dengyecode/hourglassattention/model/vgg.py
code served (permissive licence) · get_code("ac62432dc5134b0d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Sequential. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function takes two parameters: cfg and batch_norm
# cfg should be a list/sequence of either integers (channel counts) or 'M' (maxpool marker)
# batch_norm is a boolean flag

# Using one of the predefined configurations from the module-level cfg dict
cfg_list = [64, 'M', 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512, 'M']

ARGS = {
    'cfg': cfg_list,
    'batch_norm': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
vgg11 Ran
ran; our contract draft was wrong, not the code
dengyecode/hourglassattention/model/vgg.py
code served (permissive licence) · get_code("0f501772501ffd1e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned VGG. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'pretrained': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type VGG — a VGG output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VGG output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
vgg11_bn Ran
ran; our contract draft was wrong, not the code
dengyecode/hourglassattention/model/vgg.py
code served (permissive licence) · get_code("16bb9df35979ec55")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned VGG. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'pretrained': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type VGG — a VGG output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VGG output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
spectral_norm Not yet run
unverified (harvested, no recorded run)
dengyecode/hourglassattention/model/network.py
code served (permissive licence) · get_code("e20778084b72b0e0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 7 later) and 8 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
is_image_file 62 other papers
22 dated earlier, 30 later, 10 same year, order not determinable
1609.04802 (2016-09)
Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network
1703.07511 (2017-03)
Deep Photo Style Transfer
1710.10916 (2017-10)
StackGAN++: Realistic Image Synthesis with Stacked Generative Adversarial Networks
and 59 more not named here
make_layers 59 other papers
29 dated earlier, 23 later, 7 same year, order not determinable
1411.4038 (2014-11)
Fully Convolutional Networks for Semantic Segmentation
1511.00561 (2015-11)
SegNet: A Deep Convolutional Encoder-Decoder Architecture for Image Segmentation
1511.05950 (2015-11)
Staleness-aware Async-SGD for Distributed Deep Learning
and 56 more not named here
l2normalize 27 other papers
14 dated earlier, 9 later, 4 same year, order not determinable · 2 only as an assembly brick
1703.09452 (2017-03)
SEGAN: Speech Enhancement Generative Adversarial Network
1802.05957 (2018-02)
Spectral Normalization for Generative Adversarial Networks
1806.03589 (2018-06)
Free-Form Image Inpainting with Gated Convolution
and 24 more not named here
spectral_norm 14 other papers
5 dated earlier, 4 later, 5 same year, order not determinable · 5 only as an assembly brick
1804.07723 (2018-04)
Image Inpainting for Irregular Holes Using Partial Convolutions
1908.00463 (2019-08)
DIODE: A Dense Indoor and Outdoor DEpth Dataset
1911.10375 (2019-11)
Region Normalization for Image Inpainting
and 11 more not named here
vgg11 10 other papers
3 dated earlier, 5 later, 2 same year, order not determinable
1610.02391 (2016-10)
Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization
1904.03441 (2019-04)
Iterative Normalization: Beyond Standardization towards Efficient Whitening
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
and 7 more not named here
vgg11_bn 9 other papers
2 dated earlier, 5 later, 2 same year, order not determinable
1904.03441 (2019-04)
Iterative Normalization: Beyond Standardization towards Efficient Whitening
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
2203.07615 (2022-03)
Learning What Not to Segment: A New Perspective on Few-Shot Segmentation
and 6 more not named here
get_pad 3 other papers
1 dated earlier, 2 later
1908.00463 (2019-08)
DIODE: A Dense Indoor and Outdoor DEpth Dataset
2302.09491 (2023-02)
X-Adv: Physical Adversarial Object Attacks against X-ray Prohibited Item Detection
aaai_28245 (2024 (year only))
ViTEraser: Harnessing the Power of Vision Transformers for Scene Text Removal with SegMIM Pretraining

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Benefiting from the powerful ability of convolutional neural networks (CNNs) to learn semantic information and texture patterns of images, learning-based image inpainting methods have made noticeable breakthroughs over the years. However, certain inherent defects (e.g. local prior, spatially sharing parameters) of CNNs limit their performance when encountering broken images mixed with invalid information. Compared to convolution, attention has a lower inductive bias, and the output is highly correlated with the input, making it more suitable for processing images with various breakage. Inspired by this, in this paper we propose a novel attention-based network (transformer), called hourglass attention network (HAN) for image inpainting, which builds an hourglass-shaped attention structure to generate appropriate features for complemented images. In addition, we design a novel attention called Laplace attention, which introduces a Laplace distance prior for the vanilla multi-head attention, allowing the feature matching process to consider not only the similarity of features themselves, but also distance between features. With the synergy of hourglass attention structure and Laplace attention, our HAN is able to make full use of hierarchical features to mine effective information for broken images. Experiments on several benchmark datasets demonstrate superior performance by our proposed approach. The code can be found at github.com/dengyecode/hourglassattention.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("136780474")
get_code_for_paper("136780474")
have("136780474")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/136780474.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/136780474.svg)](https://syntology.ai/paper/136780474)

Connect an agent — have() is free.