SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · ijcai2022_0196 · IJCAI · 2022

KUNet: Imaging Knowledge-Inspired Single HDR Image Reconstruction

Mao Ye, Shuai Li, Xiatian Zhu, Hu Wang, Ce Zhu, Xue Li

Open in the Atlas

Code that ran

10 of 11 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; 2 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 6 failures of our instrument; 1 no recorded run), measured 2026-11-24; 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/ijcai2022_0196.json · badge: /api/ran/ijcai2022_0196.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
wanghu178/KUNet canonical (classifier label)
classifier basis: census
10 ran · 1 no recorded run
FunctionStatusWhere it lives
INF Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
wanghu178/KUNet/codes/models/modules/wh_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from DerrickXuNu/OpenCOOD, is pointer only (licence: NOASSERTION) · get_code("349015c9fdf7266b")
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 DerrickXuNu/OpenCOOD, 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.

create_window Ran
ran, honoured the contract we drafted
wanghu178/KUNet/codes/models/ssim.py
pointer only (licence: MIT); the stored copy get_code serves, from Chhro123/fast-foreground-aware-anomaly-synthesis, is pointer only (licence: NONE) · get_code("443341084ce76798")
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 Chhro123/fast-foreground-aware-anomaly-synthesis, 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.

dict2str Ran
ran; our contract draft was wrong, not the code
wanghu178/KUNet/codes/options/options.py
pointer only (licence: MIT); the stored copy get_code serves, from liyuantsao/BFSR, is pointer only (licence: NONE) · get_code("40c52ad98161c17b")
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 liyuantsao/BFSR, 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.

dict_to_nonedict Ran
ran; our contract draft was wrong, not the code
wanghu178/KUNet/codes/options/options.py
pointer only (licence: MIT); the stored copy get_code serves, from liyuantsao/BFSR, is pointer only (licence: NONE) · get_code("ada7273eee7081c7")
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 liyuantsao/BFSR, 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.

flow_warp Ran
ran; our contract draft was wrong, not the code
wanghu178/KUNet/codes/models/modules/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.

gaussian Ran
ran, honoured the contract we drafted
wanghu178/KUNet/codes/models/ssim.py
code served (permissive licence) · get_code("c56b7ef16f309a45")
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) and returned Tensor, ndim 1, dtype family float, shape (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
from math import exp

torch.manual_seed(0)

ARGS = {
    "window_size": 5,
    "sigma": 1.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 1, dtype family float, shape (5,) — shape (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
make_layer Ran
ran; our contract draft was wrong, not the code
wanghu178/KUNet/codes/models/modules/arch_util.py
pointer only (licence: MIT); 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 (MIT), 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.

mu_tonemap Ran
ran; our contract draft was wrong, not the code
wanghu178/KUNet/codes/models/customize_loss.py
code served (permissive licence) · get_code("b619fde25e9e1e62")
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, 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
import numpy as np

torch.manual_seed(0)

# The function mu_tonemap takes an image tensor (img) and applies mu-law tonemapping
# It performs arithmetic operations on the tensor and returns a transformed tensor
# The tensor should represent an HDR image with values that need tonemapping

# Create a small HDR image tensor
# Shape: (batch=2, channels=3, height=4, width=4) for a typical image
img = torch.randn(2, 3, 4, 4) * 2.0 - 1.0  # Values roughly in [-1, 1] range for HDR

ARGS = {
    "img": img
}
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 4, dtype family float, shape (2, 3, 4, 4) — shape (2, 3, 4, 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
ssim Ran
ran on a synthesized input
wanghu178/KUNet/codes/models/ssim.py
code served (permissive licence) · get_code("8bcd6627e53013bf")
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.functional as F
from math import exp

torch.manual_seed(0)

def gaussian(window_size, sigma):
    gauss = torch.Tensor([exp(-(x - window_size // 2) ** 2 / float(2 * sigma ** 2)) for x in range(window_size)])
    return gauss / gauss.sum()

def create_window(window_size, channel=1):
    _1D_window = gaussian(window_size, 1.5).unsqueeze(1)
    _2D_window = _1D_window.mm(_1D_window.t()).float().unsqueeze(0).unsqueeze(0)
    window = _2D_window.expand(channel, 1, window_size, window_size).contiguous()
    return window

def ssim(img1, img2, window_size=11, window=None, size_average=True, full=False, val_range=None):
    if val_range is None:
        if torch.max(img1) > 128:
            max_val = 255
        else:
            max_val = 1
        if torch.min(img1) < -0.5:
            min_val = -1
        else:
            min_val = 0
        L = max_val - min_val
    else:
        L = val_range
    padd = 0
    _, channel, height, width = img1.size()
    if window is None:
        real_size = min(window_size, height, width)
        window = create_window(real_size, channel=channel).to(img1.device)
    mu1 = F.conv2d(img1, window, padding=padd, groups=channel)
    mu2 = F.conv2d(img2, window, padding=padd, groups=channel)
    mu1_sq = mu1.pow(2)
    mu2_sq = mu2.pow(2)
    mu1_mu2 = mu1 * mu2
    sigma1_sq = F.conv2d(img1 * img1, window, padding=padd, groups=channel) - mu1_sq
    sigma2_sq = F.conv2d(img2 * img2, window, padding=padd, groups=channel) - mu2_sq
    sigma12 = F.conv2d(img1 * img2, window, padding=padd, groups=channel) - mu1_mu2
    C1 = (0.01 * L) ** 2
    C2 = (0.03 * L) ** 2
    v1 = 2.0 * sigma12 + C2
    v2 = sigma1_sq + sigma2_sq + C2
    cs = torch.mean(v1 / v2)
    ssim_map = (2 * mu1_mu2 + C1) * v1 / ((mu1_sq + mu2_sq + C1) * v2)
    if size_average:
        ret = ssim_map.mean()
    else:
        ret = ssim_map.mean(1).mean(1).mean(1)
    if full:
        return (ret, cs)
    return ret

# Create test images: batch=2, channels=3, height=4, width=5
img1 = torch.rand(2, 3, 4, 5)
img2 = torch.rand(2, 3, 4, 5)

ARGS = {
    'img1': img1,
    'img2': img2,
    'window_size': 11,
    'window': None,
    'size_average': True,
    'full': False,
    'val_range': None,
}
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
tensor_rgbtgray Ran
ran on a synthesized input
wanghu178/KUNet/codes/models/customize_loss.py
code served (permissive licence) · get_code("eb62da4f250a4e17")
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 (2, 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

torch.manual_seed(0)

# Create a small RGB tensor with shape (B, C, H, W)
# B=2 (batch size), C=3 (RGB channels), H=4, W=3 (spatial dimensions)
tensor_rgb = torch.randn(2, 3, 4, 3)

ARGS = {
    "tensor_rgb": tensor_rgb
}
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 (2, 4, 3) — shape (2, 4, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse Not yet run
unverified (harvested, no recorded run)
wanghu178/KUNet/codes/options/options.py
code served (permissive licence) · get_code("3759115dd8cbb31e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 9 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 0 the same month, 6 later) and 2 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
gaussian 160 other papers
17 dated earlier, 127 later, 16 same year, order not determinable · 7 only as an assembly brick
1812.11941 (2018-12)
High Quality Monocular Depth Estimation via Transfer Learning
1904.01538 (2019-04)
Spatial Attentive Single-Image Deraining with a High Quality Real Rain Dataset
1907.11628 (2019-07)
Unsupervised Learning for Optical Flow Estimation Using Pyramid Convolution LSTM
and 157 more not named here
make_layer 31 other papers
12 dated earlier, 13 later, 6 same year, order not determinable · 6 only as an assembly brick
1809.00219 (2018-09)
ESRGAN: Enhanced Super-Resolution Generative Adversarial Networks
1905.02716 (2019-05)
EDVR: Video Restoration with Enhanced Deformable Convolutional Networks
1905.10485 (2019-05)
Generative Latent Flow
and 28 more not named here
dict2str 23 other papers
5 dated earlier, 15 later, 3 same year, order not determinable
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
2005.05650 (2020-05)
Invertible Image Rescaling
and 20 more not named here
create_window 19 other papers
4 dated earlier, 12 later, 3 same year, order not determinable
1812.11941 (2018-12)
High Quality Monocular Depth Estimation via Transfer Learning
Zavrtanik_DRAEM_-_A_Discriminatively_Trained_Reconstruction_Embedding_for_Surface_Anomaly_ICCV_2021_paper (2021 (year only))
DRAEM -A discriminatively trained reconstruction embedding for surface anomaly detection
2108.07610 (2021-08)
DRAEM -- A discriminatively trained reconstruction embedding for surface anomaly detection
and 16 more not named here
dict_to_nonedict 19 other papers
3 dated earlier, 14 later, 2 same year, order not determinable
1609.04802 (2016-09)
Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network
1905.02716 (2019-05)
EDVR: Video Restoration with Enhanced Deformable Convolutional Networks
2006.14200 (2020-06)
SRFlow: Learning the Super-Resolution Space with Normalizing Flow
and 16 more not named here
flow_warp 5 other papers
4 dated earlier, 1 later
1809.00219 (2018-09)
ESRGAN: Enhanced Super-Resolution Generative Adversarial Networks
1905.02716 (2019-05)
EDVR: Video Restoration with Enhanced Deformable Convolutional Networks
1911.10375 (2019-11)
Region Normalization for Image Inpainting
and 2 more not named here
INF 2 other papers
2 dated earlier
1811.11721 (2018-11)
CCNet: Criss-Cross Attention for Semantic Segmentation
2008.07519 (2020-08)
V2VNet: Vehicle-to-Vehicle Communication for Joint Perception and Prediction
mu_tonemap 1 other paper
1 dated earlier
1912.11463 (2019-12)
FHDR: HDR Image Reconstruction from a Single LDR Image using Feedback Network
ssim 1 other paper
1 same year, order not determinable
2204.08332 (2022-04)
BSRT: Improving Burst Super-Resolution with Swin Transformer and Flow-Guided Deformable Alignment

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

Repositories linked to this paper

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

Abstract

Recently, with the rise of high dynamic range (HDR) display devices, there is a great demand to transfer traditional low dynamic range (LDR) images into HDR versions. The key to success is how to solve the many-to-many mapping problem. However, the existing approaches either do not consider constraining solution space or just simply imitate the inverse camera imaging pipeline in stages, without directly formulating the HDR image generation process. In this work, we address this problem by integrating LDR-to-HDR imaging knowledge into an UNet architecture, dubbed as Knowledge-inspired UNet (KUNet). The conversion from LDR-to-HDR image is mathematically formulated, and can be conceptually divided into recovering missing details, adjusting imaging parameters and reducing imaging noise. Accordingly, we develop a basic knowledge-inspired block (KIB) including three subnetworks corresponding to the three procedures in this HDR imaging process. The KIB blocks are cascaded in the similar way to the UNet to construct HDR image with rich global information. In addition, we also propose a knowledge inspired jump-connect structure to fit a dynamic range gap between HDR and LDR images. Experimental results demonstrate that the proposed KUNet achieves superior performance compared with the state-of-the-art methods. The code, dataset and appendix materials are available at https://github.com/wanghu178/KUNet.git.

For agents

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

get_harvested_code_for_paper("ijcai2022_0196")
get_code_for_paper("ijcai2022_0196")
have("ijcai2022_0196")

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

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

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

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

Connect an agent — have() is free.