SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2303.00748 · CVPR · 2023

Efficient and Explicit Modelling of Image Hierarchies for Image Restoration

Radu Timofte, Luc Gool, Yawei Li, Yuchen Fan, Xiaoyu Xiang, Rakesh Ranjan, Denis Demandolx

arXiv · PDF · Open in the Atlas

Code that ran

11 of 12 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 6 have no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2303.00748.json · badge: /api/ran/2303.00748.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
ofsoundof/GRL-Image-Restoration canonical (classifier label)
classifier basis not recorded on the link
11 ran · 1 no recorded run
FunctionStatusWhere it lives
default_conv Ran
ran; our contract draft was wrong, not the code
ofsoundof/GRL-Image-Restoration/models/common/common_edsr.py
code served (permissive licence) · get_code("8b0e794d4d8f9b13")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Conv2d. 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 = {
    'in_channels': 3,
    'out_channels': 5,
    'kernel_size': 3,
    'bias': True
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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_image_paths Ran
ran; our contract draft was wrong, not the code
ofsoundof/GRL-Image-Restoration/utils/utils_bsr/utils_image.py
pointer only (licence: MIT); the stored copy get_code serves, from QMoQ/OAPT, is pointer only (licence: NONE) · get_code("f9d4c247328f3337")
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 QMoQ/OAPT, 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.

insert_bn Ran
ran; our contract draft was wrong, not the code
ofsoundof/GRL-Image-Restoration/models/aux_archs/vgg.py
pointer only (licence: MIT); the stored copy get_code serves, from Jiayi-Fu/IPC-Dehaze, is pointer only (licence: NOASSERTION) · get_code("5360d45b71ae2bb1")
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 Jiayi-Fu/IPC-Dehaze, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

is_image_file Ran
ran, violated the contract we drafted
ofsoundof/GRL-Image-Restoration/utils/utils_bsr/utils_image.py
pointer only (licence: MIT); the stored copy get_code serves, from QMoQ/OAPT, is pointer only (licence: NONE) · get_code("226f6afcd57ff476")
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 QMoQ/OAPT, 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.

is_image_file Ran
ran on a synthesized input
ofsoundof/GRL-Image-Restoration/utils/image_utils.py
code served (permissive licence) · get_code("d8709f460c3945ff")
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 bool, 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

def is_image_file(filename):
    return any((filename.endswith(extension) for extension in ['.jpg']))

ARGS = {
    'filename': 'test_image.jpg'
}
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 bool, 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
is_numpy_file Ran
ran on a synthesized input
ofsoundof/GRL-Image-Restoration/utils/image_utils.py
code served (permissive licence) · get_code("2e6c9cf740755d88")
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 bool, 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

def is_numpy_file(filename):
    return any((filename.endswith(extension) for extension in ['.npy']))

ARGS = {
    'filename': 'data.npy'
}
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 bool, 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
is_png_file Ran
ran on a synthesized input
ofsoundof/GRL-Image-Restoration/utils/image_utils.py
code served (permissive licence) · get_code("61540a6c08cb232a")
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 bool, 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 numpy as np

def is_png_file(filename):
    return any((filename.endswith(extension) for extension in ['.png']))

ARGS = {
    'filename': 'test_image.png'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
modcrop Ran
ran on a synthesized input
ofsoundof/GRL-Image-Restoration/utils/utils_image.py
code served (permissive licence) · get_code("5ccdf73de87b7bf0")
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 ndarray, ndim 2, dtype family int, shape (8, 12) 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

# Create a 2D image (grayscale)
img_2d = np.random.randint(0, 256, size=(10, 15), dtype=np.uint8)

# Create a 3D image (RGB)
img_3d = np.random.randint(0, 256, size=(12, 18, 3), dtype=np.uint8)

# Test with 2D image and scale factor
ARGS = {
    'img_in': img_2d,
    'scale': 4
}
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 ndarray, ndim 2, dtype family int, shape (8, 12) — shape (8, 12) 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
shave Ran
ran on a synthesized input
ofsoundof/GRL-Image-Restoration/utils/utils_image.py
code served (permissive licence) · get_code("0455799ef89f3e08")
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 4, dtype family float, shape (2, 3, 4, 2) 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 numpy as np

torch.manual_seed(0)

# The function shaves off border pixels from all sides of an image tensor
# img: a tensor with shape [..., height, width]
# border: an integer specifying how many pixels to remove from each side

# Create a small image tensor with shape (batch, channels, height, width)
# Using distinct dimensions: batch=2, channels=3, height=8, width=6
img = torch.randn(2, 3, 8, 6)

# Create a border value
border = 2

ARGS = {
    "img": img,
    "border": border,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 4, 2) — shape (2, 3, 4, 2) 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
tensor_round Ran
ran on a synthesized input
ofsoundof/GRL-Image-Restoration/utils/utils_image.py
code served (permissive licence) · get_code("5d49a4c5c692b24f")
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 2, dtype family float, shape (2, 4) 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

torch.manual_seed(0)

# Create a small tensor with values in a reasonable range
img = torch.rand(2, 4) * 2.0  # values between 0 and 2

# The function uses:
# - img.clamp_() - modifies tensor in place
# - img * scalar operations
# - .round() method
# So we just need a regular torch tensor

ARGS = {
    "img": img,
    "data_range": 1.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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
tv_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ofsoundof/GRL-Image-Restoration/losses/losses.py
code served (permissive licence) · get_code("9560f94a99c0322b")
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

torch.manual_seed(0)

# Create a small image tensor: (batch=2, channels=3, height=4, width=5)
# The function expects 4D tensor and performs operations on spatial dimensions
x = torch.randn(2, 3, 4, 5)

ARGS = {
    "x": x,
    "beta": 0.5,
    "reg_coeff": 5
}
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
patches_from_image Not yet run
unverified (harvested, no recorded run)
ofsoundof/GRL-Image-Restoration/utils/utils_bsr/utils_image.py
pointer only (licence: MIT); the stored copy get_code serves, from QMoQ/OAPT, is pointer only (licence: NONE) · get_code("3984b3ec31e90ef0")
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 QMoQ/OAPT, 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. No invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 6 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 3 the same month, 6 later) and 6 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
34 dated earlier, 1 the same month, 27 later
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
default_conv 57 other papers
25 dated earlier, 2 the same month, 27 later, 3 same year, order not determinable · 2 only as an assembly brick
1707.02921 (2017-07)
Enhanced Deep Residual Networks for Single Image Super-Resolution
1803.02735 (2018-03)
Deep Back-Projection Networks For Super-Resolution
1803.04626 (2018-03)
Maintaining Natural Image Statistics with the Contextual Loss
and 54 more not named here
insert_bn 12 other papers
1 the same month, 11 later · 3 only as an assembly brick
2303.06373 (2023-03)
Recursive Generalization Transformer for Image Super-Resolution
2304.03994 (2023-04)
RIDCP: Revitalizing Real Image Dehazing via High-Quality Codebook Priors
2308.03262 (2023-08)
A Benchmark for Chinese-English Scene Text Image Super-resolution
and 9 more not named here
patches_from_image 8 other papers
2 dated earlier, 6 later
2103.14006 (2021-03)
Designing a Practical Degradation Model for Deep Blind Image Super-Resolution
2203.13278 (2022-03)
Practical Blind Image Denoising via Swin-Conv-UNet and Data Synthesis
2305.01644 (2023-05)
Key-Locked Rank One Editing for Text-to-Image Personalization
and 5 more not named here
get_image_paths 7 other papers
3 dated earlier, 4 later
2009.11551 (2020-09)
Residual Feature Distillation Network for Lightweight Image Super-Resolution
2103.14006 (2021-03)
Designing a Practical Degradation Model for Deep Blind Image Super-Resolution
2205.05675 (2022-05)
NTIRE 2022 Challenge on Efficient Super-Resolution: Methods and Results
and 4 more not named here
tv_loss 3 other papers
3 later
2308.03867 (2023-08)
From Sky to the Ground: A Large-scale Benchmark and Simple Baseline Towards Real Rain Removal
2309.04803 (2023-09)
Towards Real-World Burst Image Super-Resolution: Benchmark and Method
Zhou_Adapt_or_Perish_Adaptive_Sparse_Transformer_with_Attentive_Feature_Refinement_CVPR_2024_paper (2024 (year only))
Adapt or Perish: Adaptive Sparse Transformer with Attentive Feature Refinement for Image Restoration

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

The aim of this paper is to propose a mechanism to efficiently and explicitly model image hierarchies in the global, regional, and local range for image restoration. To achieve that, we start by analyzing two important properties of natural images including cross-scale similarity and anisotropic image features. Inspired by that, we propose the anchored stripe self-attention which achieves a good balance between the space and time complexity of self-attention and the modelling capacity beyond the regional range. Then we propose a new network architecture dubbed GRL to explicitly model image hierarchies in the Global, Regional, and Local range via anchored stripe self-attention, window self-attention, and channel attention enhanced convolution. Finally, the proposed network is applied to 7 image restoration types, covering both real and synthetic settings. The proposed method sets the new stateof-the-art for several of those. Code will be available at https://github.com/ofsoundof/GRL-Image-Restoration.git.

For agents

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

get_harvested_code_for_paper("2303.00748")
get_code_for_paper("2303.00748")
have("2303.00748")

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

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

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

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

Connect an agent — have() is free.