SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1809.00219 · 2018

ESRGAN: Enhanced Super-Resolution Generative Adversarial Networks

arXiv · PDF · Open in the Atlas

Code that ran

33 of 44 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; 3 honoured the contract we drafted, 0 violated it and 23 have no contract verdict; 7 failures of our instrument; 11 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/1809.00219.json · badge: /api/ran/1809.00219.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
xinntao/ESRGAN canonical (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
HyeongJu916/Boaz-SR-ESRGAN-PyTorch community (classifier label)
classifier basis not recorded on the link
10 ran · 5 no recorded run
peteryuX/esrgan-tf2 community (classifier label)
classifier basis not recorded on the link
6 ran · 4 no recorded run
sdauzcm/sr-basicsr community (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
alililia/ascend_ESRGAN community (classifier label)
classifier basis not recorded on the link
5 ran · 0 no recorded run
Lornatang/ESRGAN-PyTorch community (classifier label)
classifier basis not recorded on the link
4 ran · 2 no recorded run
cviaai/PSF-GAN-ESTIMATION community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
DiscriminatorLoss Ran
ran on a synthesized input
peteryuX/esrgan-tf2/modules/losses.py
code served (permissive licence) · get_code("33f7fba25367dd03")
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 function. 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 tensorflow as tf

# Call the function with different gan_type values to create loss functions
def setup_discriminator_loss():
    # Create small dummy tensors for testing
    batch_size = 2
    feature_dim = 4
    
    # High-resolution (real) discriminator output
    hr = tf.constant([[0.8, 0.9, 0.7, 0.85], [0.75, 0.88, 0.82, 0.91]], dtype=tf.float32)
    
    # Super-resolution (fake) discriminator output
    sr = tf.constant([[0.3, 0.2, 0.4, 0.25], [0.35, 0.22, 0.28, 0.19]], dtype=tf.float32)
    
    return hr, sr

# Setup arguments for DiscriminatorLoss function
hr, sr = setup_discriminator_loss()

ARGS = {
    'gan_type': 'ragan'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
DiscriminatorVGG128 Ran
ran on a synthesized input
peteryuX/esrgan-tf2/modules/models.py
code served (permissive licence) · get_code("3c7dc4c98687dd3e")
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 Functional. 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 tensorflow as tf
import functools
from tensorflow.keras.layers import Dense, Flatten, Input, Conv2D, LeakyReLU

ARGS = {
    'size': 128,
    'channels': 3,
    'nf': 64,
    'wd': 0.0005,
    'name': 'Discriminator_VGG_128'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional 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
MultiStepLR Ran
ran on a synthesized input
peteryuX/esrgan-tf2/modules/lr_scheduler.py
code served (permissive licence) · get_code("9e0df5e5f87592dc")
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 PiecewiseConstantDecay. 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 tensorflow as tf

ARGS = {
    'initial_learning_rate': 0.1,
    'lr_steps': [1000, 2000, 3000],
    'lr_rate': 0.1,
    'name': 'MultiStepLR'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PiecewiseConstantDecay — a PiecewiseConstantDecay output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PiecewiseConstantDecay 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
PixelLoss Ran
ran on a synthesized input
peteryuX/esrgan-tf2/modules/losses.py
code served (permissive licence) · get_code("3a8e26a89fb2bbca")
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 MeanAbsoluteError. 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 tensorflow as tf

# The function PixelLoss takes a single parameter 'criterion' which is a string
# It returns a TensorFlow loss function based on the criterion type
# Valid values are 'l1' and 'l2'

ARGS = {
    'criterion': 'l1'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MeanAbsoluteError — a MeanAbsoluteError output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MeanAbsoluteError 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
act Ran
ran; our contract draft was wrong, not the code
sdauzcm/sr-basicsr/codes/models/modules/block.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from jnjaby/DISCNet, is pointer only (licence: NONE) · get_code("15d829a065897df0")
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 jnjaby/DISCNet, 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.

aggd_features Ran
ran on a synthesized input
HyeongJu916/Boaz-SR-ESRGAN-PyTorch/esrgan_pytorch/calculate_niqe.py
code served (permissive licence) · get_code("651043e835d45659")
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 scipy.special
import math

# Pre-compute the global variables used by aggd_features
gamma_range = np.arange(0.2, 10, 0.001)
a = scipy.special.gamma(2.0 / gamma_range)
b = scipy.special.gamma(1.0 / gamma_range)
c = scipy.special.gamma(3.0 / gamma_range)
prec_gammas = a / (b * c)

def aggd_features(imdata):
    imdata.shape = (len(imdata.flat),)
    imdata2 = imdata * imdata
    left_data = imdata2[imdata < 0]
    right_data = imdata2[imdata >= 0]
    left_mean_sqrt = 0
    right_mean_sqrt = 0
    if len(left_data) > 0:
        left_mean_sqrt = np.sqrt(np.average(left_data))
    if len(right_data) > 0:
        right_mean_sqrt = np.sqrt(np.average(right_data))
    if right_mean_sqrt != 0:
        gamma_hat = left_mean_sqrt / right_mean_sqrt
    else:
        gamma_hat = np.inf
    imdata2_mean = np.mean(imdata2)
    if imdata2_mean != 0:
        r_hat = np.average(np.abs(imdata)) ** 2 / np.average(imdata2)
    else:
        r_hat = np.inf
    rhat_norm = r_hat * ((math.pow(gamma_hat, 3) + 1) * (gamma_hat + 1) / math.pow(math.pow(gamma_hat, 2) + 1, 2))
    pos = np.argmin((prec_gammas - rhat_norm) ** 2)
    alpha = gamma_range[pos]
    gam1 = scipy.special.gamma(1.0 / alpha)
    gam2 = scipy.special.gamma(2.0 / alpha)
    gam3 = scipy.special.gamma(3.0 / alpha)
    aggdratio = np.sqrt(gam1) / np.sqrt(gam3)
    bl = aggdratio * left_mean_sqrt
    br = aggdratio * right_mean_sqrt
    N = (br - bl) * (gam2 / gam1)
    return (alpha, N, bl, br, left_mean_sqrt, right_mean_sqrt)

# Create test data with both negative and positive values
np.random.seed(0)
imdata = np.array([-2.5, -1.0, 0.5, 1.5, 2.0, -0.3, 1.2, -1.8], dtype=np.float64)

ARGS = {
    'imdata': imdata
}
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 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
calculate_psnr Ran
ran, honoured the contract we drafted
sdauzcm/sr-basicsr/metrics/calculate_PSNR_SSIM.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from redrock303/ADF-LLIE, is pointer only (licence: NONE) · get_code("9394ff2c25b8a988")
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 redrock303/ADF-LLIE, 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.

calculate_ssim Ran
ran, honoured the contract we drafted
sdauzcm/sr-basicsr/metrics/calculate_PSNR_SSIM.py
code served (permissive licence) · get_code("5aef99e58703c44a")
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 float64, ndim 0, 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 cv2

# Create two small test images with values in [0, 255]
# Using distinct sizes to allow shape probing
np.random.seed(0)

# Test case 1: 3D color image (height, width, channels)
img1_3d = np.random.randint(0, 256, size=(32, 32, 3), dtype=np.uint8)
img2_3d = np.random.randint(0, 256, size=(32, 32, 3), dtype=np.uint8)

# Test case 2: 2D grayscale image
img1_2d = np.random.randint(0, 256, size=(32, 32), dtype=np.uint8)
img2_2d = np.random.randint(0, 256, size=(32, 32), dtype=np.uint8)

# Test case 3: 3D single channel image
img1_single = np.random.randint(0, 256, size=(32, 32, 1), dtype=np.uint8)
img2_single = np.random.randint(0, 256, size=(32, 32, 1), dtype=np.uint8)

ARGS = {
    'img1': img1_3d,
    'img2': img2_3d,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
calculate_weights_indices Ran
ran on a synthesized input
HyeongJu916/Boaz-SR-ESRGAN-PyTorch/esrgan_pytorch/utils.py
code served (permissive licence) · get_code("4321ce86e7b65c96")
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 math

torch.manual_seed(0)

# The function calculate_weights_indices takes:
# - in_length: int, the input length
# - out_length: int, the output length
# - scale: float, the scaling factor
# - kernel_width: float, the width of the kernel
# - antialiasing: bool, whether to apply antialiasing

ARGS = {
    "in_length": 8,
    "out_length": 16,
    "scale": 2.0,
    "kernel_width": 4.0,
    "antialiasing": True
}
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
check_image_file Ran
ran on a synthesized input
HyeongJu916/Boaz-SR-ESRGAN-PyTorch/esrgan_pytorch/dataset.py
code served (permissive licence) · get_code("b97e4bafa6d5a536")
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

# The function check_image_file takes a filename string and checks if it ends with
# any of the image extensions. We need to provide a valid filename string.

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
compute_image_mscn_transform Ran
ran on a synthesized input
HyeongJu916/Boaz-SR-ESRGAN-PyTorch/esrgan_pytorch/calculate_niqe.py
code served (permissive licence) · get_code("668d7b024ce7ffae")
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 3, 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 scipy.ndimage

def gen_gauss_window(lw, sigma):
    sd = np.float32(sigma)
    lw = int(lw)
    weights = [0.0] * (2 * lw + 1)
    weights[lw] = 1.0
    sum = 1.0
    sd *= sd
    for ii in range(1, lw + 1):
        tmp = np.exp(-0.5 * np.float32(ii * ii) / sd)
        weights[lw + ii] = tmp
        weights[lw - ii] = tmp
        sum += 2.0 * tmp
    for ii in range(2 * lw + 1):
        weights[ii] /= sum
    return weights

def compute_image_mscn_transform(image, C=1, avg_window=None, extend_mode='constant'):
    if avg_window is None:
        avg_window = gen_gauss_window(3, 7.0 / 6.0)
    assert len(np.shape(image)) == 2
    h, w = np.shape(image)
    mu_image = np.zeros((h, w), dtype=np.float32)
    var_image = np.zeros((h, w), dtype=np.float32)
    image = np.array(image).astype('float32')
    scipy.ndimage.correlate1d(image, avg_window, 0, mu_image, mode=extend_mode)
    scipy.ndimage.correlate1d(mu_image, avg_window, 1, mu_image, mode=extend_mode)
    scipy.ndimage.correlate1d(image ** 2, avg_window, 0, var_image, mode=extend_mode)
    scipy.ndimage.correlate1d(var_image, avg_window, 1, var_image, mode=extend_mode)
    var_image = np.sqrt(np.abs(var_image - mu_image ** 2))
    return ((image - mu_image) / (var_image + C), var_image, mu_image)

# Create a small 2D image (4x3 for distinct dimensions)
image = np.random.randn(4, 3).astype(np.float32)

# Create a custom gaussian window
avg_window = gen_gauss_window(3, 7.0 / 6.0)

ARGS = {
    'image': image,
    'C': 1,
    'avg_window': avg_window,
    'extend_mode': 'constant'
}
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 tuple, ndim 3, 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
cubic Ran
ran; our contract draft was wrong, not the code
HyeongJu916/Boaz-SR-ESRGAN-PyTorch/esrgan_pytorch/utils.py
code served (permissive licence) · get_code("cf8b0785f1ca3da5")
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)

# The function 'cubic' takes a single parameter 'x' which should be a tensor.
# It performs operations on the tensor using torch.abs, power operations, and comparisons.
# The function expects x to be a torch tensor.

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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
define_loss Ran
ran on a synthesized input
Lornatang/ESRGAN-PyTorch/train_net.py
code served (permissive licence) · get_code("cc359b637efed011")
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 L1Loss. 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
from torch import nn

torch.manual_seed(0)

# Build a minimal config that satisfies the function's requirements
config = {
    'TRAIN': {
        'LOSSES': {
            'PIXEL_LOSS': {
                'NAME': 'L1Loss'
            }
        }
    }
}

# Use CPU device
device = torch.device('cpu')

ARGS = {
    'config': config,
    'device': device
}
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 L1Loss — a L1Loss output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a L1Loss 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
flow_warp Ran
ran; our contract draft was wrong, not the code
cviaai/PSF-GAN-ESTIMATION/mmsr_code/arch_util.py
pointer only (licence: MIT); the stored copy get_code serves, from taowangzj/lldiffusion, is pointer only (licence: NONE) · get_code("7018e324f2150c43")
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 taowangzj/lldiffusion, 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.

image_to_tensor Ran
ran on a synthesized input
Lornatang/ESRGAN-PyTorch/imgproc.py
code served (permissive licence) · get_code("d14280e408db8305")
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 3, dtype family float, shape (3, 4, 6) 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 torch

torch.manual_seed(0)

# Create a small image array simulating OpenCV.imread output
# Shape: (height, width, channels) - typical for CV2 images
# Values in range [0, 255] as per function documentation
image = np.random.randint(0, 256, size=(4, 6, 3), dtype=np.uint8)

ARGS = {
    "image": image,
    "range_norm": True,
    "half": False,
}
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 3, dtype family float, shape (3, 4, 6) — shape (3, 4, 6) 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
img_convert Ran
ran on a synthesized input
alililia/ascend_ESRGAN/postprocess.py
code served (permissive licence) · get_code("fcd6dda250c5738b")
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 (4, 5, 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 cv2
import numpy as np

# Construct a sample image array with shape (3, 4, 5)
# This represents a 3-channel image with height 4 and width 5
# Values in range [0, 1] for floating point
img_np = np.random.rand(3, 4, 5).astype(np.float32)

ARGS = {
    "img_np": img_np,
    "rgb2bgr": True,
    "out_type": np.uint8,
    "min_max": (0, 1)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, 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 (4, 5, 3) — shape (4, 5, 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
imresize Ran
ran on a synthesized input
HyeongJu916/Boaz-SR-ESRGAN-PyTorch/esrgan_pytorch/utils.py
code served (permissive licence) · get_code("5dcd30c949329aa2")
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 3, dtype family float, shape (3, 16, 16) 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 math

torch.manual_seed(0)

# Create a small 3-channel image tensor (C, H, W)
# Using small dimensions: 3 channels, 8 height, 8 width
img = torch.rand(3, 8, 8)

# Scale factor for upsampling
scale = 2.0

# Antialiasing flag
antialiasing = True

ARGS = {
    'img': img,
    'scale': scale,
    'antialiasing': antialiasing
}
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 3, dtype family float, shape (3, 16, 16) — shape (3, 16, 16) 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
inference Ran
ran on a synthesized input
HyeongJu916/Boaz-SR-ESRGAN-PyTorch/esrgan_pytorch/utils/common.py
code served (permissive licence) · get_code("bf876a2e4c5b05d9")
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, 5) 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 as nn

torch.manual_seed(0)

# Create a minimal neural network model that accepts input and produces output
class MinimalSRModel(nn.Module):
    def __init__(self):
        super(MinimalSRModel, self).__init__()
        # Simple linear layer to transform input
        self.conv = nn.Conv2d(3, 3, kernel_size=3, padding=1)
    
    def forward(self, x):
        return self.conv(x)

# Instantiate the model
model = MinimalSRModel()

# Create a low-resolution tensor (batch=2, channels=3, height=4, width=5)
lr = torch.randn(2, 3, 4, 5)

# statistical_time parameter
statistical_time = False

ARGS = {
    "model": model,
    "lr": lr,
    "statistical_time": statistical_time
}
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 4, dtype family float, shape (2, 3, 4, 5) — shape (2, 3, 4, 5) 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
load_state_dict Ran
ran on a synthesized input
Lornatang/ESRGAN-PyTorch/utils.py
code served (permissive licence) · get_code("08e3b22c15672b97")
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 SimpleModel. 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
from torch import nn
from collections import OrderedDict

torch.manual_seed(0)

# Create a simple model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

# Instantiate the model
model = SimpleModel()

# Create a state dict with matching parameter names and shapes
state_dict = OrderedDict()
state_dict['linear1.weight'] = torch.randn(3, 4)
state_dict['linear1.bias'] = torch.randn(3)
state_dict['linear2.weight'] = torch.randn(2, 3)
state_dict['linear2.bias'] = torch.randn(2)

# Test case 1: non-compiled mode
compile_mode = False

ARGS = {
    'model': model,
    'compile_mode': compile_mode,
    'state_dict': state_dict
}
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 SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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
load_tfrecord_dataset Ran
ran on a synthesized input
peteryuX/esrgan-tf2/modules/dataset.py
code served (permissive licence) · get_code("27670b27fcb7619d")
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 _PrefetchDataset. 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 tensorflow as tf
import tempfile
import os

# Create a minimal valid TFRecord file for testing
def create_minimal_tfrecord(use_bin=False):
    """Create a minimal TFRecord file with valid image data"""
    temp_dir = tempfile.mkdtemp()
    tfrecord_path = os.path.join(temp_dir, 'test.tfrecord')
    
    writer = tf.io.TFRecordWriter(tfrecord_path)
    
    if use_bin:
        # Create small dummy PNG images (4x4 RGB)
        lr_img = tf.ones((4, 4, 3), dtype=tf.uint8) * 100
        hr_img = tf.ones((8, 8, 3), dtype=tf.uint8) * 150
        
        lr_encoded = tf.io.encode_png(lr_img).numpy()
        hr_encoded = tf.io.encode_png(hr_img).numpy()
        
        feature = {
            'image/img_name': tf.train.Feature(bytes_list=tf.train.BytesList(value=[b'test_image'])),
            'image/lr_encoded': tf.train.Feature(bytes_list=tf.train.BytesList(value=[lr_encoded])),
            'image/hr_encoded': tf.train.Feature(bytes_list=tf.train.BytesList(value=[hr_encoded])),
        }
    else:
        # Create temporary image files
        lr_img = tf.ones((4, 4, 3), dtype=tf.uint8) * 100
        hr_img = tf.ones((8, 8, 3), dtype=tf.uint8) * 150
        
        lr_path = os.path.join(temp_dir, 'lr.png')
        hr_path = os.path.join(temp_dir, 'hr.png')
        
        tf.io.write_file(lr_path, tf.io.encode_png(lr_img))
        tf.io.write_file(hr_path, tf.io.encode_png(hr_img))
        
        feature = {
            'image/img_name': tf.train.Feature(bytes_list=tf.train.BytesList(value=[b'test_image'])),
            'image/lr_img_path': tf.train.Feature(bytes_list=tf.train.BytesList(value=[lr_path.encode()])),
            'image/hr_img_path': tf.train.Feature(bytes_list=tf.train.BytesList(value=[hr_path.encode()])),
        }
    
    example = tf.train.Example(features=tf.train.Features(feature=feature))
    writer.write(example.SerializeToString())
    writer.close()
    
    return tfrecord_path

tfrecord_file = create_minimal_tfrecord(use_bin=True)

ARGS = {
    'tfrecord_name': tfrecord_file,
    'batch_size': 2,
    'gt_size': 4,
    'scale': 2,
    'using_bin': True,
    'using_flip': False,
    'using_rot': False,
    'shuffle': True,
    'buffer_size': 10,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type _PrefetchDataset — a _PrefetchDataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a _PrefetchDataset 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
load_yaml Ran
ran on a synthesized input
peteryuX/esrgan-tf2/modules/utils.py
code served (permissive licence) · get_code("c6d8e748cf074438")
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 dict. 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 yaml
import tempfile
import os

# Create a temporary YAML file for testing
temp_dir = tempfile.mkdtemp()
yaml_file_path = os.path.join(temp_dir, "test_config.yaml")

# Write a sample YAML file
sample_yaml_content = """
model:
  name: test_model
  layers: 3
  hidden_dim: 128
training:
  epochs: 10
  learning_rate: 0.001
data:
  batch_size: 32
  shuffle: true
"""

with open(yaml_file_path, 'w') as f:
    f.write(sample_yaml_content)

ARGS = {
    "load_path": yaml_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
make_layer Ran
ran; our contract draft was wrong, not the code
xinntao/ESRGAN/RRDBNet_arch.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.

norm Ran
ran; our contract draft was wrong, not the code
sdauzcm/sr-basicsr/codes/models/modules/block.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from jnjaby/DISCNet, is pointer only (licence: NONE) · get_code("b6a238bb90c0069b")
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 jnjaby/DISCNet, 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.

pad Ran
ran; our contract draft was wrong, not the code
sdauzcm/sr-basicsr/codes/models/modules/block.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from jnjaby/DISCNet, is pointer only (licence: NONE) · get_code("4a56ce1917d87f9b")
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 jnjaby/DISCNet, 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.

padding Ran
ran on a synthesized input
alililia/ascend_ESRGAN/preprocess.py
code served (permissive licence) · get_code("e4f005d07cebcb69")
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 (8, 10, 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 with shape (height, width, channels)
# Using distinct dimensions: 5x7x3 for height, width, channels
_img = np.random.randint(0, 256, size=(5, 7, 3), dtype=np.uint8)

# Define target shape that is larger than the image
# This will require padding
target_shape = (8, 10)

ARGS = {
    '_img': _img,
    'target_shape': target_shape
}
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 (8, 10, 3) — shape (8, 10, 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
scandir Ran
ran on a synthesized input
alililia/ascend_ESRGAN/src/util/extract_subimages.py
code served (permissive licence) · get_code("914623baf54d27d0")
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 generator. 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
import shutil

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

# Create some test files
os.makedirs(os.path.join(temp_dir, "subdir"), exist_ok=True)
open(os.path.join(temp_dir, "file1.txt"), "w").close()
open(os.path.join(temp_dir, "file2.py"), "w").close()
open(os.path.join(temp_dir, "file3.txt"), "w").close()
open(os.path.join(temp_dir, "subdir", "file4.txt"), "w").close()
open(os.path.join(temp_dir, "subdir", "file5.py"), "w").close()
open(os.path.join(temp_dir, ".hidden_file"), "w").close()

ARGS = {
    "dir_path": temp_dir,
    "suffix": ".txt",
    "recursive": True,
    "full_path": False
}
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 generator — a generator output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a generator 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
select_device Ran
ran on a synthesized input
HyeongJu916/Boaz-SR-ESRGAN-PyTorch/esrgan_pytorch/utils/device.py
code served (permissive licence) · get_code("247264d6a145b502")
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 device. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 logging

logging.basicConfig(level=logging.INFO)

# Test with CPU device
ARGS = {
    'device': 'cpu',
    'batch_size': 1
}
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 device — a device output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a device 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
ssim Ran
ran, honoured the contract we drafted
sdauzcm/sr-basicsr/metrics/calculate_PSNR_SSIM.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from AlifAshrafee/Restoring-Without-Forgetting, is pointer only (licence: NONE) · get_code("ba721aeacc165234")
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 AlifAshrafee/Restoring-Without-Forgetting, 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.

tensor_to_image Ran
ran on a synthesized input
Lornatang/ESRGAN-PyTorch/imgproc.py
code served (permissive licence) · get_code("00afe15c4a0c8764")
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 (4, 5, 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 torch
import numpy as np

torch.manual_seed(0)

# Create a small tensor in NCHW format
# N=1 (batch), C=3 (channels), H=4 (height), W=5 (width)
# Values in range [0, 1]
tensor = torch.rand(1, 3, 4, 5)

ARGS = {
    "tensor": tensor,
    "range_norm": False,
    "half": False,
}
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 ndarray, ndim 3, dtype family int, shape (4, 5, 3) — shape (4, 5, 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
train_hr_transform Ran
ran on a synthesized input
HyeongJu916/Boaz-SR-ESRGAN-PyTorch/esrgan_pytorch/dataset.py
code served (permissive licence) · get_code("5a0886f0454bfb05")
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 torch
from torchvision.transforms import Compose, RandomCrop, ToTensor, ToPILImage, CenterCrop, Resize
from torchvision.transforms import RandomHorizontalFlip, RandomVerticalFlip, RandomApply, ColorJitter

torch.manual_seed(0)

ARGS = {
    "crop_size": 256
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, 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
train_lr_transform Ran
ran on a synthesized input
HyeongJu916/Boaz-SR-ESRGAN-PyTorch/esrgan_pytorch/dataset.py
code served (permissive licence) · get_code("a73753ac253bbdd6")
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 torch
import torch.nn as nn
from torchvision.transforms import Compose, RandomCrop, ToTensor, ToPILImage, CenterCrop, Resize
from PIL import Image

torch.manual_seed(0)

ARGS = {
    "crop_size": 128,
    "upscale_factor": 4
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, 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
unpadding Ran
ran on a synthesized input
alililia/ascend_ESRGAN/postprocess.py
code served (permissive licence) · get_code("a8e0c9457b927abb")
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 float, shape (4, 3, 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 torch
import numpy as np

torch.manual_seed(0)

# Create a small image tensor with shape (height, width, channels)
# Using distinct dimensions: 6x5x3 (height x width x channels)
img = np.random.rand(6, 5, 3).astype(np.float32)

# Define target shape as (height, width)
target_shape = (4, 3)

ARGS = {
    "img": img,
    "target_shape": target_shape
}
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 ndarray, ndim 3, dtype family float, shape (4, 3, 3) — shape (4, 3, 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
worker Ran
ran; our contract draft was wrong, not the code
alililia/ascend_ESRGAN/src/util/extract_subimages.py
code served (permissive licence) · get_code("2304a4ee7dcb90c0")
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 tempfile
import os
import numpy as np
import cv2

# Create a temporary directory for saving outputs
temp_dir = tempfile.mkdtemp()

# Create a temporary image file to read
temp_image_path = os.path.join(temp_dir, 'test_imagex2.png')
# Create a simple test image (100x100, 3 channels)
test_image = np.random.randint(0, 255, (100, 100, 3), dtype=np.uint8)
cv2.imwrite(temp_image_path, test_image)

# Define the opt dictionary with required parameters
opt = {
    'crop_size': 32,
    'step': 16,
    'thresh_size': 10,
    'save_folder': temp_dir,
    'compression_level': 9
}

# Define ARGS
ARGS = {
    'path': temp_image_path,
    'opt': opt
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — 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
ContentLoss Not yet run
unverified (harvested, no recorded run)
peteryuX/esrgan-tf2/modules/losses.py
code served (permissive licence) · get_code("a1eae53995164a47")
How it ran

no invocation recorded.

CosineAnnealingLR_Restart Not yet run
unverified (harvested, no recorded run)
peteryuX/esrgan-tf2/modules/lr_scheduler.py
code served (permissive licence) · get_code("28087fef70cd7834")
How it ran

no invocation recorded.

RRDB_Model Not yet run
unverified (harvested, no recorded run)
peteryuX/esrgan-tf2/modules/models.py
code served (permissive licence) · get_code("af49e058cf9418d0")
How it ran

no invocation recorded.

cal_niqe Not yet run
unverified (harvested, no recorded run)
HyeongJu916/Boaz-SR-ESRGAN-PyTorch/esrgan_pytorch/calculate_niqe.py
code served (permissive licence) · get_code("6978b4d6b12aaa7f")
How it ran

no invocation recorded.

create_lr_hr_pair Not yet run
unverified (harvested, no recorded run)
peteryuX/esrgan-tf2/modules/utils.py
code served (permissive licence) · get_code("529169af10664b73")
How it ran

no invocation recorded.

esrgan_4x4_16 Not yet run
unverified (harvested, no recorded run)
HyeongJu916/Boaz-SR-ESRGAN-PyTorch/esrgan_pytorch/models/generator.py
code served (permissive licence) · get_code("57b05189bf70b18d")
How it ran

no invocation recorded.

esrgan_4x4_23 Not yet run
unverified (harvested, no recorded run)
HyeongJu916/Boaz-SR-ESRGAN-PyTorch/esrgan_pytorch/models/generator.py
code served (permissive licence) · get_code("204745c935fe8615")
How it ran

no invocation recorded.

load_pretrained_state_dict Not yet run
unverified (harvested, no recorded run)
Lornatang/ESRGAN-PyTorch/utils.py
code served (permissive licence) · get_code("e0364deba9b8c665")
How it ran

no invocation recorded.

niqe Not yet run
unverified (harvested, no recorded run)
HyeongJu916/Boaz-SR-ESRGAN-PyTorch/esrgan_pytorch/utils/calculate_niqe.py
code served (permissive licence) · get_code("ef9c26bb9c8ac3a9")
How it ran

no invocation recorded.

preprocess_one_image Not yet run
unverified (harvested, no recorded run)
Lornatang/ESRGAN-PyTorch/imgproc.py
code served (permissive licence) · get_code("096d345ecfa304ae")
How it ran

no invocation recorded.

test_lpips Not yet run
unverified (harvested, no recorded run)
HyeongJu916/Boaz-SR-ESRGAN-PyTorch/esrgan_pytorch/utils/estimate.py
code served (permissive licence) · get_code("0369eca684c8dd34")
How it ran

no invocation recorded.

Also present in other papers' code

Of 44 samples lifted from this paper's linked repositories, 44 carry a function identity and 0 do not. Of the 44 distinct functions with an identity, 17 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 14 later) and 27 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
make_layer 31 other papers
31 later · 6 only as an assembly brick
1905.02716 (2019-05)
EDVR: Video Restoration with Enhanced Deformable Convolutional Networks
1905.10485 (2019-05)
Generative Latent Flow
1909.10692 (2019-09)
Deformable Non-local Network for Video Super-Resolution
and 28 more not named here
ssim 18 other papers
18 later
1904.03377 (2019-04)
Blind Super-Resolution With Iterative Kernel Correction
2005.05650 (2020-05)
Invertible Image Rescaling
and 15 more not named here
calculate_psnr 16 other papers
16 later
1904.03377 (2019-04)
Blind Super-Resolution With Iterative Kernel Correction
1905.02716 (2019-05)
EDVR: Video Restoration with Enhanced Deformable Convolutional Networks
1907.03222 (2019-07)
IRNet: A General Purpose Deep Residual Regression Framework for Materials Discovery
and 13 more not named here
cubic 5 other papers
5 later
2405.04312 (2024-05)
Inf-DiT: Upsampling Any-Resolution Image with Memory-Efficient Diffusion Transformer
2405.09873 (2024-05)
IRSRMamba: Infrared Image Super-Resolution via Mamba-based Wavelet Transform Feature Modulation Model
2406.00629 (2024-06)
Correlation Matching Transformation Transformers for UHD Image Restoration
and 2 more not named here
flow_warp 5 other papers
5 later
1905.02716 (2019-05)
EDVR: Video Restoration with Enhanced Deformable Convolutional Networks
1911.10375 (2019-11)
Region Normalization for Image Inpainting
2005.01996 (2020-05)
NTIRE 2020 Challenge on Real-World Image Super-Resolution: Methods and Results
and 2 more not named here
norm 5 other papers
5 later
2009.11551 (2020-09)
Residual Feature Distillation Network for Lightweight Image Super-Resolution
2104.09556 (2021-04)
Removing Diffraction Image Artifacts in Under-Display Camera via Dynamic Skip Connection Network
2108.11084 (2021-08)
Transformer for Single Image Super-Resolution
and 2 more not named here
pad 5 other papers
5 later
2009.11551 (2020-09)
Residual Feature Distillation Network for Lightweight Image Super-Resolution
2104.09556 (2021-04)
Removing Diffraction Image Artifacts in Under-Display Camera via Dynamic Skip Connection Network
2108.11084 (2021-08)
Transformer for Single Image Super-Resolution
and 2 more not named here
calculate_ssim 3 other papers
3 later
1904.03377 (2019-04)
Blind Super-Resolution With Iterative Kernel Correction
2005.05650 (2020-05)
Invertible Image Rescaling
2407.09299 (2024-07)
PID: Physics-Informed Diffusion Model for Infrared Image Generation
act 2 other papers
2 later
2104.09556 (2021-04)
Removing Diffraction Image Artifacts in Under-Display Camera via Dynamic Skip Connection Network
2402.19215 (2024-02)
Training Generative Image Super-Resolution Models by Wavelet-Domain Losses Enables Better Control of Artifacts *
image_to_tensor 2 other papers
1 dated earlier, 1 later
1609.04802 (2016-09)
Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network
1903.00875 (2019-03)
Meta-SR: A Magnification-Arbitrary Network for Super-Resolution
tensor_to_image 2 other papers
1 dated earlier, 1 later
1609.04802 (2016-09)
Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network
1903.00875 (2019-03)
Meta-SR: A Magnification-Arbitrary Network for Super-Resolution
MultiStepLR 1 other paper
1 later
1907.05737 (2019-07)
PC-DARTS: Partial Channel Connections for Memory-Efficient Architecture Search
load_pretrained_state_dict 1 other paper
1 dated earlier
1609.04802 (2016-09)
Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network
load_state_dict 1 other paper
1 dated earlier
1609.04802 (2016-09)
Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network
load_yaml 1 other paper
1 later
1907.05737 (2019-07)
PC-DARTS: Partial Channel Connections for Memory-Efficient Architecture Search
preprocess_one_image 1 other paper
1 dated earlier
1609.04802 (2016-09)
Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network
worker 1 other paper
1 later
2406.05723 (2024-06)
Binarized Diffusion Model for Image Super-Resolution

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

More are linked than shown here.

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

Abstract

The Super-Resolution Generative Adversarial Network (SRGAN) is a seminal work that is capable of generating realistic textures during single image super-resolution. However, the hallucinated details are often accompanied with unpleasant artifacts. To further enhance the visual quality, we thoroughly study three key components of SRGAN - network architecture, adversarial loss and perceptual loss, and improve each of them to derive an Enhanced SRGAN (ESRGAN). In particular, we introduce the Residual-in-Residual Dense Block (RRDB) without batch normalization as the basic network building unit. Moreover, we borrow the idea from relativistic GAN to let the discriminator predict relative realness instead of the absolute value. Finally, we improve the perceptual loss by using the features before activation, which could provide stronger supervision for brightness consistency and texture recovery. Benefiting from these improvements, the proposed ESRGAN achieves consistently better visual quality with more realistic and natural textures than SRGAN and won the first place in the PIRM2018-SR Challenge. The code is available at https://github.com/xinntao/ESRGAN .

For agents

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

get_harvested_code_for_paper("1809.00219")
get_code_for_paper("1809.00219")
have("1809.00219")

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

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

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

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

Connect an agent — have() is free.