SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.18217 · AAAI · 2024

Region-Aware Exposure Consistency Network for Mixed Exposure Correction

Jin Liu, Huiyuan Fu, Chuanming Wang, Huadong Ma

arXiv · PDF · Open in the Atlas

Code that ran

4 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 0 failures of our instrument; 5 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/2402.18217.json · badge: /api/ran/2402.18217.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
kravrolens/RECNet community
Papers with Code archive
4 ran · 5 no recorded run
FunctionStatusWhere it lives
CALayer Ran
ran on a synthesized input
kravrolens/RECNet/models/archs/EnhanceN_arch.py
code served (permissive licence) · get_code("4b9ee0fe03ff2466")
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 4, dtype family float, shape (2, 8, 4, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

class CALayer(nn.Module):

    def __init__(self, channel, reduction):
        super(CALayer, self).__init__()
        self.avg_pool = nn.AdaptiveAvgPool2d(1)
        self.conv_du = nn.Sequential(nn.Conv2d(channel, channel // reduction, 1, padding=0, bias=True), nn.ReLU(inplace=True), nn.Conv2d(channel // reduction, channel, 1, padding=0, bias=True), nn.Sigmoid())
        self.process = nn.Sequential(nn.Conv2d(channel, channel, 3, stride=1, padding=1), nn.ReLU(), nn.Conv2d(channel, channel, 3, stride=1, padding=1))

    def forward(self, x):
        y = self.process(x)
        y = self.avg_pool(y)
        z = self.conv_du(y)
        return z * y + x


INIT_ARGS = {
    'channel': 8,
    'reduction': 2,
}

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

if __name__ == '__main__':
    model = CALayer(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Expected shape: {ARGS['x'].shape}")
    assert output.shape == ARGS['x'].shape, "Output shape mismatch"
    print("Test passed!")
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 Tensor, ndim 4, dtype family float, shape (2, 8, 4, 3) — shape (2, 8, 4, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
IlluNet Ran
ran on a synthesized input
kravrolens/RECNet/models/archs/EnhanceN_arch.py
code served (permissive licence) · get_code("1cfaf0929e549c21")
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 4, dtype family float, shape (2, 1, 8, 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

class IlluNet(nn.Module):

    def __init__(self, channel):
        super(IlluNet, self).__init__()
        self.net_convs = nn.Sequential(nn.Conv2d(channel, channel, kernel_size=3, padding=1, padding_mode='replicate'), nn.ReLU(), nn.Conv2d(channel, channel, kernel_size=3, padding=1, padding_mode='replicate'), nn.ReLU(), nn.Conv2d(channel, channel, kernel_size=3, padding=1, padding_mode='replicate'), nn.ReLU(), nn.Conv2d(channel, 1, kernel_size=3, padding=1, padding_mode='replicate'), nn.Sigmoid())

    def forward(self, x):
        out = self.net_convs(x)
        return out


INIT_ARGS = {
    'channel': 4
}

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

if __name__ == '__main__':
    model = IlluNet(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output dtype: {output.dtype}")
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 Tensor, ndim 4, dtype family float, shape (2, 1, 8, 6) — shape (2, 1, 8, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
MCSA Ran
ran on a synthesized input
kravrolens/RECNet/models/archs/EnhanceN_arch.py
code served (permissive licence) · get_code("2c19d743c04fb193")
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
from einops import rearrange

class MCSA(nn.Module):

    def __init__(self, dim, ffn_expansion_factor=1, num_heads=2):
        super(MCSA, self).__init__()
        hidden_features = int(dim * ffn_expansion_factor)
        self.num_heads = num_heads
        self.conv3x3_q = nn.Conv2d(hidden_features, hidden_features, kernel_size=3, stride=1, padding=1, groups=hidden_features)
        self.conv5x5_q = nn.Conv2d(hidden_features, hidden_features, kernel_size=5, stride=1, padding=2, groups=hidden_features)
        self.relu3_q = nn.ReLU(inplace=True)
        self.relu5_q = nn.ReLU(inplace=True)
        self.temperature = nn.Parameter(torch.ones(num_heads, 1, 1))
        self.project_ch = nn.Conv2d(hidden_features * 2, hidden_features, kernel_size=1, padding=0, stride=1)
        self.project_in = nn.Conv2d(dim, hidden_features * 2, kernel_size=1)
        self.dwconv3x3 = nn.Conv2d(hidden_features * 2, hidden_features * 2, kernel_size=3, stride=1, padding=1, groups=hidden_features * 2)
        self.dwconv5x5 = nn.Conv2d(hidden_features * 2, hidden_features * 2, kernel_size=5, stride=1, padding=2, groups=hidden_features * 2)
        self.relu3 = nn.ReLU(inplace=True)
        self.relu5 = nn.ReLU(inplace=True)
        self.dwconv3x3_1 = nn.Conv2d(hidden_features * 2, hidden_features, kernel_size=3, stride=1, padding=1, groups=hidden_features)
        self.dwconv5x5_1 = nn.Conv2d(hidden_features * 2, hidden_features, kernel_size=5, stride=1, padding=2, groups=hidden_features)
        self.relu3_1 = nn.ReLU(inplace=True)
        self.relu5_1 = nn.ReLU(inplace=True)
        self.project_out = nn.Conv2d(hidden_features * 2, dim, kernel_size=1)

    def forward(self, x, x_feat):
        x_proj = self.project_in(x)
        x1_3, x2_3 = self.relu3(self.dwconv3x3(x_proj)).chunk(2, dim=1)
        x1_5, x2_5 = self.relu5(self.dwconv5x5(x_proj)).chunk(2, dim=1)
        x1 = torch.cat([x1_3, x1_5], dim=1)
        x2 = torch.cat([x2_3, x2_5], dim=1)
        x1 = self.relu3_1(self.dwconv3x3_1(x1))
        x2 = self.relu5_1(self.dwconv5x5_1(x2))
        x = torch.cat([x1, x2], dim=1)
        out_local = self.project_out(x)
        x3_3 = self.relu3_q(self.conv3x3_q(x_feat))
        x3_5 = self.relu5_q(self.conv5x5_q(x_feat))
        outss_ = []
        for q, k, v in [[x1_3, x2_3, x3_3], [x1_5, x2_5, x3_5]]:
            B, C, H, W = (q.shape[0], q.shape[1], q.shape[2], q.shape[3])
            q = rearrange(q, 'b (head c) h w -> b head c (h w)', head=self.num_heads)
            k = rearrange(k, 'b (head c) h w -> b head c (h w)', head=self.num_heads)
            v = rearrange(v, 'b (head c) h w -> b head c (h w)', head=self.num_heads)
            attn = q @ k.transpose(-2, -1) * self.temperature
            out = attn.softmax(dim=-1) @ v
            out = rearrange(out, 'b head c (h w) -> b (head c) h w', h=H, w=W)
            outss_.append(out)
        out_global = self.project_ch(torch.cat([outss_[0], outss_[1]], 1))
        return (out_local, out_global)


INIT_ARGS = {
    'dim': 4,
    'ffn_expansion_factor': 1,
    'num_heads': 2,
}

ARGS = {
    'x': torch.randn(2, 4, 3, 5),
    'x_feat': torch.randn(2, 4, 3, 5),
}

if __name__ == '__main__':
    model = MCSA(**INIT_ARGS)
    model.eval()
    with torch.no_grad():
        out_local, out_global = model(**ARGS)
    print("out_local shape:", out_local.shape)
    print("out_global shape:", out_global.shape)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
einops, 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)
Refine Ran
ran on a synthesized input
kravrolens/RECNet/models/archs/EnhanceN_arch.py
code served (permissive licence) · get_code("a3fe57de5f47b21c")
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 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

class CALayer(nn.Module):

    def __init__(self, channel, reduction):
        super(CALayer, self).__init__()
        self.avg_pool = nn.AdaptiveAvgPool2d(1)
        self.conv_du = nn.Sequential(nn.Conv2d(channel, channel // reduction, 1, padding=0, bias=True), nn.ReLU(inplace=True), nn.Conv2d(channel // reduction, channel, 1, padding=0, bias=True), nn.Sigmoid())
        self.process = nn.Sequential(nn.Conv2d(channel, channel, 3, stride=1, padding=1), nn.ReLU(), nn.Conv2d(channel, channel, 3, stride=1, padding=1))

    def forward(self, x):
        y = self.process(x)
        y = self.avg_pool(y)
        z = self.conv_du(y)
        return z * y + x

class Refine(nn.Module):

    def __init__(self, n_feat, out_channel):
        super(Refine, self).__init__()
        self.conv_in = nn.Conv2d(n_feat, n_feat, 3, stride=1, padding=1)
        self.process = nn.Sequential(CALayer(n_feat, 4))
        self.conv_last = nn.Conv2d(in_channels=n_feat, out_channels=out_channel, kernel_size=3, stride=1, padding=1)

    def forward(self, x):
        out = self.conv_in(x)
        out = self.process(out)
        out = self.conv_last(out)
        return out

INIT_ARGS = {
    'n_feat': 8,
    'out_channel': 3,
}

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

if __name__ == '__main__':
    model = Refine(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Input shape: {ARGS['x'].shape}")
    print(f"Output shape: {output.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 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
DualBlock Not yet run
unverified (harvested, no recorded run)
kravrolens/RECNet/models/archs/EnhanceN_arch.py
code served (permissive licence) · get_code("9c5edab6b3de4dac")
How it ran

no invocation recorded.

DualProcess Not yet run
unverified (harvested, no recorded run)
kravrolens/RECNet/models/archs/EnhanceN_arch.py
code served (permissive licence) · get_code("6bc1d9b72150e1ac")
How it ran

no invocation recorded.

GaussianBlur Not yet run
unverified (harvested, no recorded run)
kravrolens/RECNet/models/archs/EnhanceN_arch.py
code served (permissive licence) · get_code("86cfd71bfb543cc0")
How it ran

no invocation recorded.

InteractNet Not yet run
unverified (harvested, no recorded run)
kravrolens/RECNet/models/archs/EnhanceN_arch.py
code served (permissive licence) · get_code("ebfe739d3e1d07e6")
How it ran

no invocation recorded.

RIN Not yet run
unverified (harvested, no recorded run)
kravrolens/RECNet/models/archs/EnhanceN_arch.py
code served (permissive licence) · get_code("8ca1841ad1d20ef9")
How it ran

no invocation recorded.

Also present in other papers' code

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

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

FunctionAlso present inEarliest-datedOthers named
CALayer
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2309.01958 (2023-09)
Empowering Low-Light Image Enhancer through Customized Learnable Priors

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

Repositories linked to this paper

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

Abstract

Exposure correction aims to enhance images suffering from improper exposure to achieve satisfactory visual effects. Despite recent progress, existing methods generally mitigate either overexposure or underexposure in input images, and they still struggle to handle images with mixed exposure, i.e., one image incorporates both overexposed and underexposed regions. The mixed exposure distribution is nonuniform and leads to varying representation, which makes it challenging to address in a unified process. In this paper, we introduce an effective Region-aware Exposure Correction Network (RECNet) that can handle mixed exposure by adaptively learning and bridging different regional exposure representations. Specifically, to address the challenge posed by mixed exposure disparities, we develop a regionaware de-exposure module that effectively translates regional features of mixed exposure scenarios into an exposureinvariant feature space. Simultaneously, as de-exposure operation inevitably reduces discriminative information, we introduce a mixed-scale restoration unit that integrates exposureinvariant features and unprocessed features to recover local information. To further achieve a uniform exposure distribution in the global image, we propose an exposure contrastive regularization strategy under the constraints of intra-regional exposure consistency and inter-regional exposure continuity. Extensive experiments are conducted on various datasets, and the experimental results demonstrate the superiority and generalization of our proposed method. The code is released at: https://github.com/kravrolens/RECNet.

For agents

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

get_harvested_code_for_paper("2402.18217")
get_code_for_paper("2402.18217")
have("2402.18217")

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

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

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

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

Connect an agent — have() is free.