SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2601.22537 · 2026

EndoCaver: Handling Fog, Blur and Glare in Endoscopic Images via Joint Deblurring-Segmentation

Zheng Wang, C.-W Phan, Wenqi Fang, Jiayan Yang, Zhuoyu Wu, Wenhui Ou, Pei-Sze Tan

arXiv · PDF · Open in the Atlas

Code that ran

10 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (8 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 8 have no contract verdict; 2 failures of our instrument; 2 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/2601.22537.json · badge: /api/ran/2601.22537.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
ReaganWu/EndoCaver community
Papers with Code archive
10 ran · 2 no recorded run
FunctionStatusWhere it lives
Attention Ran
ran on a synthesized input · constructed an object; no result was computed
ReaganWu/EndoCaver/endocaver/model.py
code served (permissive licence) · get_code("bc0ece5f4524bef3")
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, Attention: 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 einops import rearrange

torch.manual_seed(0)

class Attention(nn.Module):

    def __init__(self, dim: int, heads: int=8, dim_head: int=64, dropout: float=0.0):
        super().__init__()
        inner_dim = dim_head * heads
        self.heads = heads
        self.scale = dim_head ** (-0.5)
        self.norm = nn.LayerNorm(dim)
        self.attend = nn.Softmax(dim=-1)
        self.dropout = nn.Dropout(dropout)
        self.to_qkv = nn.Linear(dim, inner_dim * 3, bias=False)
        self.to_out = nn.Sequential(nn.Linear(inner_dim, dim), nn.Dropout(dropout))

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        x = self.norm(x)
        qkv = self.to_qkv(x).chunk(3, dim=-1)
        q, k, v = map(lambda t: rearrange(t, 'b p n (h d) -> b p h n d', h=self.heads), qkv)
        dots = torch.matmul(q, k.transpose(-1, -2)) * self.scale
        attn = self.dropout(self.attend(dots))
        out = torch.matmul(attn, v)
        out = rearrange(out, 'b p h n d -> b p n (h d)')
        return self.to_out(out)

# Create input tensor
# Shape: (batch=2, patches=3, sequence=5, dim=4)
x = torch.randn(2, 3, 5, 4)

ARGS = {
    "dim": 4,
    "heads": 2,
    "dim_head": 8,
    "dropout": 0.1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Attention — 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 Attention 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
CrossAttentionBlock Ran
ran on a synthesized input · constructed an object; no result was computed
ReaganWu/EndoCaver/endocaver/model.py
code served (permissive licence) · get_code("9c6514da9d87604d")
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, CrossAttentionBlock: 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)

# Define the CrossAttentionBlock class (provided)
class CrossAttentionBlock(nn.Module):
    """Deblurring-Segmentation Aligner (DSA)."""

    def __init__(self, dim: int, num_heads: int=4):
        super().__init__()
        self.attn = nn.MultiheadAttention(embed_dim=dim, num_heads=num_heads, batch_first=True)
        self.proj = nn.Linear(dim, dim)

    def forward(self, seg_feat: torch.Tensor, deblur_feat: torch.Tensor) -> torch.Tensor:
        b, c, h, w = seg_feat.shape
        q = seg_feat.flatten(2).transpose(1, 2)
        kv = deblur_feat.flatten(2).transpose(1, 2)
        out, _ = self.attn(q, kv, kv)
        out = self.proj(out).transpose(1, 2).reshape(b, c, h, w)
        return seg_feat + out

# Create test inputs
# seg_feat and deblur_feat should have shape (batch, channels, height, width)
# Using batch=2, channels=4, height=3, width=5 for distinct dimensions
batch_size = 2
dim = 4
height = 3
width = 5
num_heads = 4

seg_feat = torch.randn(batch_size, dim, height, width)
deblur_feat = torch.randn(batch_size, dim, height, width)

ARGS = {
    "dim": dim,
    "num_heads": num_heads,
}
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 CrossAttentionBlock — 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 CrossAttentionBlock 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
DeblurDecoder Ran
ran on a synthesized input · constructed an object; no result was computed
ReaganWu/EndoCaver/endocaver/model.py
code served (permissive licence) · get_code("19525739e8a3b988")
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, DeblurDecoder: 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 = {
    'image_size': (224, 224),
    'dims': (64, 80, 96),
    'channels': (32, 64, 160, 256),
    'activation': 'sigmoid'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DeblurDecoder — 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 DeblurDecoder 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
FeedForward Ran
ran on a synthesized input · constructed an object; no result was computed
ReaganWu/EndoCaver/endocaver/model.py
code served (permissive licence) · get_code("04cc39ea10efa29a")
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, FeedForward: 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)

# FeedForward takes three parameters: dim, hidden_dim, and dropout
# - dim: the input/output feature dimension
# - hidden_dim: the hidden layer dimension
# - dropout: dropout probability (optional, default 0.0)

ARGS = {
    "dim": 4,
    "hidden_dim": 8,
    "dropout": 0.1,
}
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 FeedForward — 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 FeedForward 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
GlobalAttentionModule Ran
ran on a synthesized input · constructed an object; no result was computed
ReaganWu/EndoCaver/endocaver/model.py
code served (permissive licence) · get_code("0549718265a463ad")
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, GlobalAttentionModule: 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)

# Define the GlobalAttentionModule
class GlobalAttentionModule(nn.Module):
    """Global Attention Module (GAM) for cross-scale aggregation."""

    def __init__(self, in_channels_list, embed_dim=128, num_heads=4):
        super().__init__()
        self.proj_layers = nn.ModuleList([nn.Conv2d(c, embed_dim, kernel_size=1) for c in in_channels_list])
        self.attn = nn.MultiheadAttention(embed_dim, num_heads=num_heads, batch_first=True)
        self.norm = nn.LayerNorm(embed_dim)
        self.unified_layers = nn.ModuleList([nn.Conv2d(embed_dim, c, kernel_size=1) for c in in_channels_list])

    def forward(self, feats):
        import torch.nn.functional as F
        target_size = feats[0].shape[2:]
        proj_feats = [proj(F.interpolate(f, size=target_size, mode='bilinear', align_corners=False)) for f, proj in zip(feats, self.proj_layers)]
        x = torch.stack(proj_feats, dim=1).mean(1)
        b, c, h, w = x.shape
        tokens = x.flatten(2).transpose(1, 2)
        attn_out, attn_weights = self.attn(tokens, tokens, tokens)
        attn_out = self.norm(attn_out + tokens)
        attn_feat = attn_out.transpose(1, 2).reshape(b, c, h, w)
        modulated = []
        for f, unify in zip(feats, self.unified_layers):
            f_up = F.interpolate(attn_feat, size=f.shape[2:], mode='bilinear', align_corners=False)
            modulated.append(f * unify(f_up))
        return (attn_feat, modulated, attn_weights)

ARGS = {
    'in_channels_list': [4, 8, 16],
    'embed_dim': 32,
    'num_heads': 4
}
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 GlobalAttentionModule — 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 GlobalAttentionModule 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
MobileViTBlock Ran
ran on a synthesized input · constructed an object; no result was computed
ReaganWu/EndoCaver/endocaver/model.py
code served (permissive licence) · get_code("c10b2afee771800b")
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, MobileViTBlock: 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 einops import rearrange

torch.manual_seed(0)

ARGS = {
    "dim": 32,
    "depth": 2,
    "channel": 16,
    "kernel_size": 3,
    "patch_size": (2, 2),
    "mlp_dim": 64,
    "dropout": 0.1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MobileViTBlock — 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 MobileViTBlock 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
Transformer Ran
ran on a synthesized input · constructed an object; no result was computed
ReaganWu/EndoCaver/endocaver/model.py
code served (permissive licence) · get_code("bb1edb1aa7f9ecfb")
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, Transformer: 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 = {
    "dim": 4,
    "depth": 2,
    "heads": 2,
    "dim_head": 2,
    "mlp_dim": 8,
    "dropout": 0.1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Transformer — 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 Transformer 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
UpMV2Block Ran
ran on a synthesized input · constructed an object; no result was computed
ReaganWu/EndoCaver/endocaver/model.py
code served (permissive licence) · get_code("f3b5c4d757a89328")
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, UpMV2Block: 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 timm.layers import DropPath

torch.manual_seed(0)

# Test case 1: in_chans == out_chans (uses residual connection)
ARGS = {
    'in_chans': 4,
    'out_chans': 4,
    'stride': 1,
    'expansion': 4,
    'drop': 0.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type UpMV2Block — 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 UpMV2Block 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
conv_1x1_bn Ran
ran; our contract draft was wrong, not the code
ReaganWu/EndoCaver/endocaver/model.py
code served (permissive licence) · get_code("905aac0dbd683010")
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 Sequential. 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 = {
    "inp": 3,
    "oup": 16,
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
conv_nxn_bn Ran
ran; our contract draft was wrong, not the code
ReaganWu/EndoCaver/endocaver/model.py
code served (permissive licence) · get_code("6ff010119883c699")
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 Sequential. 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 = {
    "inp": 3,
    "oup": 64,
    "kernel_size": 3,
    "stride": 1
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
EndoCaver Not yet run
unverified (harvested, no recorded run)
ReaganWu/EndoCaver/endocaver/model.py
code served (permissive licence) · get_code("e3e5372cd4f272e2")
How it ran

no invocation recorded.

SegmentationDecoder Not yet run
unverified (harvested, no recorded run)
ReaganWu/EndoCaver/endocaver/model.py
code served (permissive licence) · get_code("ffb7d0cf92fe55a6")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 12 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.

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

Endoscopic image analysis is vital for colorectal cancer screening, yet real-world conditions often suffer from lens fogging, motion blur, and specular highlights, which severely compromise automated polyp detection. We propose En-doCaver, a lightweight transformer with a unidirectionalguided dual-decoder architecture, enabling joint multi-task capability for image deblurring and segmentation while significantly reducing computational complexity and model parameters. Specifically, it integrates a Global Attention Module (GAM) for cross-scale aggr egation, a Deblurring-Segmentation Aligner (DSA) to transfer restoration cues, and a cosine-based scheduler (LoCoS) for stable multi-task optimisation. Experiments on the Kvasir-SEG dataset show that EndoCaver achieves 0.922 Dice on clean data and 0.889 under severe image degradation, surpassing state-of-the-art methods while reducing model parameters by 90%. These results demonstrate its efficiency and robustness, making it wellsuited for on-device clinical deployment. Code is available at https://github.com/ReaganWu/EndoCaver.

For agents

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

get_harvested_code_for_paper("2601.22537")
get_code_for_paper("2601.22537")
have("2601.22537")

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

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

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

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

Connect an agent — have() is free.