SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2609.00666 · September 2026

DGNet: Dual-knowledge Guided Network for Infrared Small Target Detection

Jing Wang, Liqiang Nie, Mingzhu Xu, Tongtong Wang, Chenglong Yu, Pingping Miao

arXiv · PDF · Open in the Atlas

Code that ran

8 of 13 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, 0 violated it and 1 has no contract verdict; 6 failures of our instrument; 5 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/2609.00666.json · badge: /api/ran/2609.00666.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
iLearn-Lab/MM26-DGNet canonical (classifier label)
classifier basis: census
8 ran · 5 no recorded run
FunctionStatusWhere it lives
batch_intersection_union Ran
ran; our contract draft was wrong, not the code
iLearn-Lab/MM26-DGNet/metrics.py
code served (permissive licence) · get_code("6237fa9642219064")
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 2, 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)

# The function expects:
# - output: a tensor that will be thresholded (> 0) and converted to float
# - target: a tensor with either 3 or 4 dimensions that will be converted to float

# Create output tensor: shape (2, 1, 4, 3) - batch=2, channels=1, height=4, width=3
output = torch.randn(2, 1, 4, 3)

# Create target tensor with 4 dimensions: shape (2, 1, 4, 3)
# This matches the output shape after expand_dims would be applied in the 3D case
target = torch.randint(0, 2, (2, 1, 4, 3)).float()

ARGS = {
    "output": output,
    "target": target
}
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 2, 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
batch_pix_accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
iLearn-Lab/MM26-DGNet/metrics.py
code served (permissive licence) · get_code("4dfe8308e4ca4fc5")
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 small tensors for output and target
# output and target need to have the same shape
# The function expects them to have .float() method and support > comparison
# and == comparison, so they should be torch tensors

# Create output tensor with shape (2, 1, 4, 3) - batch=2, channels=1, height=4, width=3
output = torch.randn(2, 1, 4, 3)

# Create target tensor with shape (2, 1, 4, 3) - same shape as output
target = torch.randint(0, 2, (2, 1, 4, 3)).float()

ARGS = {
    'output': output,
    'target': target
}
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 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
controlled_background_statistics_augmentation Ran
ran on a synthesized input
iLearn-Lab/MM26-DGNet/dataset.py
code served (permissive licence) · get_code("b872a23720f7279b")
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 (16, 16) 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 random

# Set seed for reproducibility
random.seed(0)
np.random.seed(0)

# Create a small source image (grayscale, float32, values 0-255)
source_image = np.random.uniform(50, 200, size=(16, 16)).astype(np.float32)

# Create a mask with some positive regions (indicating target regions)
mask = np.zeros((16, 16), dtype=np.float32)
mask[4:8, 4:8] = 1.0  # One target region
mask[10:12, 10:12] = 1.0  # Another target region

# Define arguments dictionary
ARGS = {
    'source_image': source_image,
    'mask': mask,
    'mean_shift_range': (7.0, 21.0),
    'std_ratio_range': (0.85, 1.3),
    'protection_radius': 3,
    'local_contrast_radius': 12,
    'minimum_contrast_ratio': 0.8,
    'feather_sigma': 1.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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 (16, 16) — shape (16, 16) 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
create_wavelet_filter Ran
ran; our contract draft was wrong, not the code
iLearn-Lab/MM26-DGNet/model/dgnet/wavelet.py
code served (permissive licence) · get_code("699b51ce9a741830")
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 pywt

torch.manual_seed(0)

ARGS = {
    "wave": "db1",
    "in_size": 2,
    "out_size": 3,
    "type": torch.float
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pywt, 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
encode_prompt Ran
ran, honoured the contract we drafted
iLearn-Lab/MM26-DGNet/prepare_text_features.py
code served (permissive licence) · get_code("107a6ad0d5281629")
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 (1, 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 as nn

torch.manual_seed(0)

class MockTokenizer:
    def __call__(self, prompt, padding=None, max_length=None, truncation=None, return_tensors=None):
        batch_size = 1
        seq_length = 30
        input_ids = torch.randint(0, 1000, (batch_size, seq_length))
        attention_mask = torch.ones(batch_size, seq_length)
        
        class TokenizerOutput:
            def __init__(self, input_ids, attention_mask):
                self.input_ids = input_ids
                self.attention_mask = attention_mask
        
        return TokenizerOutput(input_ids, attention_mask)

class MockTextEncoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.embedding = nn.Embedding(1000, 4)
        self.pooler = nn.Linear(4, 4)
    
    def forward(self, input_ids, attention_mask):
        hidden_states = self.embedding(input_ids)
        pooled = hidden_states.mean(dim=1)
        pooler_output = self.pooler(pooled)
        
        class EncoderOutput:
            def __init__(self, pooler_output):
                self.pooler_output = pooler_output
        
        return EncoderOutput(pooler_output)

text_encoder = MockTextEncoder()
tokenizer = MockTokenizer()
prompt = "a photo of a cat"

ARGS = {
    "text_encoder": text_encoder,
    "tokenizer": tokenizer,
    "prompt": prompt
}
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 2, dtype family float, shape (1, 4) — shape (1, 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
get_img_norm_cfg Ran
ran; our contract draft was wrong, not the code
iLearn-Lab/MM26-DGNet/utils.py
code served (permissive licence) · get_code("6fa906eafe8a0dda")
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 dict. 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 tempfile
from pathlib import Path
import numpy as np
from PIL import Image

# Create a temporary directory structure for the dataset
temp_dir = tempfile.mkdtemp()
dataset_dir = Path(temp_dir)

# Create necessary subdirectories
img_idx_dir = dataset_dir / 'img_idx'
img_idx_dir.mkdir(parents=True, exist_ok=True)

images_dir = dataset_dir / 'images'
images_dir.mkdir(parents=True, exist_ok=True)

# Create sample images for a custom dataset
image_ids = ['image_001', 'image_002']

for image_id in image_ids:
    # Create a simple grayscale image (mode 'I' is 32-bit signed integer pixels)
    img_array = np.random.randint(50, 150, size=(64, 64), dtype=np.uint32)
    img = Image.fromarray(img_array, mode='I')
    img.save(images_dir / f'{image_id}.png')

# Create train and test index files
custom_dataset_name = 'CustomTestDataset'
train_index_path = img_idx_dir / f'train_{custom_dataset_name}.txt'
test_index_path = img_idx_dir / f'test_{custom_dataset_name}.txt'

train_index_path.write_text('\n'.join(['image_001']))
test_index_path.write_text('\n'.join(['image_002']))

ARGS = {
    'dataset_name': custom_dataset_name,
    'dataset_dir': str(dataset_dir)
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
get_optimizer Ran
ran; our contract draft was wrong, not the code
iLearn-Lab/MM26-DGNet/utils.py
code served (permissive licence) · get_code("6ced86018b4b4470")
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 torch.nn as nn

torch.manual_seed(0)

# Create a minimal network with parameters
class MinimalNetwork(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

network = MinimalNetwork()

optimizer_name = 'Adam'
scheduler_name = 'MultiStepLR'

optimizer_settings = {
    'lr': 0.001
}

scheduler_settings = {
    'step': [10, 20],
    'gamma': 0.1
}

ARGS = {
    'network': network,
    'optimizer_name': optimizer_name,
    'scheduler_name': scheduler_name,
    'optimizer_settings': optimizer_settings,
    'scheduler_settings': scheduler_settings
}
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 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
maximum_component_retention Ran
ran; our contract draft was wrong, not the code
iLearn-Lab/MM26-DGNet/dataset.py
code served (permissive licence) · get_code("adad3af0273d069f")
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 float, 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 numpy as np

# Create a small target region with some connected components
# Shape: (10, 12) - using distinct dimensions
target_region = np.array([
    [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0],
    [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
], dtype=int)

# Define a crop box as (x_start, y_start, x_end, y_end)
# This crops a region that overlaps with some components
crop_box = (1, 1, 8, 6)

ARGS = {
    "target_region": target_region,
    "crop_box": crop_box,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
evaluate_roc Not yet run
unverified (harvested, no recorded run)
iLearn-Lab/MM26-DGNet/roc.py
code served (permissive licence) · get_code("8576f9714d54d349")
How it ran

no invocation recorded.

inverse_wavelet_transform Not yet run
unverified (harvested, no recorded run)
iLearn-Lab/MM26-DGNet/model/dgnet/wavelet.py
code served (permissive licence) · get_code("218af4467355692b")
How it ran

no invocation recorded.

normalize_image Not yet run
unverified (harvested, no recorded run)
iLearn-Lab/MM26-DGNet/utils.py
code served (permissive licence) · get_code("95b3a763a93f5c20")
How it ran

no invocation recorded.

target_protected_gaussian_blur Not yet run
unverified (harvested, no recorded run)
iLearn-Lab/MM26-DGNet/dataset.py
code served (permissive licence) · get_code("511019bc0e495448")
How it ran

no invocation recorded.

wavelet_transform Not yet run
unverified (harvested, no recorded run)
iLearn-Lab/MM26-DGNet/model/dgnet/wavelet.py
code served (permissive licence) · get_code("4b18272254b9dc36")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 2 the same month, 0 later) and 11 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
batch_pix_accuracy 5 other papers
4 dated earlier, 1 the same month
2106.00487 (2021-06)
Dense Nested Attention Network for Infrared Small Target Detection
2401.15583 (2024-01)
SCTransNet: Spatial-channel Cross Transformer Network for Infrared Small Target Detection
2403.19366 (2024-03)
Infrared Small Target Detection with Scale and Location Sensitivity
and 2 more not named here
batch_intersection_union 3 other papers
2 dated earlier, 1 the same month
2401.15583 (2024-01)
SCTransNet: Spatial-channel Cross Transformer Network for Infrared Small Target Detection
2409.12448 (2024-09)
Infrared Small Target Detection in Satellite Videos: A New Dataset and A Novel Recurrent Feature Refinement Framework
2609.00853 (2026-09)
ADGNet: Asymmetric Dual-text Guided Network for Infrared Small Target Detection

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

InfRared Small Target Detection (IRSTD) is a prominent and challenging task in computer vision. In recent years, text-guided methods have significantly improved detection performance. However, they still suffer from two key limitations. First, a single text description simultaneously modeling both background and target leads to semantic entanglement, which contradicts the objective of background suppression and target enhancement. Second, reliance on image-specific textual prompts (requiring additional external models such as CLIP during inference) results in deployment constraints. To address these issues, we propose a novel Dual-knowledge Guided Network (DGNet) based on multiple generalizable texts. Specifically, we design a Prior-knowledge Wavelet Modulation (PWM) module, which leverages dual textual priors that separately characterize large-scale backgrounds and sparse targets to effectively disentangle and modulate entangled semantics in the frequency domain. Furthermore, we introduce a Consensus-knowledge Directional Alignment (CDA) loss, which models the initial state and the ideal target across samples as `complex background' and `bright target', respectively, thereby constructing a clear and unified directional optimization trajectory for the model. Extensive experiments on three public datasets demonstrate the superior performance of DGNet and the effectiveness of each component. The source code is available at https://github.com/iLearn-Lab/MM26-DGNet.

For agents

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

get_harvested_code_for_paper("2609.00666")
get_code_for_paper("2609.00666")
have("2609.00666")

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

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

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

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

Connect an agent — have() is free.