SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 136790177 · ECCV · 2022

Frequency and Spatial Dual Guidance for Image Dehazing

Man Zhou, Hu Yu, Jie Huang, Feng Zhao, Zeyu Xiao, Naishan Zheng

Open in the Atlas

Code that ran

7 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, 0 violated it and 3 have no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/136790177.json · badge: /api/ran/136790177.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
yuhuUSTC/FSDGN canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
FunctionStatusWhere it lives
conv Ran
ran; our contract draft was wrong, not the code
yuhuUSTC/FSDGN/basicsr/archs/FSDGN_arch.py
code served (permissive licence) · get_code("ad4c565716dab068")
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 Conv2d. 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

torch.manual_seed(0)

ARGS = {
    "in_channels": 3,
    "out_channels": 16,
    "kernel_size": 3,
    "bias": False,
    "stride": 1,
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
forward_crop Ran
ran on a synthesized input
yuhuUSTC/FSDGN/basicsr/models/crop_validation.py
code served (permissive licence) · get_code("dab6b19604d6bd8f")
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, 4, 96, 96) 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)

# Build a minimal model that can be called (though forward_crop doesn't actually call it)
class DummyModel(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = torch.nn.Linear(1, 1)
    
    def forward(self, x):
        return x

model = DummyModel()

# Create input tensor: (B=2, T=3, C=4, H=96, W=96)
# H and W should be divisible by base_size-overlap for cleaner cropping
# base_size = 64 - 16 = 48, so use 96 (divisible by 48)
x = torch.randn(2, 3, 4, 96, 96)

ARGS = {
    'x': x,
    'model': model,
    'lq_size': 64,
    'scale': 1,
    'overlap': 16,
    'flow_opt': 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 4, dtype family float, shape (2, 4, 96, 96) — shape (2, 4, 96, 96) 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
get_position_from_periods Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yuhuUSTC/FSDGN/basicsr/models/lr_scheduler.py
pointer only (licence: MIT); the stored copy get_code serves, from AlifAshrafee/Restoring-Without-Forgetting, is pointer only (licence: NONE) · get_code("cd569444547de84f")
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 AlifAshrafee/Restoring-Without-Forgetting, 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.

hr_crop_index Ran
ran on a synthesized input
yuhuUSTC/FSDGN/basicsr/models/crop_validation.py
code served (permissive licence) · get_code("439fb7f895a52886")
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 int; 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)

# Analyzing the function hr_crop_index:
# Parameters: n, N, D, Dmod, base_size, overlap
# - n: integer index (0 to N-1)
# - N: total number of crops
# - D: total dimension size
# - Dmod: modulo/remainder value
# - base_size: size of each base crop
# - overlap: overlap between crops

# The function computes crop indices, so all parameters are integers
# Let's construct a valid scenario where cropping makes sense

# Example setup:
# - Total dimension D = 512 pixels
# - We want to split into N = 4 crops
# - base_size = 128 pixels per crop
# - overlap = 32 pixels between crops
# - Dmod = remainder when D is divided by something (D % (base_size + overlap/2) or similar)
# - n = 1 (we're querying the 2nd crop, index 1)

n = 1
N = 4
D = 512
base_size = 128
overlap = 32
Dmod = D % base_size  # remainder: 512 % 128 = 0

ARGS = {
    "n": n,
    "N": N,
    "D": D,
    "Dmod": Dmod,
    "base_size": base_size,
    "overlap": overlap,
}
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 tuple, ndim 1, dtype family int — 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
lr_crop_index Ran
ran on a synthesized input
yuhuUSTC/FSDGN/basicsr/models/crop_validation.py
code served (permissive licence) · get_code("55b5b13c77a1d206")
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 int; 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

torch.manual_seed(0)

# Analyze the function signature and body:
# def lr_crop_index(n, N, D, base_size, overlap):
#   n_end = D if n == N - 1 else (n + 1) * base_size + overlap
#   n_start = n_end - base_size - overlap
#   return (n_start, n_end)
#
# Parameters:
# - n: current index (integer, used in comparison and arithmetic)
# - N: total number of items (integer, used in comparison)
# - D: dimension or max value (integer, used conditionally)
# - base_size: size value (integer, used in arithmetic)
# - overlap: overlap value (integer, used in arithmetic)
#
# All parameters are used in simple integer arithmetic and comparisons.

ARGS = {
    'n': 2,           # current chunk index
    'N': 5,           # total number of chunks
    'D': 100,         # total dimension/size
    'base_size': 32,  # base size of each chunk
    'overlap': 8      # overlap between chunks
}
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 tuple, ndim 1, dtype family int — 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
reduce_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yuhuUSTC/FSDGN/basicsr/losses/loss_util.py
code served (permissive licence) · get_code("a648a03a952822c0")
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

torch.manual_seed(0)

# Create a small elementwise loss tensor (batch=2, elements=4)
loss = torch.tensor([[0.5, 1.2, 0.3, 0.8], [0.9, 0.4, 1.1, 0.6]], dtype=torch.float32)

# Test with 'mean' reduction
reduction = 'mean'

ARGS = {
    'loss': loss,
    'reduction': reduction,
}
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
weight_reduce_loss Ran
ran; our contract draft was wrong, not the code
yuhuUSTC/FSDGN/basicsr/losses/loss_util.py
code served (permissive licence) · get_code("1ba39317ea81871a")
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

torch.manual_seed(0)

# Create a small loss tensor (batch_size=2, num_elements=4)
loss = torch.rand(2, 4)

# Create a weight tensor with matching dimensions
# weight.dim() == loss.dim() and weight.size(1) == loss.size(1)
weight = torch.rand(2, 4)

# Test different reduction modes
reduction = 'mean'

ARGS = {
    'loss': loss,
    'weight': weight,
    'reduction': reduction
}
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
weighted_loss Not yet run
unverified (harvested, no recorded run)
yuhuUSTC/FSDGN/basicsr/losses/loss_util.py
code served (permissive licence) · get_code("cf63f8afc13f62a7")
How it ran

no invocation recorded.

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, 5 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 5 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
get_position_from_periods 55 other papers
1 dated earlier, 51 later, 3 same year, order not determinable
2110.04627 (2021-10)
Vector-quantized Image Modeling with Improved VQGAN
2204.04676 (2022-04)
Simple Baselines for Image Restoration
2205.05996 (2022-05)
Blueprint Separable Residual Network for Efficient Image Super-Resolution
and 52 more not named here
weighted_loss 44 other papers
40 later, 4 same year, order not determinable
2203.14216 (2022-03)
Efficient and Degradation-Adaptive Network for Real-World Image Super-Resolution
2205.05996 (2022-05)
Blueprint Separable Residual Network for Efficient Image Super-Resolution
2206.02146 (2022-06)
Recurrent Video Restoration Transformer with Guided Deformable Attention
and 41 more not named here
reduce_loss 43 other papers
39 later, 4 same year, order not determinable
2203.14216 (2022-03)
Efficient and Degradation-Adaptive Network for Real-World Image Super-Resolution
2205.05996 (2022-05)
Blueprint Separable Residual Network for Efficient Image Super-Resolution
2206.02146 (2022-06)
Recurrent Video Restoration Transformer with Guided Deformable Attention
and 40 more not named here
weight_reduce_loss 43 other papers
39 later, 4 same year, order not determinable
2203.14216 (2022-03)
Efficient and Degradation-Adaptive Network for Real-World Image Super-Resolution
2205.05996 (2022-05)
Blueprint Separable Residual Network for Efficient Image Super-Resolution
2206.02146 (2022-06)
Recurrent Video Restoration Transformer with Guided Deformable Attention
and 40 more not named here
conv 22 other papers
2 dated earlier, 15 later, 5 same year, order not determinable · 7 only as an assembly brick
2102.02808 (2021-02)
Multi-Stage Progressive Image Restoration
2106.03106 (2021-06)
Uformer: A General U-Shaped Transformer for Image Restoration
ijcai2022_0131 (2022 (year only))
Exploring Fourier Prior for Single Image Rain Removal
and 19 more not named here

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

Repositories linked to this paper

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

Abstract

In this paper, we propose a novel image dehazing framework with frequency and spatial dual guidance. In contrast to most existing deep learning-based image dehazing methods that primarily exploit the spatial information and neglect the distinguished frequency information, we introduce a new perspective to address image dehazing by jointly exploring the information in the frequency and spatial domains. To implement frequency and spatial dual guidance, we delicately develop two core designs: amplitude guided phase module in the frequency domain and global guided local module in the spatial domain. Specifically, the former processes the global frequency information via deep Fourier transform and reconstructs the phase spectrum under the guidance of the amplitude spectrum, while the latter integrates the above global frequency information to facilitate the local feature learning in the spatial domain. Extensive experiments on synthetic and real-world datasets demonstrate that our method outperforms the state-of-the-art approaches both visually and quantitatively. Our code is released publicly at https://github.com/yuhuUSTC/FSDGN

For agents

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

get_harvested_code_for_paper("136790177")
get_code_for_paper("136790177")
have("136790177")

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

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

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

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

Connect an agent — have() is free.