SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · Zhang_Learning_Rain_Location_Prior_for_Nighttime_Deraining_ICCV_2023_paper · ICCV · 2023

Learning Rain Location Prior for Nighttime Deraining

Fan Zhang, Ying Fu, Yu Li, Shaodi You

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; 1 honoured the contract we drafted, 2 violated it and 4 have no contract verdict; 3 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/Zhang_Learning_Rain_Location_Prior_for_Nighttime_Deraining_ICCV_2023_paper.json · badge: /api/ran/Zhang_Learning_Rain_Location_Prior_for_Nighttime_Deraining_ICCV_2023_paper.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
zkawfanx/RLP canonical (classifier label)
classifier basis: census
10 ran · 1 no recorded run
FunctionStatusWhere it lives
add_jpg_compression Ran
ran on a synthesized input
zkawfanx/RLP/rlp/utils.py
code served (permissive licence) · get_code("ac674a5f5bc93fa7")
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 float, shape (4, 3, 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 cv2
import numpy as np

# Create a small test image: shape (h=4, w=3, c=3), range [0, 1], float32
np.random.seed(0)
test_img = np.random.rand(4, 3, 3).astype(np.float32)

ARGS = {
    "img": test_img,
    "quality": 85
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — 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 float, shape (4, 3, 3) — shape (4, 3, 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
conv Ran
ran; our contract draft was wrong, not the code
zkawfanx/RLP/rlp/models/mprnet.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
expand2square Ran
ran on a synthesized input
zkawfanx/RLP/rlp/utils.py
code served (permissive licence) · get_code("184826b4b0deed67")
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. 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 math

torch.manual_seed(0)

# Create a small test image tensor
# Shape: (batch=2, channels=3, height=7, width=5)
timg = torch.randn(2, 3, 7, 5)

# Define arguments dictionary
ARGS = {
    "timg": timg,
    "factor": 16.0
}
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 — a tuple output has no array shape of its own; none is 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
is_frozen Ran
ran, violated the contract we drafted
zkawfanx/RLP/rlp/models/model_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from invokerer/deeprft, is pointer only (licence: NOASSERTION) · get_code("930cddf0a4d80ab1")
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 invokerer/deeprft, 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.

is_image_file Ran
ran, violated the contract we drafted
zkawfanx/RLP/rlp/dataset.py
pointer only (licence: MIT); the stored copy get_code serves, from invokerer/deeprft, is pointer only (licence: NOASSERTION) · get_code("91fca7a2b44569ad")
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 invokerer/deeprft, 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.

load_img Ran
ran on a synthesized input
zkawfanx/RLP/rlp/utils.py
code served (permissive licence) · get_code("b08cb97e21d7c321")
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 float, shape (4, 3, 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 cv2
import numpy as np
from PIL import Image

# Create a temporary image file for testing
temp_dir = tempfile.mkdtemp()
temp_image_path = os.path.join(temp_dir, "test_image.jpg")

# Create a small test image (4x3 RGB)
test_image = np.random.randint(0, 256, (4, 3, 3), dtype=np.uint8)
# Convert from RGB to BGR for cv2.imwrite
test_image_bgr = cv2.cvtColor(test_image, cv2.COLOR_RGB2BGR)
cv2.imwrite(temp_image_path, test_image_bgr)

ARGS = {
    "filepath": temp_image_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, cv2, numpy — 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 float, shape (4, 3, 3) — shape (4, 3, 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_start_epoch Ran
ran, honoured the contract we drafted
zkawfanx/RLP/rlp/models/model_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from invokerer/deeprft, is pointer only (licence: NOASSERTION) · get_code("c3bea8c4ee6bef4a")
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 invokerer/deeprft, 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.

rgb_to_ycbcr Ran
ran on a synthesized input
zkawfanx/RLP/evaluate_PSNR_SSIM.py
code served (permissive licence) · get_code("dc0b0dfedd94c18e")
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, 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 small RGB image tensor
# Shape: (batch_size, channels, height, width)
# Using batch=2, channels=3, height=4, width=5 for distinct dimensions
img = torch.randint(0, 256, (2, 3, 4, 5), dtype=torch.uint8)

ARGS = {
    "img": img
}
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, 3, 4, 5) — shape (2, 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
window_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zkawfanx/RLP/rlp/models/uformer.py
code served (permissive licence) · get_code("c4b5a8b25f271a68")
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 (8, 4, 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 torch.nn.functional as F

torch.manual_seed(0)

# Create a small input tensor with shape (B, H, W, C)
# B=2 (batch), H=8 (height), W=8 (width), C=4 (channels)
x = torch.randn(2, 8, 8, 4)

# Window size for partitioning
win_size = 4

# Dilation rate (default is 1, but we can test both cases)
dilation_rate = 1

ARGS = {
    'x': x,
    'win_size': win_size,
    'dilation_rate': dilation_rate
}
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 (8, 4, 4, 4) — shape (8, 4, 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
window_reverse Ran
ran; our contract draft was wrong, not the code
zkawfanx/RLP/rlp/models/uformer.py
code served (permissive licence) · get_code("e2cf4a766e987768")
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, 8, 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 torch
import torch.nn.functional as F

torch.manual_seed(0)

# Analyze the function:
# - windows: tensor with shape (B * H * W / win_size / win_size, win_size, win_size, C)
# - win_size: int, window size
# - H: int, height
# - W: int, width
# - dilation_rate: int, default 1

# Let's construct valid arguments:
# Choose small dimensions: B=2, H=8, W=8, win_size=4, C=3
B = 2
H = 8
W = 8
win_size = 4
C = 3
dilation_rate = 1

# Calculate the expected shape of windows tensor
# windows.shape[0] = B * H * W / win_size / win_size
# = 2 * 8 * 8 / 4 / 4 = 2 * 4 = 8
num_windows = (H * W) // (win_size * win_size)
total_batch_windows = B * num_windows

# windows shape should be (total_batch_windows, win_size, win_size, C)
windows = torch.randn(total_batch_windows, win_size, win_size, C)

ARGS = {
    "windows": windows,
    "win_size": win_size,
    "H": H,
    "W": W,
    "dilation_rate": dilation_rate,
}
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, 8, 8, 3) — shape (2, 8, 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
load_optim Not yet run
unverified (harvested, no recorded run)
zkawfanx/RLP/rlp/models/model_utils.py
code served (permissive licence) · get_code("81e30648b66c8cf7")
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, 7 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 7 later) and 4 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
conv 22 other papers
8 dated earlier, 9 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
136790177 (2022 (year only))
Frequency and Spatial Dual Guidance for Image Dehazing
and 19 more not named here
is_frozen 8 other papers
5 later, 3 same year, order not determinable
2308.03867 (2023-08)
From Sky to the Ground: A Large-scale Benchmark and Simple Baseline Towards Real Rain Removal
2309.03063 (2023-09)
Prompt-based Ingredient-Oriented All-in-One Image Restoration
2309.04803 (2023-09)
Towards Real-World Burst Image Super-Resolution: Benchmark and Method
and 5 more not named here
load_start_epoch 8 other papers
5 later, 3 same year, order not determinable
2308.03867 (2023-08)
From Sky to the Ground: A Large-scale Benchmark and Simple Baseline Towards Real Rain Removal
2309.03063 (2023-09)
Prompt-based Ingredient-Oriented All-in-One Image Restoration
2309.04803 (2023-09)
Towards Real-World Burst Image Super-Resolution: Benchmark and Method
and 5 more not named here
window_partition 8 other papers
1 dated earlier, 3 later, 4 same year, order not determinable · 1 only as an assembly brick
2106.03106 (2021-06)
Uformer: A General U-Shaped Transformer for Image Restoration
2308.03867 (2023-08)
From Sky to the Ground: A Large-scale Benchmark and Simple Baseline Towards Real Rain Removal
2309.02020 (2023-09)
RawHDR: High Dynamic Range Image Reconstruction from a Single Raw Image
and 5 more not named here
window_reverse 8 other papers
1 dated earlier, 4 later, 3 same year, order not determinable · 2 only as an assembly brick
2106.03106 (2021-06)
Uformer: A General U-Shaped Transformer for Image Restoration
2308.03867 (2023-08)
From Sky to the Ground: A Large-scale Benchmark and Simple Baseline Towards Real Rain Removal
2309.02020 (2023-09)
RawHDR: High Dynamic Range Image Reconstruction from a Single Raw Image
and 5 more not named here
is_image_file 5 other papers
3 later, 2 same year, order not determinable
2308.03867 (2023-08)
From Sky to the Ground: A Large-scale Benchmark and Simple Baseline Towards Real Rain Removal
2309.03063 (2023-09)
Prompt-based Ingredient-Oriented All-in-One Image Restoration
Zhou_Adapt_or_Perish_Adaptive_Sparse_Transformer_with_Attentive_Feature_Refinement_CVPR_2024_paper (2024 (year only))
Adapt or Perish: Adaptive Sparse Transformer with Attentive Feature Refinement for Image Restoration
and 2 more not named here
load_optim 3 other papers
1 later, 2 same year, order not determinable
2308.03867 (2023-08)
From Sky to the Ground: A Large-scale Benchmark and Simple Baseline Towards Real Rain Removal
2309.04803 (2023-09)
Towards Real-World Burst Image Super-Resolution: Benchmark and Method
Zhou_Adapt_or_Perish_Adaptive_Sparse_Transformer_with_Attentive_Feature_Refinement_CVPR_2024_paper (2024 (year only))
Adapt or Perish: Adaptive Sparse Transformer with Attentive Feature Refinement for Image Restoration

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

Rain can significantly degrade image quality and visibility, making deraining a critical area of research in computer vision. Despite recent progress in learning-based deraining methods, there is a lack of focus on nighttime deraining due to the unique challenges posed by non-uniform local illuminations from artificial light sources. Rain streaks in these scenes have diverse appearances that are tightly related to their relative positions to light sources, making it difficult for existing deraining methods to effectively handle them. In this paper, we highlight the importance of rain streak location information in nighttime deraining. Specifically, we propose a Rain Location Prior (RLP) that is learned implicitly from rainy images using a recurrent residual model. This learned prior contains location information of rain streaks and, when injected into deraining models, can significantly improve their performance. To further improve the effectiveness of the learned prior, we also propose a Rain Prior Injection Module (RPIM) to modulate the prior before injection, increasing the importance of features within rain streak areas. Experimental results demonstrate that our approach outperforms existing state-of-the-art methods by about 1dB and effectively improves the performance of deraining models. We also evaluate our method on real night rainy images to show the capability to handle real scenes with fully synthetic data for training. Our method represents a significant step forward in the area of nighttime deraining and highlights the importance of location information in this challenging problem. The code is publicly available at https: //github.com/zkawfanx/RLP.

For agents

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

get_harvested_code_for_paper("Zhang_Learning_Rain_Location_Prior_for_Nighttime_Deraining_ICCV_2023_paper")
get_code_for_paper("Zhang_Learning_Rain_Location_Prior_for_Nighttime_Deraining_ICCV_2023_paper")
have("Zhang_Learning_Rain_Location_Prior_for_Nighttime_Deraining_ICCV_2023_paper")

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

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

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

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

Connect an agent — have() is free.