SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2005.05999 · 2020

Fast Deep Multi-patch Hierarchical Network for Nonhomogeneous Image Dehazing

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, 0 violated it and 3 have no contract verdict; 3 failures 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/2005.05999.json · badge: /api/ran/2005.05999.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
saikatdutta/Stacked_DMSHN_bokeh community (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
FunctionStatusWhere it lives
im2tensor Ran
ran on a synthesized input
saikatdutta/Stacked_DMSHN_bokeh/PerceptualSimilarity/util/util.py
code served (permissive licence) · get_code("bd01f18257f00b1e")
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 (1, 4, 2, 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)

# The function expects a numpy array that will be:
# 1. Divided by factor
# 2. Subtracted by cent
# 3. Has shape (height, width, channels, 1) after adding np.newaxis
# 4. Transposed to (1, channels, height, width)
# 
# Working backwards, the input image should have shape (height, width, channels)
# Let's use distinct dimensions: height=2, width=3, channels=4

image = np.random.randint(0, 256, size=(2, 3, 4), dtype=np.uint8)

ARGS = {
    "image": image,
    "imtype": np.uint8,
    "cent": 1.0,
    "factor": 255.0 / 2.0
}
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 (1, 4, 2, 3) — shape (1, 4, 2, 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
load_image Ran
ran on a synthesized input
saikatdutta/Stacked_DMSHN_bokeh/PerceptualSimilarity/util/util.py
code served (permissive licence) · get_code("722a1d429018eccd")
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 3, dtype family int, shape (10, 8, 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 tempfile
import os
import numpy as np

# Create a temporary PNG file for testing
temp_dir = tempfile.mkdtemp()
temp_png_path = os.path.join(temp_dir, "test_image.png")

# Create a simple RGB image array (height=10, width=8, channels=3)
img_array = np.random.randint(0, 256, (10, 8, 3), dtype=np.uint8)

# Save as PNG using a simple method
from PIL import Image
img = Image.fromarray(img_array)
img.save(temp_png_path)

ARGS = {
    "path": temp_png_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, cv2, matplotlib, numpy, rawpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (10, 8, 3) — shape (10, 8, 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
score_2afc_dataset Ran
ran; our contract draft was wrong, not the code
saikatdutta/Stacked_DMSHN_bokeh/PerceptualSimilarity/models/dist_model.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
spatial_average Ran
ran; our contract draft was wrong, not the code
saikatdutta/Stacked_DMSHN_bokeh/PerceptualSimilarity/models/networks_basic.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
tensor2im Ran
ran on a synthesized input
saikatdutta/Stacked_DMSHN_bokeh/PerceptualSimilarity/util/util.py
code served (permissive licence) · get_code("9c741ec329754265")
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 3, dtype family int, shape (4, 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 numpy as np

torch.manual_seed(0)

# Create a small image tensor with batch size 2, 3 channels, 4x4 spatial dimensions
# Shape: (batch, channels, height, width)
image_tensor = torch.randn(2, 3, 4, 4)

ARGS = {
    "image_tensor": image_tensor,
    "imtype": np.uint8,
    "cent": 1.0,
    "factor": 255.0 / 2.0
}
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 ndarray, ndim 3, dtype family int, shape (4, 4, 3) — shape (4, 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)
saikatdutta/Stacked_DMSHN_bokeh/PerceptualSimilarity/models/networks_basic.py
pointer only (licence: MIT); the stored copy get_code serves, from cychungg/hairfusion, is pointer only (licence: NONE) · get_code("351677a36e1961df")
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 cychungg/hairfusion, 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.

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, 4 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 1 the same month, 4 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
3 dated earlier, 16 later
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
2 dated earlier, 1 the same month, 12 later
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 10 other papers
2 dated earlier, 8 later
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2002.09219 (2020-02)
Stochastic Latent Residual Video Prediction
2006.09461 (2020-06)
Robust Compressed Sensing using Generative Models
and 7 more not named here
tensor2im 1 other paper
1 later
Lei_Shape_From_Polarization_for_Complex_Scenes_in_the_Wild_CVPR_2022_paper (2022 (year only))
Shape from Polarization for Complex Scenes in the Wild

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

Recently, CNN based end-to-end deep learning methods achieve superiority in Image Dehazing but they tend to fail drastically in Non-homogeneous dehazing. Apart from that, existing popular Multi-scale approaches are runtime intensive and memory inefficient. In this context, we proposed a fast Deep Multi-patch Hierarchical Network to restore Non-homogeneous hazed images by aggregating features from multiple image patches from different spatial sections of the hazed image with fewer number of network parameters. Our proposed method is quite robust for different environments with various density of the haze or fog in the scene and very lightweight as the total size of the model is around 21.7 MB. It also provides faster runtime compared to current multi-scale methods with an average runtime of 0.0145s to process 1200x1600 HD quality image. Finally, we show the superiority of this network on Dense Haze Removal to other state-of-the-art models.

For agents

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

get_harvested_code_for_paper("2005.05999")
get_code_for_paper("2005.05999")
have("2005.05999")

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

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

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

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

Connect an agent — have() is free.