SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.27655 · ICML · 2026

Temporal-Emerged Prompting for Segment Anything in Multiframe Infrared Small Target Detection

Shizhou Zhang, Yinghui Xing, Di Xu, Donghao Chu

arXiv · PDF · Open in the Atlas

Code that ran

17 of 27 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (6 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 10 have no contract verdict; 6 failures of our instrument; 10 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/2606.27655.json · badge: /api/ran/2606.27655.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
cdh8285/TEP-SAM community
Papers with Code archive
16 ran · 10 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
BBCEWithLogitLoss Ran
ran on a synthesized input
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("6c0f7eb56a3e3a96")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 0, 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

# INIT_ARGS: BBCEWithLogitLoss.__init__ takes no parameters
INIT_ARGS = {}

# ARGS: forward method takes pred and gt
# pred: predictions (logits), shape (batch_size, height, width) or (batch_size, num_elements)
# gt: ground truth binary labels, same shape as pred
batch_size = 2
height = 5
width = 7

pred = torch.randn(batch_size, height, width)
gt = torch.randint(0, 2, (batch_size, height, width)).float()

ARGS = {
    'pred': pred,
    'gt': gt
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Block Ran
ran on a synthesized input
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("6f8342e3a835af78")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, 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
import torch.nn.functional as F
from typing import Any, Optional, Tuple, Type

class Attention(nn.Module):
    def __init__(self, dim: int, num_heads: int=8, qkv_bias: bool=True, use_rel_pos: bool=False, rel_pos_zero_init: bool=True, input_size: Optional[Tuple[int, int]]=None) -> None:
        super().__init__()
        self.num_heads = num_heads
        head_dim = dim // num_heads
        self.scale = head_dim ** (-0.5)
        self.qkv = nn.Linear(dim, dim * 3, bias=qkv_bias)
        self.proj = nn.Linear(dim, dim)
        self.use_rel_pos = use_rel_pos
        if self.use_rel_pos:
            assert input_size is not None
            self.rel_pos_h = nn.Parameter(torch.zeros(2 * input_size[0] - 1, head_dim))
            self.rel_pos_w = nn.Parameter(torch.zeros(2 * input_size[1] - 1, head_dim))

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        B, H, W, _ = x.shape
        qkv = self.qkv(x).reshape(B, H * W, 3, self.num_heads, -1).permute(2, 0, 3, 1, 4)
        q, k, v = qkv.reshape(3, B * self.num_heads, H * W, -1).unbind(0)
        attn = q * self.scale @ k.transpose(-2, -1)
        if self.use_rel_pos:
            attn = add_decomposed_rel_pos(attn, q, self.rel_pos_h, self.rel_pos_w, (H, W), (H, W))
        attn = attn.softmax(dim=-1)
        x = (attn @ v).view(B, self.num_heads, H, W, -1).permute(0, 2, 3, 1, 4).reshape(B, H, W, -1)
        x = self.proj(x)
        return x

class MLPBlock(nn.Module):
    def __init__(self, embedding_dim: int, mlp_dim: int, act: Type[nn.Module]=nn.GELU) -> None:
        super().__init__()
        self.lin1 = nn.Linear(embedding_dim, mlp_dim)
        self.lin2 = nn.Linear(mlp_dim, embedding_dim)
        self.act = act()

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        return self.lin2(self.act(self.lin1(x)))

def add_decomposed_rel_pos(attn: torch.Tensor, q: torch.Tensor, rel_pos_h: torch.Tensor, rel_pos_w: torch.Tensor, q_size: Tuple[int, int], k_size: Tuple[int, int]) -> torch.Tensor:
    q_h, q_w = q_size
    k_h, k_w = k_size
    Rh = get_rel_pos(q_h, k_h, rel_pos_h)
    Rw = get_rel_pos(q_w, k_w, rel_pos_w)
    B, _, dim = q.shape
    r_q = q.reshape(B, q_h, q_w, dim)
    rel_h = torch.einsum('bhwc,hkc->bhwk', r_q, Rh)
    rel_w = torch.einsum('bhwc,wkc->bhwk', r_q, Rw)
    attn = (attn.view(B, q_h, q_w, k_h, k_w) + rel_h[:, :, :, :, None] + rel_w[:, :, :, None, :]).view(B, q_h * q_w, k_h * k_w)
    return attn

def get_rel_pos(q_size: int, k_size: int, rel_pos: torch.Tensor) -> torch.Tensor:
    max_rel_dist = int(2 * max(q_size, k_size) - 1)
    if rel_pos.shape[0] != max_rel_dist:
        rel_pos_resized = F.interpolate(rel_pos.reshape(1, rel_pos.shape[0], -1).permute(0, 2, 1), size=max_rel_dist, mode='linear')
        rel_pos_resized = rel_pos_resized.reshape(-1, max_rel_dist).permute(1, 0)
    else:
        rel_pos_resized = rel_pos
    q_coords = torch.arange(q_size)[:, None] * max(k_size / q_size, 1.0)
    k_coords = torch.arange(k_size)[None, :] * max(q_size / k_size, 1.0)
    relative_coords = (q_coords - k_coords) + (k_size - 1) * max(q_size / k_size, 1.0)
    return rel_pos_resized[relative_coords.long()]

INIT_ARGS = {
    'dim': 4,
    'num_heads': 2,
    'qkv_bias': True,
    'use_rel_pos': True,
    'rel_pos_zero_init': True,
    'input_size': (3, 4)
}

ARGS = {
    'x': torch.randn(2, 3, 4, 4)
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
ConvGRUCell Ran
ran on a synthesized input
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("0452265283a4d375")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, 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

INIT_ARGS = {
    "input_dim": 4,
    "hidden_dim": 3,
    "kernel_size": 3,
}

# Construct input tensor: batch=2, channels=4, height=6, width=6
x = torch.randn(2, 4, 6, 6)
# Construct hidden state tensor: batch=2, channels=3, height=6, width=6
h = torch.randn(2, 3, 6, 6)

ARGS = {
    "x": x,
    "h": h,
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
IOU Ran
ran on a synthesized input
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("217e7a2eabf3b4df")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 0, 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

INIT_ARGS = {}

ARGS = {
    "pred": torch.randn(2, 1, 4, 3),
    "target": torch.randint(0, 2, (2, 1, 4, 3)).float()
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 0, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
LayerNorm2d Ran
ran on a synthesized input · constructed an object; no result was computed
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("4308835d994760d5")
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 an instance of its own class, LayerNorm2d: the run constructed the object and did not call it, so no result was computed. 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)

# LayerNorm2d expects:
# - num_channels: int (number of channels in the input)
# - eps: float (small value for numerical stability, has default)
# - forward expects x: torch.Tensor of shape (batch, channels, height, width)

# Create a small input tensor to understand the expected shape
# The forward method uses x.mean(1, keepdim=True), which means it normalizes over dimension 1 (channels)
# and keeps the batch, height, width dimensions
batch_size = 2
num_channels = 4
height = 3
width = 3

# Create input tensor
x = torch.randn(batch_size, num_channels, height, width)

ARGS = {
    "num_channels": num_channels,
    "eps": 1e-06
}
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 LayerNorm2d — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LayerNorm2d 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
MLP Ran
ran on a synthesized input · constructed an object; no result was computed
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("aa4c2f980d8d830d")
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 an instance of its own class, MLP: the run constructed the object and did not call it, so no result was computed. 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 = {
    "input_dim": 4,
    "hidden_dim": 8,
    "output_dim": 3,
    "num_layers": 3,
    "sigmoid_output": 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 MLP — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MLP 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
MLPBlock Ran
ran on a synthesized input · constructed an object; no result was computed
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("0ce1ec8f6e7b8a36")
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 an instance of its own class, MLPBlock: the run constructed the object and did not call it, so no result was computed. 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 = {
    "embedding_dim": 4,
    "mlp_dim": 8,
    "act": nn.GELU
}
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 MLPBlock — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MLPBlock 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
MaskDecoder Ran
ran on a synthesized input · constructed an object; no result was computed
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("d0e105681f93d4c3")
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 an instance of its own class, MaskDecoder: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn.functional as F
from typing import Type

torch.manual_seed(0)

class LayerNorm2d(nn.Module):
    def __init__(self, num_channels: int, eps: float=1e-06) -> None:
        super().__init__()
        self.weight = nn.Parameter(torch.ones(num_channels))
        self.bias = nn.Parameter(torch.zeros(num_channels))
        self.eps = eps

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        u = x.mean(1, keepdim=True)
        s = (x - u).pow(2).mean(1, keepdim=True)
        x = (x - u) / torch.sqrt(s + self.eps)
        x = self.weight[:, None, None] * x + self.bias[:, None, None]
        return x

class MLP(nn.Module):
    def __init__(self, input_dim: int, hidden_dim: int, output_dim: int, num_layers: int, sigmoid_output: bool=False) -> None:
        super().__init__()
        self.num_layers = num_layers
        h = [hidden_dim] * (num_layers - 1)
        self.layers = nn.ModuleList((nn.Linear(n, k) for n, k in zip([input_dim] + h, h + [output_dim])))
        self.sigmoid_output = sigmoid_output

    def forward(self, x):
        for i, layer in enumerate(self.layers):
            x = F.relu(layer(x)) if i < self.num_layers - 1 else layer(x)
        if self.sigmoid_output:
            x = F.sigmoid(x)
        return x

class SimpleTransformer(nn.Module):
    def __init__(self, dim: int):
        super().__init__()
        self.dim = dim
        self.linear = nn.Linear(dim, dim)
    
    def forward(self, src: torch.Tensor, dst: torch.Tensor, memory: torch.Tensor) -> torch.Tensor:
        return self.linear(src + dst + memory)

transformer_dim = 64
transformer = SimpleTransformer(dim=transformer_dim)
num_multimask_outputs = 3
activation = nn.GELU
iou_head_depth = 3
iou_head_hidden_dim = 128

ARGS = {
    'transformer_dim': transformer_dim,
    'transformer': transformer,
    'num_multimask_outputs': num_multimask_outputs,
    'activation': activation,
    'iou_head_depth': iou_head_depth,
    'iou_head_hidden_dim': iou_head_hidden_dim,
}
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 MaskDecoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MaskDecoder 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
PatchEmbed Ran
ran on a synthesized input · constructed an object; no result was computed
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("5bf3f92ed0e5b62f")
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 an instance of its own class, PatchEmbed: the run constructed the object and did not call it, so no result was computed. 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
from typing import Tuple

torch.manual_seed(0)

ARGS = {
    "kernel_size": (16, 16),
    "stride": (16, 16),
    "padding": (0, 0),
    "in_chans": 3,
    "embed_dim": 768,
}
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 PatchEmbed — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PatchEmbed 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
PositionEmbeddingRandom Ran
ran on a synthesized input · constructed an object; no result was computed
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("b803d3f76a89782e")
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 an instance of its own class, PositionEmbeddingRandom: the run constructed the object and did not call it, so no result was computed. 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
import numpy as np

torch.manual_seed(0)

ARGS = {
    'num_pos_feats': 64,
    'scale': 1.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 PositionEmbeddingRandom — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PositionEmbeddingRandom 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
_compute_iou_batch Ran
ran, violated the contract we drafted
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("0d3ecd6331bd36b5")
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 1, dtype family float, shape (2,) 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 small test tensors
# pred: batch_size=2, spatial dims arbitrary, can be 3D or 4D
# If 4D: (batch, channels, height, width) = (2, 1, 4, 3)
# If 3D: (batch, height, width) = (2, 4, 3)
pred = torch.randn(2, 1, 4, 3)

# gt: same spatial shape as pred, values should be in [0, 1] for IoU
# Using 4D format to match pred
gt = torch.randint(0, 2, (2, 1, 4, 3)).float()

# eps: small epsilon value for numerical stability
eps = 1e-06

ARGS = {
    "pred": pred,
    "gt": gt,
    "eps": eps,
}
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 1, dtype family float, shape (2,) — shape (2,) 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
_dice_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("2034710d3314b38b")
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

torch.manual_seed(0)

# pred: logits tensor, shape (batch, channels, height, width)
# The function applies sigmoid, then computes dice loss
# Needs dims (2, 3) to exist for sum operations
pred = torch.randn(2, 4, 3, 5)

# target: binary target tensor, same shape as pred
target = torch.randint(0, 2, (2, 4, 3, 5)).float()

ARGS = {
    "pred": pred,
    "target": target,
}
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
add_decomposed_rel_pos Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("4f2e6648b2db3086")
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 3, dtype family float, shape (2, 12, 30) 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)

# Define small tensor dimensions
B = 2  # batch size
q_h, q_w = 4, 3  # query spatial dimensions
k_h, k_w = 5, 6  # key spatial dimensions
dim = 4  # channel dimension

# Create attention map: (B, q_h * q_w, k_h * k_w)
attn = torch.randn(B, q_h * q_w, k_h * k_w)

# Create query tensor: (B, q_h * q_w, dim)
q = torch.randn(B, q_h * q_w, dim)

# Create relative position embeddings for height
# Initial size should be reasonable; get_rel_pos will handle resizing
rel_pos_h = torch.randn(2 * max(q_h, k_h) - 1, dim)

# Create relative position embeddings for width
rel_pos_w = torch.randn(2 * max(q_w, k_w) - 1, dim)

# Define spatial sizes
q_size = (q_h, q_w)
k_size = (k_h, k_w)

ARGS = {
    "attn": attn,
    "q": q,
    "rel_pos_h": rel_pos_h,
    "rel_pos_w": rel_pos_w,
    "q_size": q_size,
    "k_size": k_size,
}
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 3, dtype family float, shape (2, 12, 30) — shape (2, 12, 30) 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_rel_pos Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
this paper's copy was not recorded; identical code first harvested from cambrian-mllm/cambrian
pointer only · get_code("733d7f0bedcb74c2")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

trunc_normal_ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("b425e24882305880")
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 math

torch.manual_seed(0)

# Create a small tensor to be filled with truncated normal values
tensor = torch.empty(2, 4)

# Define arguments for trunc_normal_
ARGS = {
    'tensor': tensor,
    'mean': 0.0,
    'std': 1.0,
    'a': -2.0,
    'b': 2.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 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
window_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("c198e7a794dcd181")
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 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 torch.nn.functional as F

torch.manual_seed(0)

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

# Window size parameter
window_size = 3

ARGS = {
    "x": x,
    "window_size": window_size,
}
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 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
window_unpartition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("4b5b594905f49c0e")
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, 7, 6, 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

torch.manual_seed(0)

# Construct valid arguments for window_unpartition
# The function expects:
# - windows: tensor of shape [B * num_windows, window_size, window_size, C]
# - window_size: int
# - pad_hw: tuple of (Hp, Wp) - padded height and width
# - hw: tuple of (H, W) - original height and width

window_size = 4
Hp, Wp = 8, 8  # padded height and width
H, W = 7, 6    # original height and width (smaller due to padding)
C = 3           # channels
B = 2           # batch size

# Calculate number of windows: (Hp // window_size) * (Wp // window_size)
num_windows = (Hp // window_size) * (Wp // window_size)  # (8//4) * (8//4) = 2 * 2 = 4

# windows shape should be [B * num_windows, window_size, window_size, C]
windows = torch.randn(B * num_windows, window_size, window_size, C)

ARGS = {
    "windows": windows,
    "window_size": window_size,
    "pad_hw": (Hp, Wp),
    "hw": (H, W),
}
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, 7, 6, 3) — shape (2, 7, 6, 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
Attention Not yet run
unverified (harvested, no recorded run)
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("d319af1582e25b7c")
How it ran

no invocation recorded.

HybridTemporalExtractor Not yet run
unverified (harvested, no recorded run)
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("7b009b0f6932c436")
How it ran

no invocation recorded.

ImageEncoderViT Not yet run
unverified (harvested, no recorded run)
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("6ebaaf22245e4f24")
How it ran

no invocation recorded.

LightWeightNormalAttentionBlock Not yet run
unverified (harvested, no recorded run)
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("526f1fa309455e92")
How it ran

no invocation recorded.

PatchEmbed2 Not yet run
unverified (harvested, no recorded run)
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("db670186f49f6a46")
How it ran

no invocation recorded.

PromptGenerator Not yet run
unverified (harvested, no recorded run)
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("c6dd8fd76ae71133")
How it ran

no invocation recorded.

SAM Not yet run
unverified (harvested, no recorded run)
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("850f7b3f4cdbb1de")
How it ran

no invocation recorded.

TwoWayAttentionBlock Not yet run
unverified (harvested, no recorded run)
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("a33a67f9a52ab9b0")
How it ran

no invocation recorded.

TwoWayTransformer Not yet run
unverified (harvested, no recorded run)
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("77e931a97a4cda55")
How it ran

no invocation recorded.

to_2tuple Not yet run
unverified (harvested, no recorded run)
cdh8285/TEP-SAM/models/sam_withToken.py
code served (permissive licence) · get_code("87f16a36e0c0923b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 27 samples lifted from this paper's linked repositories, 27 carry a function identity and 0 do not. Of the 27 distinct functions with an identity, 12 are also present in other papers whose code we hold (12 with at least one paper dated earlier, 0 the same month, 0 later) and 15 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_rel_pos
brick of this paper's assembly: helper
47 other papers
47 dated earlier · 5 only as an assembly brick
2304.02643 (2023-04)
Segment Anything
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
and 44 more not named here
window_partition
brick of this paper's assembly: helper
47 other papers
47 dated earlier · 1 only as an assembly brick
2304.02643 (2023-04)
Segment Anything
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
and 44 more not named here
window_unpartition
brick of this paper's assembly: helper
46 other papers
46 dated earlier · 1 only as an assembly brick
2304.02643 (2023-04)
Segment Anything
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
and 43 more not named here
LayerNorm2d
brick of this paper's assembly: helper
12 other papers
12 dated earlier · 10 only as an assembly brick
2306.01567 (2023-06)
Segment Anything in High Quality
2312.05284 (2023-12)
SlimSAM: 0.1% Data Makes Segment Anything Slim
2401.08083 (2024-01)
UV-SAM: Adapting Segment Anything Model for Urban Village Identification
and 9 more not named here
MLPBlock
brick of this paper's assembly: helper
8 other papers
8 dated earlier · 3 only as an assembly brick
2207.05042 (2022-07)
Audio-Visual Segmentation
2306.01567 (2023-06)
Segment Anything in High Quality
2401.08083 (2024-01)
UV-SAM: Adapting Segment Anything Model for Urban Village Identification
and 5 more not named here
MLP
brick of this paper's assembly: helper
7 other papers
7 dated earlier · 4 only as an assembly brick
2306.01567 (2023-06)
Segment Anything in High Quality
2401.08083 (2024-01)
UV-SAM: Adapting Segment Anything Model for Urban Village Identification
2403.18271 (2024-03)
Unleashing the Potential of SAM for Medical Adaptation via Hierarchical Decoding
and 4 more not named here
add_decomposed_rel_pos
brick of this paper's assembly: helper
7 other papers
7 dated earlier · 1 only as an assembly brick
2306.01567 (2023-06)
Segment Anything in High Quality
2312.05284 (2023-12)
SlimSAM: 0.1% Data Makes Segment Anything Slim
2401.08083 (2024-01)
UV-SAM: Adapting Segment Anything Model for Urban Village Identification
and 4 more not named here
Attention
brick of this paper's assembly: helper
6 other papers
6 dated earlier · 1 only as an assembly brick
2306.01567 (2023-06)
Segment Anything in High Quality
2401.08083 (2024-01)
UV-SAM: Adapting Segment Anything Model for Urban Village Identification
2404.15700 (2024-04)
MAS-SAM: Segment Any Marine Animal with Aggregated Features
and 3 more not named here
PatchEmbed
brick of this paper's assembly: helper
6 other papers
6 dated earlier · 1 only as an assembly brick
2306.01567 (2023-06)
Segment Anything in High Quality
2401.08083 (2024-01)
UV-SAM: Adapting Segment Anything Model for Urban Village Identification
2404.15700 (2024-04)
MAS-SAM: Segment Any Marine Animal with Aggregated Features
and 3 more not named here
Block
brick of this paper's assembly: helper
5 other papers
5 dated earlier · 1 only as an assembly brick
2306.01567 (2023-06)
Segment Anything in High Quality
2401.08083 (2024-01)
UV-SAM: Adapting Segment Anything Model for Urban Village Identification
2405.19783 (2024-05)
Instruction-Guided Visual Masking
and 2 more not named here
to_2tuple
brick of this paper's assembly: helper
2 other papers
2 dated earlier
2402.03631 (2024-02)
CAT-SAM: Conditional Tuning for Few-Shot Adaptation of Segment Anything Model
2408.04579 (2024-08)
SAM2-Adapter: Evaluating &amp; Adapting Segment Anything 2 in Downstream Tasks: Camouflage, Shadow, Medical Image Segmentation, and More
TwoWayAttentionBlock
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2405.19783 (2024-05)
Instruction-Guided Visual Masking

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

Accurately localizing and segmenting small targets in low signal-to-noise ratio (SNR) infrared sequences remains a challenging task. Since targets are often indistinguishable from the background in individual frames, existing methods, even when equipped with advanced foundation model and powerful inter-frame association mechanisms, still fail to detect them. Motivated by the observation that targets tend to emerge gradually from the background over time and become distinguishable, we propose Temporal-Emerged Prompting for Segment Anything Model (TEP-SAM), a principled framework designed to explicitly exploit such temporal-emerged cues to modulate and prompt SAM. TEP-SAM operates by jointly modeling global motion patterns and local motion deviations to locate potential targets. It further enhances target region features by leveraging motion discrepancy, thereby generating temporal-emerged cues for SAM and enabling non-interactive segmentation. By bridging large-scale semantic pretraining with task-specific temporal modeling, TEP-SAM effectively adapts SAM to the challenging multiframe infrared small target detection task. Extensive experiments demonstrate the effectiveness of our approach, particularly under severely low-SNR conditions and in complex dynamic background. Code is available at https://github.com/cdh8285/TEP-SAM .

For agents

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

get_harvested_code_for_paper("2606.27655")
get_code_for_paper("2606.27655")
have("2606.27655")

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

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

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

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

Connect an agent — have() is free.