SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2309.02020 · ICCV · 2023

RawHDR: High Dynamic Range Image Reconstruction from a Single Raw Image

Ying Fu, Chenggang Yan, Yunhao Zou

arXiv · PDF · Open in the Atlas

Code that ran

15 of 22 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (12 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 14 have no contract verdict; 1 failure of our instrument; 7 no recorded run), measured 2026-11-23; 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/2309.02020.json · badge: /api/ran/2309.02020.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
jackzou233/RawHDR community
Papers with Code archive
15 ran · 7 no recorded run
FunctionStatusWhere it lives
Attention Ran
ran on a synthesized input · constructed an object; no result was computed
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("29d50c0250eae7a9")
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 an instance of its own class, Attention: the run constructed the object and did not call it, so no result was computed. 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)

# Parameters for Attention.__init__
dim = 8
num_heads = 2
token_projection = 'linear'
qkv_bias = True
qk_scale = None
attn_drop = 0.1
proj_drop = 0.1

ARGS = {
    'dim': dim,
    'num_heads': num_heads,
    'token_projection': token_projection,
    'qkv_bias': qkv_bias,
    'qk_scale': qk_scale,
    'attn_drop': attn_drop,
    'proj_drop': proj_drop,
}
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 Attention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Attention 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
ConvProjection Ran
ran on a synthesized input · constructed an object; no result was computed
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("8f4e81537ed6b5a4")
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 an instance of its own class, ConvProjection: the run constructed the object and did not call it, so no result was computed. 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 einops import rearrange, repeat
import math

torch.manual_seed(0)

class SepConv2d(torch.nn.Module):

    def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, act_layer=nn.ReLU):
        super(SepConv2d, self).__init__()
        self.depthwise = torch.nn.Conv2d(in_channels, in_channels, kernel_size=kernel_size, stride=stride, padding=padding, dilation=dilation, groups=in_channels)
        self.pointwise = torch.nn.Conv2d(in_channels, out_channels, kernel_size=1)
        self.act_layer = act_layer() if act_layer is not None else nn.Identity()
        self.in_channels = in_channels
        self.out_channels = out_channels
        self.kernel_size = kernel_size
        self.stride = stride

    def forward(self, x):
        x = self.depthwise(x)
        x = self.act_layer(x)
        x = self.pointwise(x)
        return x

    def flops(self, HW):
        flops = 0
        flops += HW * self.in_channels * self.kernel_size ** 2 / self.stride ** 2
        flops += HW * self.in_channels * self.out_channels
        print('SeqConv2d:{%.2f}' % (flops / 1000000000.0))
        return flops

class ConvProjection(nn.Module):

    def __init__(self, dim, heads=8, dim_head=64, kernel_size=3, q_stride=1, k_stride=1, v_stride=1, dropout=0.0, last_stage=False, bias=True):
        super().__init__()
        inner_dim = dim_head * heads
        self.heads = heads
        pad = (kernel_size - q_stride) // 2
        self.to_q = SepConv2d(dim, inner_dim, kernel_size, q_stride, pad, bias)
        self.to_k = SepConv2d(dim, inner_dim, kernel_size, k_stride, pad, bias)
        self.to_v = SepConv2d(dim, inner_dim, kernel_size, v_stride, pad, bias)

    def forward(self, x, attn_kv=None):
        b, n, c, h = (*x.shape, self.heads)
        l = int(math.sqrt(n))
        w = int(math.sqrt(n))
        attn_kv = x if attn_kv is None else attn_kv
        x = rearrange(x, 'b (l w) c -> b c l w', l=l, w=w)
        attn_kv = rearrange(attn_kv, 'b (l w) c -> b c l w', l=l, w=w)
        q = self.to_q(x)
        q = rearrange(q, 'b (h d) l w -> b h (l w) d', h=h)
        k = self.to_k(attn_kv)
        v = self.to_v(attn_kv)
        k = rearrange(k, 'b (h d) l w -> b h (l w) d', h=h)
        v = rearrange(v, 'b (h d) l w -> b h (l w) d', h=h)
        return (q, k, v)

    def flops(self, q_L, kv_L=None):
        kv_L = kv_L or q_L
        flops = 0
        flops += self.to_q.flops(q_L)
        flops += self.to_k.flops(kv_L)
        flops += self.to_v.flops(kv_L)
        return flops

ARGS = {
    'dim': 4,
    'heads': 2,
    'dim_head': 2,
    'kernel_size': 3,
    'q_stride': 1,
    'k_stride': 1,
    'v_stride': 1,
    'dropout': 0.0,
    'last_stage': False,
    'bias': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ConvProjection — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ConvProjection 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
Downsample Ran
ran on a synthesized input · constructed an object; no result was computed
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("5b78062820f7c165")
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 an instance of its own class, Downsample: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import math

torch.manual_seed(0)

# The Downsample class expects:
# - in_channel: int (number of input channels)
# - out_channel: int (number of output channels)

ARGS = {
    "in_channel": 3,
    "out_channel": 6,
}
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 Downsample — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Downsample 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
FastLeFF Ran
ran on a synthesized input
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("7960946306e5e97e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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 torch
import torch.nn as nn
from einops import rearrange
import math

# Mock DepthwiseConv2d since torch_dwconv may not be available
class MockDepthwiseConv2d(nn.Module):
    def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, padding=1):
        super().__init__()
        self.conv = nn.Conv2d(in_channels, out_channels, kernel_size, stride, padding, groups=in_channels)
    
    def forward(self, x):
        return self.conv(x)

# Monkey-patch the import
import sys
from types import ModuleType
torch_dwconv = ModuleType('torch_dwconv')
torch_dwconv.DepthwiseConv2d = MockDepthwiseConv2d
torch_dwconv.depthwise_conv2d = None
sys.modules['torch_dwconv'] = torch_dwconv

class FastLeFF(nn.Module):

    def __init__(self, dim=32, hidden_dim=128, act_layer=nn.GELU, drop=0.0):
        super().__init__()
        from torch_dwconv import DepthwiseConv2d
        self.linear1 = nn.Sequential(nn.Linear(dim, hidden_dim), act_layer())
        self.dwconv = nn.Sequential(DepthwiseConv2d(hidden_dim, hidden_dim, kernel_size=3, stride=1, padding=1), act_layer())
        self.linear2 = nn.Sequential(nn.Linear(hidden_dim, dim))
        self.dim = dim
        self.hidden_dim = hidden_dim

    def forward(self, x):
        bs, hw, c = x.size()
        hh = int(math.sqrt(hw))
        x = self.linear1(x)
        x = rearrange(x, ' b (h w) (c) -> b c h w ', h=hh, w=hh)
        x = self.dwconv(x)
        x = rearrange(x, ' b c h w -> b (h w) c', h=hh, w=hh)
        x = self.linear2(x)
        return x

    def flops(self, H, W):
        flops = 0
        flops += H * W * self.dim * self.hidden_dim
        flops += H * W * self.hidden_dim * 3 * 3
        flops += H * W * self.hidden_dim * self.dim
        print('LeFF:{%.2f}' % (flops / 1000000000.0))
        return flops


INIT_ARGS = {
    'dim': 4,
    'hidden_dim': 16,
    'act_layer': nn.GELU,
    'drop': 0.0,
}

ARGS = {
    'x': torch.randn(2, 16, 4),
}

if __name__ == '__main__':
    model = FastLeFF(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
einops, torch, torch_dwconv — 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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
InputProj Ran
ran on a synthesized input · constructed an object; no result was computed
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("3a9a8599d8e3c1d2")
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 an instance of its own class, InputProj: the run constructed the object and did not call it, so no result was computed. 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_channel': 3,
    'out_channel': 64,
    'kernel_size': 3,
    'stride': 1,
    'norm_layer': nn.BatchNorm1d,
    'act_layer': nn.LeakyReLU
}
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 InputProj — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a InputProj 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
LeFF Ran
ran on a synthesized input · constructed an object; no result was computed
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("865ee95b41ad8936")
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 an instance of its own class, LeFF: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import math

torch.manual_seed(0)

ARGS = {
    'dim': 4,
    'hidden_dim': 8,
    'act_layer': nn.GELU,
    'drop': 0.0,
    'use_eca': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LeFF — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LeFF 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
LinearProjection Ran
ran on a synthesized input · constructed an object; no result was computed
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("d552be43d7b08ffe")
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 an instance of its own class, LinearProjection: the run constructed the object and did not call it, so no result was computed. 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 = {
    'dim': 4,
    'heads': 2,
    'dim_head': 2,
    'dropout': 0.0,
    'bias': 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 LinearProjection — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LinearProjection 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
Mlp Ran
ran on a synthesized input · constructed an object; no result was computed
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("6048703a72836ea7")
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 an instance of its own class, Mlp: the run constructed the object and did not call it, so no result was computed. 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_features': 4,
    'hidden_features': 8,
    'out_features': 3,
    'act_layer': nn.GELU,
    'drop': 0.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 Mlp — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Mlp 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
ResidualBlock_noBN Ran
ran on a synthesized input · constructed an object; no result was computed
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("71da3692104e33cc")
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 an instance of its own class, ResidualBlock_noBN: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import torch.nn.init as init

torch.manual_seed(0)

class ResidualBlock_noBN(nn.Module):
    """Residual block w/o BN
    ---Conv-ReLU-Conv-+-
     |________________|
    """

    def __init__(self, nf=64):
        super(ResidualBlock_noBN, self).__init__()
        self.conv1 = nn.Conv2d(nf, nf, 3, 1, 1, bias=True)
        self.conv2 = nn.Conv2d(nf, nf, 3, 1, 1, bias=True)
        self._initialize_weights([self.conv1, self.conv2], 0.1)

    def _initialize_weights(self, net_l, scale=1):
        if not isinstance(net_l, list):
            net_l = [net_l]
        for net in net_l:
            for m in net.modules():
                if isinstance(m, nn.Conv2d):
                    init.kaiming_normal_(m.weight, a=0, mode='fan_in')
                    m.weight.data *= scale
                    if m.bias is not None:
                        m.bias.data.zero_()
                elif isinstance(m, nn.Linear):
                    init.kaiming_normal_(m.weight, a=0, mode='fan_in')
                    m.weight.data *= scale
                    if m.bias is not None:
                        m.bias.data.zero_()
                elif isinstance(m, nn.BatchNorm2d):
                    init.constant_(m.weight, 1)
                    init.constant_(m.bias.data, 0.0)

    def forward(self, x):
        import torch.nn.functional as F
        identity = x
        out = F.relu(self.conv1(x))
        out = self.conv2(out)
        return identity + out

ARGS = {
    'nf': 64
}
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 ResidualBlock_noBN — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ResidualBlock_noBN 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
SepConv2d Ran
ran on a synthesized input · constructed an object; no result was computed
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("8b5f15eafc8b5253")
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 an instance of its own class, SepConv2d: the run constructed the object and did not call it, so no result was computed. 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': 16,
    'kernel_size': 3,
    'stride': 1,
    'padding': 1,
    'dilation': 1,
    'act_layer': nn.ReLU
}
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 SepConv2d — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SepConv2d 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
UnetEncoder Ran
ran on a synthesized input
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("91fccdf75467a0d6")
How it ran

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

import torch
import torch.nn as nn

class UnetEncoder(nn.Module):

    def __init__(self, input_channel=4):
        super(UnetEncoder, self).__init__()
        self.conv1_1 = nn.Conv2d(input_channel, 32, kernel_size=3, stride=1, padding=1)
        self.conv1_2 = nn.Conv2d(32, 32, kernel_size=3, stride=1, padding=1)
        self.pool1 = nn.MaxPool2d(kernel_size=2)
        self.conv2_1 = nn.Conv2d(32, 64, kernel_size=3, stride=1, padding=1)
        self.conv2_2 = nn.Conv2d(64, 64, kernel_size=3, stride=1, padding=1)
        self.pool2 = nn.MaxPool2d(kernel_size=2)
        self.conv3_1 = nn.Conv2d(64, 128, kernel_size=3, stride=1, padding=1)
        self.conv3_2 = nn.Conv2d(128, 128, kernel_size=3, stride=1, padding=1)
        self.pool3 = nn.MaxPool2d(kernel_size=2)
        self.lrelu = nn.LeakyReLU()

    def forward(self, x):
        conv1 = self.lrelu(self.conv1_1(x))
        conv1 = self.lrelu(self.conv1_2(conv1))
        pool1 = self.pool1(conv1)
        conv2 = self.lrelu(self.conv2_1(pool1))
        conv2 = self.lrelu(self.conv2_2(conv2))
        pool2 = self.pool1(conv2)
        conv3 = self.lrelu(self.conv3_1(pool2))
        conv3 = self.lrelu(self.conv3_2(conv3))
        pool3 = self.pool1(conv3)
        return (conv1, conv2, conv3, pool3)


INIT_ARGS = {
    'input_channel': 4
}

ARGS = {
    'x': torch.randn(2, 4, 16, 16)
}

if __name__ == '__main__':
    model = UnetEncoder(**INIT_ARGS)
    output = model(**ARGS)
    print("Output shapes:")
    print(f"  conv1: {output[0].shape}")
    print(f"  conv2: {output[1].shape}")
    print(f"  conv3: {output[2].shape}")
    print(f"  pool3: {output[3].shape}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Upsample Ran
ran on a synthesized input · constructed an object; no result was computed
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("5649210725b55419")
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 an instance of its own class, Upsample: the run constructed the object and did not call it, so no result was computed. 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)

# Create instances for the Upsample module
upsample_module = nn.Module()

# Define ARGS for the Upsample constructor
ARGS = {
    'in_channels': 3,
    'out_channels': 16,
    'bilinear': False
}

# Create an instance to verify it works
instance = nn.Module()
instance.__class__ = type('Upsample', (nn.Module,), {
    '__init__': lambda self, in_channels, out_channels, bilinear=False: (
        setattr(self, 'bilinear', bilinear),
        setattr(self, 'up', nn.ConvTranspose2d(in_channels, out_channels, kernel_size=2, stride=2) if not bilinear else nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)),
        setattr(self, 'conv', nn.Conv2d(in_channels, out_channels, 3, 1, 1) if bilinear else None),
        setattr(self, 'ac', nn.LeakyReLU(inplace=True))
    )[-1]
})

ARGS = {
    'in_channels': 3,
    'out_channels': 16,
    'bilinear': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Upsample — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Upsample 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
WindowAttention Ran
ran on a synthesized input · constructed an object; no result was computed
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("0d0e50939bd5ae2c")
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 an instance of its own class, WindowAttention: the run constructed the object and did not call it, so no result was computed. 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 timm.models.layers import trunc_normal_

torch.manual_seed(0)

class SepConv2d(torch.nn.Module):
    def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, act_layer=nn.ReLU):
        super(SepConv2d, self).__init__()
        self.depthwise = torch.nn.Conv2d(in_channels, in_channels, kernel_size=kernel_size, stride=stride, padding=padding, dilation=dilation, groups=in_channels)
        self.pointwise = torch.nn.Conv2d(in_channels, out_channels, kernel_size=1)
        self.act_layer = act_layer() if act_layer is not None else nn.Identity()
        self.in_channels = in_channels
        self.out_channels = out_channels
        self.kernel_size = kernel_size
        self.stride = stride

    def forward(self, x):
        x = self.depthwise(x)
        x = self.act_layer(x)
        x = self.pointwise(x)
        return x

    def flops(self, HW):
        flops = 0
        flops += HW * self.in_channels * self.kernel_size ** 2 / self.stride ** 2
        flops += HW * self.in_channels * self.out_channels
        return flops

class ConvProjection(nn.Module):
    def __init__(self, dim, heads=8, dim_head=64, kernel_size=3, q_stride=1, k_stride=1, v_stride=1, dropout=0.0, last_stage=False, bias=True):
        super().__init__()
        inner_dim = dim_head * heads
        self.heads = heads
        pad = (kernel_size - q_stride) // 2
        self.to_q = SepConv2d(dim, inner_dim, kernel_size, q_stride, pad, bias)
        self.to_k = SepConv2d(dim, inner_dim, kernel_size, k_stride, pad, bias)
        self.to_v = SepConv2d(dim, inner_dim, kernel_size, v_stride, pad, bias)

    def forward(self, x, attn_kv=None):
        pass

    def flops(self, q_L, kv_L=None):
        pass

class LinearProjection(nn.Module):
    def __init__(self, dim, heads=8, dim_head=64, dropout=0.0, bias=True):
        super().__init__()
        inner_dim = dim_head * heads
        self.heads = heads
        self.to_q = nn.Linear(dim, inner_dim, bias=bias)
        self.to_kv = nn.Linear(dim, inner_dim * 2, bias=bias)
        self.dim = dim
        self.inner_dim = inner_dim

    def forward(self, x, attn_kv=None):
        pass

    def flops(self, q_L, kv_L=None):
        pass

ARGS = {
    'dim': 4,
    'win_size': (2, 3),
    'num_heads': 2,
    'token_projection': 'linear',
    'qkv_bias': True,
    'qk_scale': None,
    'attn_drop': 0.0,
    'proj_drop': 0.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type WindowAttention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a WindowAttention 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
eca_layer_1d Ran
ran on a synthesized input · constructed an object; no result was computed
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("0b1899f0d41fcb57")
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 an instance of its own class, eca_layer_1d: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The eca_layer_1d module expects:
# - channel: int (number of channels)
# - k_size: int (kernel size, default 3)
# The forward method expects input x of shape (batch, channel, length)

ARGS = {
    "channel": 4,
    "k_size": 3,
}
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 eca_layer_1d — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a eca_layer_1d 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
upsample Ran
ran; our contract draft was wrong, not the code
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("f757fff46cc8e034")
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, 16, 6, 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 torch
import torch.nn as nn
import torch.nn.functional as F

torch.manual_seed(0)

device = "cpu"

# x: input tensor, needs to be passed through convT
# After convT, it will have some number of channels
# Then it's concatenated with skip, so we need matching spatial dims
# ConvT output channels: 8, skip channels: 8, so conv1x1 input will be 16

batch_size = 2
x = torch.randn(batch_size, 4, 3, 3)  # (batch, channels, height, width)

# convT: ConvTranspose2d that takes 4 channels, outputs 8 channels
# Input spatial size 3x3 -> output 6x6 (with stride=2, kernel=4, padding=1)
convT = nn.ConvTranspose2d(4, 8, kernel_size=4, stride=2, padding=1)

# skip: should match the spatial dimensions after convT (6x6) and have same channels (8)
skip = torch.randn(batch_size, 8, 6, 6)

# conv1x1: takes concatenated tensor (8+8=16 channels) and outputs something
# Let's output 16 channels
conv1x1 = nn.Conv2d(16, 16, kernel_size=1)

ARGS = {
    "x": x,
    "convT": convT,
    "skip": skip,
    "conv1x1": conv1x1,
    "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 Tensor, ndim 4, dtype family float, shape (2, 16, 6, 6) — shape (2, 16, 6, 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
BasicUformerLayer Not yet run
unverified (harvested, no recorded run)
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("658bc9f155e6dff9")
How it ran

no invocation recorded.

LeWinTransformerBlock Not yet run
unverified (harvested, no recorded run)
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("f15155efe3407c54")
How it ran

no invocation recorded.

OutputProj Not yet run
unverified (harvested, no recorded run)
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("d725a09f8ee42746")
How it ran

no invocation recorded.

RawHDR Not yet run
unverified (harvested, no recorded run)
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("ab0d929cbf672716")
How it ran

no invocation recorded.

Uformer Not yet run
unverified (harvested, no recorded run)
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("14135b27036ba470")
How it ran

no invocation recorded.

UnetDecoder Not yet run
unverified (harvested, no recorded run)
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("d65109a1bc435db9")
How it ran

no invocation recorded.

initialize_weights Not yet run
unverified (harvested, no recorded run)
jackzou233/RawHDR/model.py
code served (permissive licence) · get_code("3c536ce7a9c99df0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 22 samples lifted from this paper's linked repositories, 22 carry a function identity and 0 do not. Of the 22 distinct functions with an identity, 5 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 4 the same month, 3 later) and 17 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
initialize_weights
brick of this paper's assembly: helper
7 other papers
5 dated earlier, 2 later · 6 only as an assembly brick
2103.04039 (2021-03)
ClassSR: A General Framework to Accelerate Super-Resolution Networks by Data Characteristic
2103.15061 (2021-03)
Invertible Image Signal Processing
2104.00317 (2021-04)
Explore Image Deblurring via Encoded Blur Kernel Space
and 4 more not named here
InputProj
brick of this paper's assembly: helper
2 other papers
1 the same month, 1 later · 2 only as an assembly brick
2309.04803 (2023-09)
Towards Real-World Burst Image Super-Resolution: Benchmark and Method
2601.17470 (2026-01)
PhaSR: Generalized Image Shadow Removal with Physically Aligned Priors
Mlp
brick of this paper's assembly: helper
2 other papers
1 the same month, 1 later · 2 only as an assembly brick
2309.04803 (2023-09)
Towards Real-World Burst Image Super-Resolution: Benchmark and Method
2601.17470 (2026-01)
PhaSR: Generalized Image Shadow Removal with Physically Aligned Priors
Downsample
brick of this paper's assembly: helper
1 other paper
1 the same month · 1 only as an assembly brick
2309.04803 (2023-09)
Towards Real-World Burst Image Super-Resolution: Benchmark and Method
OutputProj
brick of this paper's assembly: helper
1 other paper
1 the same month · 1 only as an assembly brick
2309.04803 (2023-09)
Towards Real-World Burst Image Super-Resolution: Benchmark and Method

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-23.

Repositories linked to this paper

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

Abstract

High dynamic range (HDR) images capture much more intensity levels than standard ones. Current methods predominantly generate HDR images from 8-bit low dynamic range (LDR) sRGB images that have been degraded by the camera processing pipeline. However, it becomes a formidable task to retrieve extremely high dynamic range scenes from such limited bit-depth data. Unlike existing methods, the core idea of this work is to incorporate more informative Raw sensor data to generate HDR images, aiming to recover scene information in hard regions (the darkest and brightest areas of an HDR scene). To this end, we propose a model tailor-made for Raw images, harnessing the unique features of Raw data to facilitate the Raw-to-HDR mapping. Specifically, we learn exposure masks to separate the hard and easy regions of a high dynamic scene. Then, we introduce two important guidances, dual intensity guidance, which guides less informative channels with more informative ones, and global spatial guidance, which extrapolates scene specifics over an extended spatial domain. To verify our Raw-to-HDR approach, we collect a large Raw/HDR paired dataset for both training and testing. Our empirical evaluations validate the superiority of the proposed Raw-to-HDR reconstruction model, as well as our newly captured dataset in the experiments.

For agents

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

get_harvested_code_for_paper("2309.02020")
get_code_for_paper("2309.02020")
have("2309.02020")

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

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

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

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

Connect an agent — have() is free.