SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2508.16121 · ICCV · 2025

Lightweight and Fast Real-time Image Enhancement via Decomposition of the Spatial-aware Lookup Tables

Nam Cho, Keuntek Lee, Wontae Kim

arXiv · PDF · Open in the Atlas

Code that ran

8 of 8 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, 1 violated it and 0 have no contract verdict; 7 failures of our instrument; 0 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/2508.16121.json · badge: /api/ran/2508.16121.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
WontaeaeKim/SVDLUT canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
FunctionStatusWhere it lives
discriminator_block Ran
ran; our contract draft was wrong, not the code
WontaeaeKim/SVDLUT/models.py
code served (permissive licence) · get_code("657cfe2acacee74a")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "in_filters": 3,
    "out_filters": 64,
    "normalization": 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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
normalize Ran
ran; our contract draft was wrong, not the code
WontaeaeKim/SVDLUT/torchvision_x_functional.py
code served (permissive licence) · get_code("0a30c75f6ce11b84")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (3, 4, 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

torch.manual_seed(0)

# Create a tensor image of size (C, H, W)
# C=3 channels, H=4 height, W=5 width
tensor = torch.randn(3, 4, 5, dtype=torch.float32)

# Define mean and std sequences for each channel
mean = [0.485, 0.456, 0.406]
std = [0.229, 0.224, 0.225]

ARGS = {
    'tensor': tensor,
    'mean': mean,
    'std': std,
    'inplace': 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 Tensor, ndim 3, dtype family float, shape (3, 4, 5) — shape (3, 4, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
preserve_channel_dim Ran
ran; our contract draft was wrong, not the code
WontaeaeKim/SVDLUT/torchvision_x_functional.py
code served (permissive licence) · get_code("e9005bd74922b43b")
How it ran

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

import numpy as np
from functools import wraps

def preserve_channel_dim(func):
    """Preserve dummy channel dim."""

    @wraps(func)
    def wrapped_function(img, *args, **kwargs):
        shape = img.shape
        result = func(img, *args, **kwargs)
        if len(shape) == 3 and shape[-1] == 1 and (len(result.shape) == 2):
            result = np.expand_dims(result, axis=-1)
        return result
    return wrapped_function


# Create a simple test function to decorate
def simple_image_func(img):
    """A simple function that takes an image and returns a processed version."""
    # Simulate some processing that might reduce dimensions
    if len(img.shape) == 3:
        return np.mean(img, axis=-1)
    return img


# Apply the decorator
decorated_func = preserve_channel_dim(simple_image_func)

# Create test images
# Image with shape (4, 3, 1) - 4x3 spatial dims with 1 channel
img_with_channel = np.random.rand(4, 3, 1).astype(np.float32)

ARGS = {
    "func": simple_image_func,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
score_2afc_dataset Ran
ran; our contract draft was wrong, not the code
WontaeaeKim/SVDLUT/lpips/trainer.py
code served (permissive licence) · get_code("514dd3c0eee3691c")
How it ran

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

import torch
import numpy as np

torch.manual_seed(0)

# Create a minimal distance function that takes two tensors and returns distances
def distance_func(tensor1, tensor2):
    """Compute L2 distance between two tensors and return as torch tensor"""
    # tensor1, tensor2 shape: Nx3xXxY
    # Flatten and compute L2 distance
    batch_size = tensor1.shape[0]
    diff = (tensor1 - tensor2).reshape(batch_size, -1)
    distances = torch.norm(diff, dim=1, keepdim=True)
    return distances

# Create a minimal data loader class with load_data method
class CustomDatasetDataLoader:
    def __init__(self, data_list):
        self.data_list = data_list
    
    def load_data(self):
        return iter(self.data_list)

# Create sample data batches
# Each batch contains 'ref', 'p0', 'p1', and 'judge' keys
batch_size = 2
height = 4
width = 5

data_batches = []
for _ in range(2):  # 2 batches
    batch = {
        'ref': torch.randn(batch_size, 3, height, width),
        'p0': torch.randn(batch_size, 3, height, width),
        'p1': torch.randn(batch_size, 3, height, width),
        'judge': torch.tensor([0.3, 0.7])  # Human preference scores in [0, 1]
    }
    data_batches.append(batch)

data_loader = CustomDatasetDataLoader(data_batches)

ARGS = {
    'data_loader': data_loader,
    'func': distance_func,
    'name': 'test_2afc'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
score_jnd_dataset Ran
ran; our contract draft was wrong, not the code
WontaeaeKim/SVDLUT/lpips/trainer.py
code served (permissive licence) · get_code("f9c3e2d99e41a30d")
How it ran

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

import torch
import numpy as np
from torch import nn

torch.manual_seed(0)

class MockDataLoader:
    def __init__(self):
        self.data = [
            {
                'p0': torch.randn(2, 3, 4, 4),
                'p1': torch.randn(2, 3, 4, 4),
                'same': torch.tensor([[1.0], [0.0]])
            },
            {
                'p0': torch.randn(2, 3, 4, 4),
                'p1': torch.randn(2, 3, 4, 4),
                'same': torch.tensor([[0.0], [1.0]])
            }
        ]
    
    def load_data(self):
        return iter(self.data)

def mock_distance_func(in0, in1):
    batch_size = in0.shape[0]
    distances = torch.randn(batch_size)
    return distances

data_loader = MockDataLoader()
func = mock_distance_func
name = 'test_jnd'

ARGS = {
    'data_loader': data_loader,
    'func': func,
    'name': name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
lpips, numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
spatial_average Ran
ran; our contract draft was wrong, not the code
WontaeaeKim/SVDLUT/lpips/lpips.py
code served (permissive licence) · get_code("29e5e72bcd006dcd")
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 4, dtype family float, shape (2, 4, 1, 1) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function performs spatial averaging on a 4D tensor (batch, channels, height, width)
# by taking the mean over dimensions 2 and 3 (height and width)
in_tens = torch.randn(2, 4, 3, 5)  # batch=2, channels=4, height=3, width=5

ARGS = {
    "in_tens": in_tens,
    "keepdim": True,
}
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 4, dtype family float, shape (2, 4, 1, 1) — shape (2, 4, 1, 1) 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
to_tensor Ran
ran, violated the contract we drafted
WontaeaeKim/SVDLUT/torchvision_x_functional.py
code served (permissive licence) · get_code("4d111d02727d38b5")
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 numpy as np
import torch

torch.manual_seed(0)

# Test case 1: uint8 image (2D)
img_uint8_2d = np.random.randint(0, 256, size=(4, 3), dtype=np.uint8)

# Test case 2: uint8 image (3D)
img_uint8_3d = np.random.randint(0, 256, size=(4, 3, 2), dtype=np.uint8)

# Test case 3: uint16 image
img_uint16 = np.random.randint(0, 65536, size=(4, 3, 2), dtype=np.uint16)

# Test case 4: float32 image
img_float32 = np.random.rand(4, 3, 2).astype(np.float32)

# Test case 5: float64 image
img_float64 = np.random.rand(4, 3, 2).astype(np.float64)

ARGS = {
    "img": img_uint8_3d
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (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
upsample Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
WontaeaeKim/SVDLUT/lpips/lpips.py
code served (permissive licence) · get_code("8cafd18b57a4d171")
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 4, dtype family float, shape (2, 4, 64, 64) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a small input tensor with shape (batch, channels, height, width)
# Using batch=2, channels=4, height=8, width=6 for distinct dimensions
in_tens = torch.randn(2, 4, 8, 6)

# Define output height and width
out_HW = (64, 64)

ARGS = {
    'in_tens': in_tens,
    'out_HW': out_HW
}
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 4, dtype family float, shape (2, 4, 64, 64) — shape (2, 4, 64, 64) 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

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 0 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
spatial_average 19 other papers
19 dated earlier
1801.03924 (2018-01)
The Unreasonable Effectiveness of Deep Features as a Perceptual Metric
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2002.09219 (2020-02)
Stochastic Latent Residual Video Prediction
and 16 more not named here
score_2afc_dataset 15 other papers
15 dated earlier
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2002.09219 (2020-02)
Stochastic Latent Residual Video Prediction
2005.00953 (2020-05)
Deep Generative Adversarial Residual Convolutional Networks for Real-World Super-Resolution
and 12 more not named here
upsample 5 other papers
5 dated earlier
1801.03924 (2018-01)
The Unreasonable Effectiveness of Deep Features as a Perceptual Metric
2207.13686 (2022-07)
Shift-tolerant Perceptual Similarity Metric
2307.15157 (2023-07)
R-LPIPS: An Adversarially Robust Perceptual Similarity Metric
and 2 more not named here
normalize 1 other paper
1 dated earlier
2105.09180 (2021-05)
PPR10K: A Large-Scale Portrait Photo Retouching Dataset with Human-Region Mask and Group-Level Consistency
preserve_channel_dim 1 other paper
1 dated earlier
2105.09180 (2021-05)
PPR10K: A Large-Scale Portrait Photo Retouching Dataset with Human-Region Mask and Group-Level Consistency
to_tensor 1 other paper
1 dated earlier
2105.09180 (2021-05)
PPR10K: A Large-Scale Portrait Photo Retouching Dataset with Human-Region Mask and Group-Level Consistency

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

The image enhancement methods based on 3D lookup tables (3D LUTs) efficiently reduce both model size and runtime by interpolating pre-calculated values at the vertices. However, the 3D LUT methods have a limitation due to their lack of spatial information, as they convert color values on a point-by-point basis. Although spatial-aware 3D LUT methods address this limitation, they introduce additional modules that require a substantial number of parameters, leading to increased runtime as image resolution increases. To address this issue, we propose a method for generating image-adaptive LUTs by focusing on the redundant parts of the tables. Our efficient framework decomposes a 3D LUT into a linear sum of low-dimensional LUTs and employs singular value decomposition (SVD). Furthermore, we enhance the modules for spatial feature fusion to be more cache-efficient. Extensive experimental results demonstrate that our model effectively decreases both the number of parameters and runtime while maintaining spatial awareness and performance. The code is available at https://github.com/WontaeaeKim/SVDLUT.

For agents

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

get_harvested_code_for_paper("2508.16121")
get_code_for_paper("2508.16121")
have("2508.16121")

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

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

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

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

Connect an agent — have() is free.