SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2304.07039 · CVPR · 2023

Learning Semantic-Aware Knowledge Guidance for Low-Light Image Enhancement

Chongyi Li, Yang Yang, Heng Shen, Chen Pan, Guoqing Wang, Jiwei Wei, Yuhui Wu

arXiv · PDF · Open in the Atlas

Code that ran

8 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; 1 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 2 failures of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2304.07039.json · badge: /api/ran/2304.07039.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
langmanbusi/semantic-aware-low-light-image-enhancement canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
FunctionStatusWhere it lives
calc_psnr Ran
ran on a synthesized input
langmanbusi/semantic-aware-low-light-image-enhancement/DRBN_SKF/src/utility.py
code served (permissive licence) · get_code("a04007cfe560d01e")
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 float, 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 math

torch.manual_seed(0)

# Create two small tensors representing super-resolved (sr) and high-resolution (hr) images
# Shape: (batch=2, channels=3, height=16, width=16)
# These need to be large enough that after shaving, there's still valid data
sr = torch.randn(2, 3, 16, 16)
hr = torch.randn(2, 3, 16, 16)

# scale parameter: used for determining shave size
scale = 2

# rgb_range parameter: used to normalize the difference
rgb_range = 255

# benchmark parameter: controls whether to apply RGB conversion and shaving behavior
benchmark = False

ARGS = {
    "sr": sr,
    "hr": hr,
    "scale": scale,
    "rgb_range": rgb_range,
    "benchmark": benchmark,
}
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 float, 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
calculate_loss_D Ran
ran on a synthesized input
langmanbusi/semantic-aware-low-light-image-enhancement/SNR_SKF/models/D_Net.py
code served (permissive licence) · get_code("bfef441af2b6f691")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. 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, 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 simple discriminator model that outputs a single value per input
class SimpleDiscriminator(nn.Module):
    def __init__(self):
        super(SimpleDiscriminator, self).__init__()
        self.conv1 = nn.Conv2d(3, 8, kernel_size=3, padding=1)
        self.fc = nn.Linear(8 * 4 * 4, 1)
    
    def forward(self, x):
        # x shape: (N, 3, H, W)
        x = self.conv1(x)  # (N, 8, H, W)
        x = x.view(x.size(0), -1)  # Flatten
        x = self.fc(x)  # (N, 1)
        return x

# Build model_D
model_D = SimpleDiscriminator()

# Build input tensors
N = 2  # batch size
C = 3  # channels (RGB)
H = 4  # height
W = 4  # width

input_high = torch.randn(N, C, H, W)
out = torch.randn(N, C, H, W)

# Build seg_map with shape (N, num_classes, H, W)
# We need at least 2 classes for the argmax operations to work properly
num_classes = 5
seg_map = torch.randn(N, num_classes, H, W)

ARGS = {
    "model_D": model_D,
    "input_high": input_high,
    "out": out,
    "seg_map": seg_map,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
calculate_loss_G Ran
ran on a synthesized input
langmanbusi/semantic-aware-low-light-image-enhancement/SNR_SKF/models/D_Net.py
code served (permissive licence) · get_code("0f5d0ec458e7d8bd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. 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, 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)

# Build a minimal discriminator model that takes input and outputs predictions
class MinimalDiscriminator(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def forward(self, x):
        # x shape: (batch_size, 4)
        return self.linear(x)

# Create model_D
model_D = MinimalDiscriminator()

# Create input tensors
# input_high: not used in the function, but required parameter
input_high = torch.randn(2, 4)

# out: passed to model_D, should match expected input shape (batch, features)
out = torch.randn(2, 4)

# seg_map: not used in the function, but required parameter
seg_map = torch.randn(2, 3)

ARGS = {
    "model_D": model_D,
    "input_high": input_high,
    "out": out,
    "seg_map": seg_map
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
imread Ran
ran, honoured the contract we drafted
langmanbusi/semantic-aware-low-light-image-enhancement/DRBN_SKF/src/evaluation.py
pointer only (licence: MIT); the stored copy get_code serves, from andreas128/SRFlow, is pointer only (licence: NOASSERTION) · get_code("b3408d91189f5c25")
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 andreas128/SRFlow, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

make_optimizer Ran
ran on a synthesized input
langmanbusi/semantic-aware-low-light-image-enhancement/DRBN_SKF/src/utility.py
code served (permissive licence) · get_code("f3316005a99d1d08")
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 Adam. 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.optim as optim

torch.manual_seed(0)

# Build a minimal model with trainable parameters
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

my_model = SimpleModel()

# Build args object with all required attributes
class Args:
    def __init__(self):
        self.optimizer = 'ADAM'
        self.momentum = 0.9
        self.beta1 = 0.9
        self.beta2 = 0.999
        self.epsilon = 1e-8
        self.lr = 0.001
        self.weight_decay = 0.0001

args = Args()

ARGS = {
    'args': args,
    'my_model': my_model
}
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 Adam — a Adam output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Adam 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
quantize Ran
ran; our contract draft was wrong, not the code
langmanbusi/semantic-aware-low-light-image-enhancement/DRBN_SKF/src/utility.py
pointer only (licence: MIT); the stored copy get_code serves, from cidanshi/nitedr-nighttime-image-de-raining, is pointer only (licence: NONE) · get_code("b1c1acd3c89a39f3")
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 cidanshi/nitedr-nighttime-image-de-raining, 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.

t Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
langmanbusi/semantic-aware-low-light-image-enhancement/DRBN_SKF/src/evaluation.py
pointer only (licence: MIT); the stored copy get_code serves, from andreas128/SRFlow, is pointer only (licence: NOASSERTION) · get_code("df0c958745aa00b2")
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 andreas128/SRFlow, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

vgg_loss Ran
ran on a synthesized input
langmanbusi/semantic-aware-low-light-image-enhancement/DRBN_SKF/src/trainer_seg_hist_fuse.py
code served (permissive licence) · get_code("35a11c0aee31c149")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class MockVGG(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc1 = nn.Linear(4, 8)
        self.fc2 = nn.Linear(4, 7)
        self.fc3 = nn.Linear(4, 6)
        self.fc4 = nn.Linear(4, 5)
    
    def forward(self, x):
        # VGG is called and returns a list of 4 feature maps
        # Each should have distinct sizes to probe later
        batch_size = x.shape[0]
        feat1 = torch.randn(batch_size, 8)
        feat2 = torch.randn(batch_size, 7)
        feat3 = torch.randn(batch_size, 6)
        feat4 = torch.randn(batch_size, 5)
        return [feat1, feat2, feat3, feat4]

vgg_model = MockVGG()
img = torch.randn(2, 4)
gt = torch.randn(2, 4)

ARGS = {
    "vgg": vgg_model,
    "img": img,
    "gt": gt
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
vgg_init Not yet run
unverified (harvested, no recorded run)
langmanbusi/semantic-aware-low-light-image-enhancement/DRBN_SKF/src/trainer_seg_hist_fuse.py
code served (permissive licence) · get_code("10c8f0d46734ee1d")
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, 5 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 3 later) and 4 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
quantize 12 other papers
9 dated earlier, 3 later
1803.02735 (2018-03)
Deep Back-Projection Networks For Super-Resolution
1803.04626 (2018-03)
Maintaining Natural Image Statistics with the Contextual Loss
1806.07366 (2018-06)
Neural Ordinary Differential Equations
and 9 more not named here
make_optimizer 2 other papers
2 dated earlier
1803.04626 (2018-03)
Maintaining Natural Image Statistics with the Contextual Loss
1906.12021 (2019-06)
Densely Residual Laplacian Super-Resolution
calc_psnr 1 other paper
1 dated earlier
1803.04626 (2018-03)
Maintaining Natural Image Statistics with the Contextual Loss
imread 1 other paper
1 later
2403.15139 (2024-03)
Deep Generative Model based Rate-Distortion for Image Downscaling Assessment
t 1 other paper
1 later
2403.15139 (2024-03)
Deep Generative Model based Rate-Distortion for Image Downscaling Assessment

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

LLFlow-L-SKF(Ours) LLFlow-S-SKF(Ours) LLFlow-S(AAAI 22) DRBN-SKF(Ours) KinD++-SKF(Ours) DRBN(CVPR 20) HWMNet(ICIP 22) HWMNet-SKF(Ours) DRBN(CVPR 20) KinD++(IJCV 20) LLFlow-S(AAAI 22) LLFlow-L (AAAI 22) KinD++-SKF(Ours) DRBN-SKF(Ours) LLFlow-L-SKF(Ours) LLFlow-S-SKF(Ours) HWMNet(ICIP 22) HWMNet-SKF(Ours) LLFlow-L(AAAI 22) Low-light Normal-light w/o Semantic w/ Semantic (a) Visual comparison on various scenes including car, human and sky. (b) Performance comparison on LOL/LOL-v2 (left/right) datasets KinD++(IJCV 20) Low-light Normal-light Low-light Normal-light w/ Semantic w/o Semantic w/ Semantic w/o Semantic SNR-Net-SKF(Ours) SNR-Net(CVPR 22) SNR-Net-SKF(Ours) SNR-Net(CVPR 22) Figure 1. Motivation and superiority. (a) The enhancement results (bottom row) without semantic priors show color deviations (e.g., the black car turns gray). (b) Our SKF provides remarkable performance boost on LOL/LOL-v2 datasets in terms of PSNR/SSIM.

For agents

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

get_harvested_code_for_paper("2304.07039")
get_code_for_paper("2304.07039")
have("2304.07039")

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

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

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

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

Connect an agent — have() is free.