SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2103.14006 · ICCV · 2021

Designing a Practical Degradation Model for Deep Blind Image Super-Resolution

Radu Timofte, Luc Gool, Kai Zhang, Jingyun Liang

arXiv · PDF · Open in the Atlas

Code that ran

9 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; 1 honoured the contract we drafted, 2 violated it and 1 has no contract verdict; 5 failures of our instrument; 3 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/2103.14006.json · badge: /api/ran/2103.14006.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
cszn/BSRGAN canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
kadirnar/bsrgan-pip community (classifier label)
classifier basis: plan_row
6 ran · 3 no recorded run
FunctionStatusWhere it lives
analytic_kernel Ran
ran, violated the contract we drafted
kadirnar/bsrgan-pip/bsrgan/utils/utils_blindsr.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from cvlab-stonybrook/large-image-diffusion, is pointer only (licence: NONE) · get_code("b04722a19845dc90")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from cvlab-stonybrook/large-image-diffusion, 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.

anisotropic_Gaussian Ran
ran, honoured the contract we drafted
kadirnar/bsrgan-pip/bsrgan/utils/utils_blindsr.py
code served (permissive licence) · get_code("83daf8f77e32f15b")
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 float, shape (15, 15) 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
import scipy.stats as ss

def gm_blur_kernel(mean, cov, size=15):
    center = size / 2.0 + 0.5
    k = np.zeros([size, size])
    for y in range(size):
        for x in range(size):
            cy = y - center + 1
            cx = x - center + 1
            k[y, x] = ss.multivariate_normal.pdf([cx, cy], mean=mean, cov=cov)
    k = k / np.sum(k)
    return k

def anisotropic_Gaussian(ksize=15, theta=np.pi, l1=6, l2=6):
    """ generate an anisotropic Gaussian kernel
    Args:
        ksize : e.g., 15, kernel size
        theta : [0,  pi], rotation angle range
        l1    : [0.1,50], scaling of eigenvalues
        l2    : [0.1,l1], scaling of eigenvalues
        If l1 = l2, will get an isotropic Gaussian kernel.

    Returns:
        k     : kernel
    """
    v = np.dot(np.array([[np.cos(theta), -np.sin(theta)], [np.sin(theta), np.cos(theta)]]), np.array([1.0, 0.0]))
    V = np.array([[v[0], v[1]], [v[1], -v[0]]])
    D = np.array([[l1, 0], [0, l2]])
    Sigma = np.dot(np.dot(V, D), np.linalg.inv(V))
    k = gm_blur_kernel(mean=[0, 0], cov=Sigma, size=ksize)
    return k

ARGS = {
    "ksize": 15,
    "theta": np.pi / 4,
    "l1": 6.0,
    "l2": 3.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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 float, shape (15, 15) — shape (15, 15) 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
find_last_checkpoint Ran
ran; our contract draft was wrong, not the code
cszn/BSRGAN/utils/utils_model.py
code served (permissive licence) · get_code("a81b59f721cab8ed")
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 os
import tempfile
import shutil

# Create a temporary directory for testing
test_dir = tempfile.mkdtemp()

# Create some mock checkpoint files
# The function looks for files matching pattern: {number}_{net_type}.pth
os.makedirs(test_dir, exist_ok=True)

# Create checkpoint files with different iteration numbers
checkpoint_files = [
    os.path.join(test_dir, '1000_G.pth'),
    os.path.join(test_dir, '2000_G.pth'),
    os.path.join(test_dir, '500_G.pth'),
]

for checkpoint_file in checkpoint_files:
    with open(checkpoint_file, 'w') as f:
        f.write('')

ARGS = {
    'save_dir': test_dir,
    'net_type': 'G'
}
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, 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_image_paths Ran
ran; our contract draft was wrong, not the code
kadirnar/bsrgan-pip/bsrgan/utils/utils_image.py
pointer only (licence: Apache-2.0); 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 (Apache-2.0), 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, violated the contract we drafted
kadirnar/bsrgan-pip/bsrgan/utils/utils_image.py
pointer only (licence: Apache-2.0); 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 (Apache-2.0), 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.

make_layer Ran
ran; our contract draft was wrong, not the code
cszn/BSRGAN/models/network_rrdbnet.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from haoyuc/A2N, is pointer only (licence: NONE) · get_code("c04a23de0531da4a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from haoyuc/A2N, 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.

modcrop_np Ran
ran; our contract draft was wrong, not the code
kadirnar/bsrgan-pip/bsrgan/utils/utils_blindsr.py
code served (permissive licence) · get_code("234d6e4ddfb2bd2b")
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 3, dtype family int, shape (6, 4, 3) 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 small test image: 7x5 (width x height) with 3 channels (RGB)
img = np.random.randint(0, 256, size=(7, 5, 3), dtype=np.uint8)

# Scale factor
sf = 2

ARGS = {
    "img": img,
    "sf": sf
}
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 3, dtype family int, shape (6, 4, 3) — shape (6, 4, 3) 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
sizeof_fmt Ran
ran on a synthesized input
cszn/BSRGAN/utils/utils_googledownload.py
code served (permissive licence) · get_code("8e2cdf074541b1a3")
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 str. 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 numpy as np

torch.manual_seed(0)

ARGS = {
    'size': 5368709120,
    'suffix': 'B'
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
test Ran
ran; our contract draft was wrong, not the code
kadirnar/bsrgan-pip/bsrgan/utils/utils_model.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from guanys-dar/mgdn, is pointer only (licence: NONE) · get_code("8afaf26fe2391d00")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from guanys-dar/mgdn, 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.

attempt_download_from_hub Not yet run
unverified (harvested, no recorded run)
kadirnar/bsrgan-pip/bsrgan/main_download_pretrained_models.py
code served (permissive licence) · get_code("08caa2c6cc22235a")
How it ran

no invocation recorded.

get_confirm_token Not yet run
unverified (harvested, no recorded run)
kadirnar/bsrgan-pip/bsrgan/utils/utils_googledownload.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from med-air/FedBN, is pointer only (licence: NONE) · get_code("135b3dc835ffe6ad")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from med-air/FedBN, 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.

patches_from_image Not yet run
unverified (harvested, no recorded run)
kadirnar/bsrgan-pip/bsrgan/utils/utils_image.py
pointer only (licence: Apache-2.0); 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 (Apache-2.0), 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, 11 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 11 later) and 1 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
17 dated earlier, 45 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
get_confirm_token 38 other papers
27 dated earlier, 11 later
1409.8230 (2014-09)
RENOIR - A Dataset for Real Low-Light Image Noise Reduction
1503.03832 (2015-03)
FaceNet: A Unified Embedding for Face Recognition and Clustering
1506.03134 (2015-06)
Pointer Networks
and 35 more not named here
make_layer 31 other papers
8 dated earlier, 23 later · 6 only as an assembly brick
1809.00219 (2018-09)
ESRGAN: Enhanced Super-Resolution Generative Adversarial Networks
1905.02716 (2019-05)
EDVR: Video Restoration with Enhanced Deformable Convolutional Networks
1905.10485 (2019-05)
Generative Latent Flow
and 28 more not named here
patches_from_image 8 other papers
8 later
2203.13278 (2022-03)
Practical Blind Image Denoising via Swin-Conv-UNet and Data Synthesis
2303.00748 (2023-03)
Efficient and Explicit Modelling of Image Hierarchies for Image Restoration
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
1 dated earlier, 6 later
2009.11551 (2020-09)
Residual Feature Distillation Network for Lightweight Image Super-Resolution
2205.05675 (2022-05)
NTIRE 2022 Challenge on Efficient Super-Resolution: Methods and Results
2303.00748 (2023-03)
Efficient and Explicit Modelling of Image Hierarchies for Image Restoration
and 4 more not named here
find_last_checkpoint 5 other papers
5 later
2106.15368 (2021-06)
Text Prior Guided Scene Text Image Super-resolution
2207.13784 (2022-07)
AvatarPoser: Articulated Full-Body Pose Tracking from Sparse Motion Sensing
2308.08855 (2023-08)
Realistic Full-Body Tracking from Sparse Observations via Joint-Level Modeling
and 2 more not named here
analytic_kernel 4 other papers
4 later
2305.01644 (2023-05)
Key-Locked Rank One Editing for Text-to-Image Personalization
2308.02228 (2023-08)
Painterly Image Harmonization using Diffusion Model
2310.19011 (2023-10)
Efficient Test-Time Adaptation for Super-Resolution with Second-Order Degradation and Reconstruction
and 1 more not named here
anisotropic_Gaussian 4 other papers
4 later
2305.01644 (2023-05)
Key-Locked Rank One Editing for Text-to-Image Personalization
2308.02228 (2023-08)
Painterly Image Harmonization using Diffusion Model
2310.19011 (2023-10)
Efficient Test-Time Adaptation for Super-Resolution with Second-Order Degradation and Reconstruction
and 1 more not named here
modcrop_np 4 other papers
4 later
2305.01644 (2023-05)
Key-Locked Rank One Editing for Text-to-Image Personalization
2308.02228 (2023-08)
Painterly Image Harmonization using Diffusion Model
2310.19011 (2023-10)
Efficient Test-Time Adaptation for Super-Resolution with Second-Order Degradation and Reconstruction
and 1 more not named here
test 4 other papers
1 dated earlier, 3 later
2008.13751 (2020-08)
Plug-and-Play Image Restoration with Deep Denoiser Prior
2203.13278 (2022-03)
Practical Blind Image Denoising via Swin-Conv-UNet and Data Synthesis
2308.12538 (2023-08)
Mutual-Guided Dynamic Network for Image Fusion
and 1 more not named here
sizeof_fmt 1 other paper
1 later
2203.13278 (2022-03)
Practical Blind Image Denoising via Swin-Conv-UNet and Data Synthesis

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

It is widely acknowledged that single image superresolution (SISR) methods would not perform well if the assumed degradation model deviates from those in real images. Although several degradation models take additional factors into consideration, such as blur, they are still not effective enough to cover the diverse degradations of real images. To address this issue, this paper proposes to design a more complex but practical degradation model that consists of randomly shuffled blur, downsampling and noise degradations. Specifically, the blur is approximated by two convolutions with isotropic and anisotropic Gaussian kernels; the downsampling is randomly chosen from nearest, bilinear and bicubic interpolations; the noise is synthesized by adding Gaussian noise with different noise levels, adopting JPEG compression with different quality factors, and generating processed camera sensor noise via reverse-forward camera image signal processing (ISP) pipeline model and RAW image noise model. To verify the effectiveness of the new degradation model, we have trained a deep blind ES-RGAN super-resolver and then applied it to super-resolve both synthetic and real images with diverse degradations. The experimental results demonstrate that the new degradation model can help to significantly improve the practicability of deep super-resolvers, thus providing a powerful alternative solution for real SISR applications.

For agents

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

get_harvested_code_for_paper("2103.14006")
get_code_for_paper("2103.14006")
have("2103.14006")

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

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

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

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

Connect an agent — have() is free.