SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1912.06960 · 2019

What Else Can Fool Deep Learning? Addressing Color Constancy Errors on Deep Neural Network Performance

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 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, 2 violated it and 3 have no contract verdict; 1 failure of our instrument; 0 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/1912.06960.json · badge: /api/ran/1912.06960.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
mahmoudnafifi/WB_color_augmenter canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
FunctionStatusWhere it lives
changeWB Ran
ran on a synthesized input
mahmoudnafifi/WB_color_augmenter/WBAugmenter_Python/WBAugmenter/WBEmulator.py
code served (permissive licence) · get_code("4df09ba7f5b77e55")
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 Image. 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 PIL import Image

def kernelP9(I):
    """Kernel function: kernel(r, g, b) -> (r, g, b, r2, g2, b2, rg, rb, gb)"""
    return np.transpose((I[:, 0], I[:, 1], I[:, 2], I[:, 0] * I[:, 0], I[:, 1] * I[:, 1], I[:, 2] * I[:, 2], I[:, 0] * I[:, 1], I[:, 0] * I[:, 2], I[:, 1] * I[:, 2]))

def outOfGamutClipping(I):
    """Clips out-of-gamut pixels."""
    I[I > 1] = 1
    I[I < 0] = 0
    return I

def to_image(im):
    """Returns a PIL image from a given numpy [0-1] image."""
    return Image.fromarray(np.uint8(im * 255))

def changeWB(input, m):
    """Applies a mapping function m to a given input image."""
    sz = np.shape(input)
    I_reshaped = np.reshape(input, (int(input.size / 3), 3), order='F')
    kernel_out = kernelP9(I_reshaped)
    out = np.dot(kernel_out, m)
    out = outOfGamutClipping(out)
    out = out.reshape(sz[0], sz[1], sz[2], order='F')
    out = to_image(out)
    return out

# Create a small test image: 4x3x3 (height x width x channels)
# Values in [0, 1] range
test_image = np.random.rand(4, 3, 3).astype(np.float32)

# Create a mapping matrix m of shape (9, 3)
# kernelP9 produces 9 features, and we map to 3 output channels (RGB)
m = np.random.randn(9, 3).astype(np.float32) * 0.1

ARGS = {
    "input": test_image,
    "m": m
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
deriveScaleFromSize Ran
ran, violated the contract we drafted
mahmoudnafifi/WB_color_augmenter/WBAugmenter_Python/WBAugmenter/imresize.py
pointer only (licence: MIT); the stored copy get_code serves, from andreas128/SRFlow, is pointer only (licence: NOASSERTION) · get_code("b97b2d33b67260a8")
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.

deriveSizeFromScale Ran
ran; our contract draft was wrong, not the code
mahmoudnafifi/WB_color_augmenter/WBAugmenter_Python/WBAugmenter/imresize.py
pointer only (licence: MIT); the stored copy get_code serves, from andreas128/SRFlow, is pointer only (licence: NOASSERTION) · get_code("ffe34bf756a6eaa8")
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.

kernelP9 Ran
ran on a synthesized input
mahmoudnafifi/WB_color_augmenter/WBAugmenter_Python/WBAugmenter/WBEmulator.py
code served (permissive licence) · get_code("9363dea8558996d6")
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 ndarray, ndim 2, dtype family float, shape (2, 9) 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

# The function kernelP9 takes an input I and:
# - Accesses I[:, 0], I[:, 1], I[:, 2] (so I must be 2D array with at least 3 columns)
# - Performs element-wise operations on those columns
# - Returns np.transpose of a tuple of 9 arrays

# Create a small test input: shape (2, 3) for batch_size=2, 3 color channels (r, g, b)
I = np.array([
    [1.0, 2.0, 3.0],
    [4.0, 5.0, 6.0]
], dtype=np.float32)

ARGS = {
    "I": I
}
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 ndarray, ndim 2, dtype family float, shape (2, 9) — shape (2, 9) 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
outOfGamutClipping Ran
ran on a synthesized input
mahmoudnafifi/WB_color_augmenter/WBAugmenter_Python/WBAugmenter/WBEmulator.py
code served (permissive licence) · get_code("a54f9e1a4189bdd1")
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 2, dtype family float, shape (2, 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 takes a single parameter I, which is indexed with I > 1 and I < 0
# This suggests I is a tensor or numpy array that supports boolean indexing
# The function modifies it in-place and returns it
# We'll create a small tensor with values both in and out of the [0, 1] gamut range

I = torch.tensor([
    [-0.5, 0.3, 1.2, 0.8],
    [0.0, 1.5, 0.5, -0.2]
], dtype=torch.float32)

ARGS = {
    "I": I
}
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 2, dtype family float, shape (2, 4) — shape (2, 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
triangle Ran
ran, violated the contract we drafted
mahmoudnafifi/WB_color_augmenter/WBAugmenter_Python/WBAugmenter/imresize.py
pointer only (licence: MIT); the stored copy get_code serves, from andreas128/SRFlow, is pointer only (licence: NOASSERTION) · get_code("2722f476a816c1b9")
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.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 3 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
deriveScaleFromSize 3 other papers
3 later
2204.09679 (2022-04)
FS-NCSR: Increasing Diversity of the Super-Resolution Space via Frequency Separation and Noise-Conditioned Normalizing Flow
2210.12593 (2022-10)
Single Image Super-Resolution via a Dual Interactive Implicit Neural Network
2403.15139 (2024-03)
Deep Generative Model based Rate-Distortion for Image Downscaling Assessment
deriveSizeFromScale 3 other papers
3 later
2204.09679 (2022-04)
FS-NCSR: Increasing Diversity of the Super-Resolution Space via Frequency Separation and Noise-Conditioned Normalizing Flow
2210.12593 (2022-10)
Single Image Super-Resolution via a Dual Interactive Implicit Neural Network
2403.15139 (2024-03)
Deep Generative Model based Rate-Distortion for Image Downscaling Assessment
triangle 3 other papers
3 later
2204.09679 (2022-04)
FS-NCSR: Increasing Diversity of the Super-Resolution Space via Frequency Separation and Noise-Conditioned Normalizing Flow
2210.12593 (2022-10)
Single Image Super-Resolution via a Dual Interactive Implicit Neural Network
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

There is active research targeting local image manipulations that can fool deep neural networks (DNNs) into producing incorrect results. This paper examines a type of global image manipulation that can produce similar adverse effects. Specifically, we explore how strong color casts caused by incorrectly applied computational color constancy - referred to as white balance (WB) in photography - negatively impact the performance of DNNs targeting image segmentation and classification. In addition, we discuss how existing image augmentation methods used to improve the robustness of DNNs are not well suited for modeling WB errors. To address this problem, a novel augmentation method is proposed that can emulate accurate color constancy degradation. We also explore pre-processing training and testing images with a recent WB correction algorithm to reduce the effects of incorrectly white-balanced images. We examine both augmentation and pre-processing strategies on different datasets and demonstrate notable improvements on the CIFAR-10, CIFAR-100, and ADE20K datasets.

For agents

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

get_harvested_code_for_paper("1912.06960")
get_code_for_paper("1912.06960")
have("1912.06960")

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

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

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

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

Connect an agent — have() is free.