SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1804.03999 · 2018

Attention U-Net: Learning Where to Look for the Pancreas

arXiv · PDF · Open in the Atlas

Code that ran

23 of 28 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 12 have no contract verdict; 11 failures of our instrument; 5 no recorded run), measured 2026-11-24; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/1804.03999.json · badge: /api/ran/1804.03999.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
ozan-oktay/Attention-Gated-Networks canonical (classifier label)
classifier basis: census
2 ran · 1 no recorded run
Spider-scnu/Instance-Segmentation-For-Cancer community (classifier label)
classifier basis not recorded on the link
8 ran · 0 no recorded run
SINGROUP/ED-AFM community (classifier label)
classifier basis not recorded on the link
5 ran · 3 no recorded run
wjcheon/MedicalImageSegmentation_Pytorch reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
lbareiro/Image_Segmentation-master reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
LeeJunHyun/Image_Segmentation reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
trichtu/Recurrent_Attention_U_net extension (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
yingkaisha/keras-unet-collection reimplementation (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
FunctionStatusWhere it lives
add_rotation_reflection Ran
ran on a synthesized input
SINGROUP/ED-AFM/edafm/preprocessing.py
code served (permissive licence) · get_code("a1886cb2c29edacb")
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 numpy as np

# Create small AFM images (batch_size=2, height=8, width=8, channels=3)
# and reference descriptors (batch_size=2, height=8, width=8)
X = [
    np.random.randint(0, 256, (2, 8, 8, 3), dtype=np.uint8),
    np.random.randint(0, 256, (2, 8, 8, 3), dtype=np.uint8)
]

Y = [
    np.random.randint(0, 256, (2, 8, 8), dtype=np.uint8),
    np.random.randint(0, 256, (2, 8, 8), dtype=np.uint8)
]

ARGS = {
    "X": X,
    "Y": Y,
    "reflections": True,
    "multiple": 2,
    "crop": None,
    "per_batch_item": False
}
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 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
count_parameters Ran
ran on a synthesized input
SINGROUP/ED-AFM/edafm/utils.py
code served (permissive licence) · get_code("2767626321778efb")
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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a simple neural network module for testing
class SimpleModel(nn.Module):
    def __init__(self):
        super(SimpleModel, self).__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

# Instantiate the module
module = SimpleModel()

# Define ARGS dictionary with the module parameter
ARGS = {
    "module": module
}
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 int, ndim 0, dtype family int, 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
get_accuracy Ran
ran; our contract draft was wrong, not the code
wjcheon/MedicalImageSegmentation_Pytorch/evaluation.py
pointer only (licence: NONE) · get_code("95bb69a36b70e931")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wjcheon/MedicalImageSegmentation_Pytorch when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_accuracy Ran
ran on a synthesized input
Spider-scnu/Instance-Segmentation-For-Cancer/code/evaluation.py
code served (permissive licence) · get_code("1eceaf04d569126f")
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 torch

torch.manual_seed(0)

# SR and GT are 4D tensors (batch, channel, height, width)
# The function uses .size(0), .size(1), .size(2), .size(3) to get dimensions
# and performs > comparison and == comparison on them

SR = torch.rand(2, 3, 4, 5)  # Random predictions between 0 and 1
GT = torch.randint(0, 2, (2, 3, 4, 5)).float()  # Ground truth with 0s and 1s

ARGS = {
    "SR": SR,
    "GT": GT,
    "threshold": 0.5
}
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 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
get_loader Ran
ran; our contract draft was wrong, not the code
Spider-scnu/Instance-Segmentation-For-Cancer/code/data_loader_cancer.py
code served (permissive licence) · get_code("31ef84f2073efaea")
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 DataLoader. 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 os
import tempfile
import torch
import numpy as np
from PIL import Image

# Create temporary directories with test images
temp_dir = tempfile.mkdtemp()
root_dir = os.path.join(temp_dir, 'images/')
gt_dir = os.path.join(temp_dir, 'images_GT/')
os.makedirs(root_dir, exist_ok=True)
os.makedirs(gt_dir, exist_ok=True)

# Create 2 small test images and their ground truth masks
for i in range(2):
    # Create small RGB image (32x32)
    img_array = np.random.randint(0, 256, (32, 32, 3), dtype=np.uint8)
    img = Image.fromarray(img_array, mode='RGB')
    img_path = os.path.join(root_dir, f'image_{i}.png')
    img.save(img_path)
    
    # Create corresponding grayscale mask
    mask_array = np.random.randint(0, 256, (32, 32), dtype=np.uint8)
    mask = Image.fromarray(mask_array, mode='L')
    mask_path = os.path.join(gt_dir, f'image_{i}_mask.png')
    mask.save(mask_path)

ARGS = {
    'image_path': root_dir,
    'image_size': 224,
    'batch_size': 2,
    'num_workers': 0,
    'mode': 'train',
    'augmentation_prob': 0.4
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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_loader Ran
ran; our contract draft was wrong, not the code
Spider-scnu/Instance-Segmentation-For-Cancer/code/data_loader.py
code served (permissive licence) · get_code("5704356446f05667")
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 DataLoader. 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 os
import random
import tempfile
import torch
import numpy as np
from PIL import Image
from torch.utils import data
from torchvision import transforms as T

torch.manual_seed(0)
random.seed(0)
np.random.seed(0)

# Create a temporary directory structure with dummy image files
temp_dir = tempfile.mkdtemp()
image_dir = os.path.join(temp_dir, 'images')
gt_dir = os.path.join(temp_dir, 'images_GT')
os.makedirs(image_dir, exist_ok=True)
os.makedirs(gt_dir, exist_ok=True)

# Create dummy image files
for i in range(2):
    # Create a simple RGB image
    img = Image.new('RGB', (224, 224), color=(73, 109, 137))
    img_path = os.path.join(image_dir, f'ISIC_{i}.jpg')
    img.save(img_path)
    
    # Create corresponding ground truth segmentation image
    gt = Image.new('L', (224, 224), color=128)
    gt_path = os.path.join(gt_dir, f'ISIC_{i}_segmentation.png')
    gt.save(gt_path)

ARGS = {
    'image_path': image_dir + '/',
    'image_size': 224,
    'batch_size': 2,
    'num_workers': 0,
    'mode': 'train',
    'augmentation_prob': 0.4
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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_norm_layer Ran
ran; our contract draft was wrong, not the code
ozan-oktay/Attention-Gated-Networks/models/networks_other.py
code served (permissive licence) · get_code("7702313c16b1182f")
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 partial. 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 functools

torch.manual_seed(0)

# The function get_norm_layer takes one parameter: norm_type
# It returns a partial function or None based on the norm_type string
# We need to test it with valid norm_type values

ARGS = {
    'norm_type': 'instance'
}
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 partial — a partial output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a partial 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_scheduler Ran
ran on a synthesized input
ozan-oktay/Attention-Gated-Networks/models/networks_other.py
code served (permissive licence) · get_code("34b895333f8a6d64")
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 LambdaLR. 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 torch.optim import Adam

torch.manual_seed(0)

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

model = TinyModel()

# Create an optimizer
optimizer = Adam(model.parameters(), lr=0.001)

# Create a minimal options object with all required attributes
class Options:
    def __init__(self):
        self.lr_policy = 'lambda'
        self.epoch_count = 0
        self.niter = 100
        self.niter_decay = 50
        self.lr_decay_iters = 10

opt = Options()

ARGS = {
    'optimizer': optimizer,
    'opt': opt
}
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 LambdaLR — a LambdaLR output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LambdaLR 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_sensitivity Ran
ran; our contract draft was wrong, not the code
wjcheon/MedicalImageSegmentation_Pytorch/evaluation.py
pointer only (licence: NONE) · get_code("dd0ff9a848c9079a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wjcheon/MedicalImageSegmentation_Pytorch when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_sensitivity Ran
ran; our contract draft was wrong, not the code
lbareiro/Image_Segmentation-master/evaluation.py
pointer only (licence: NONE) · get_code("6a33f9a26b1965ca")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lbareiro/Image_Segmentation-master when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_sensitivity Ran
ran; our contract draft was wrong, not the code
LeeJunHyun/Image_Segmentation/evaluation.py
pointer only (licence: NONE) · get_code("3fdc610e589e29bd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LeeJunHyun/Image_Segmentation when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_sensitivity Ran
ran on a synthesized input
Spider-scnu/Instance-Segmentation-For-Cancer/code/evaluation.py
code served (permissive licence) · get_code("3162b492d7ffa807")
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 torch

torch.manual_seed(0)

# SR is a tensor that will be thresholded and compared
# GT is a ground truth tensor that will be compared
# threshold is a float for comparison

SR = torch.rand(2, 4)
GT = torch.rand(2, 4)

ARGS = {
    "SR": SR,
    "GT": GT,
    "threshold": 0.5
}
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 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
get_specificity Ran
ran; our contract draft was wrong, not the code
wjcheon/MedicalImageSegmentation_Pytorch/evaluation.py
pointer only (licence: NONE) · get_code("9be16de3a586e7cd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wjcheon/MedicalImageSegmentation_Pytorch when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_specificity Ran
ran; our contract draft was wrong, not the code
lbareiro/Image_Segmentation-master/evaluation.py
pointer only (licence: NONE) · get_code("691eb793841aa642")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lbareiro/Image_Segmentation-master when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_specificity Ran
ran; our contract draft was wrong, not the code
LeeJunHyun/Image_Segmentation/evaluation.py
pointer only (licence: NONE) · get_code("817590dcf9d15f85")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LeeJunHyun/Image_Segmentation when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_specificity Ran
ran on a synthesized input
Spider-scnu/Instance-Segmentation-For-Cancer/code/evaluation.py
code served (permissive licence) · get_code("49f9496bd39d6d5d")
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 torch

torch.manual_seed(0)

# SR: predicted segmentation mask (float tensor with values to be thresholded)
# GT: ground truth segmentation mask (binary tensor)
# Both should be small tensors for testing

SR = torch.rand(2, 4)  # Small random tensor with values in [0, 1]
GT = torch.randint(0, 2, (2, 4)).float()  # Small binary tensor

ARGS = {
    "SR": SR,
    "GT": GT,
    "threshold": 0.5
}
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 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
interpolate_and_crop Ran
ran on a synthesized input
SINGROUP/ED-AFM/edafm/preprocessing.py
code served (permissive licence) · get_code("f033b3a4a95557cc")
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 list, ndim 5, 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 numpy as np

# Create small test AFM images
# Shape: (batch, x, y, z) where batch=2, x=4, y=3, z=2
batch_size = 2
x_pixels = 4
y_pixels = 3
z_channels = 2

# Create a list of AFM image batches
X = [
    np.random.rand(batch_size, x_pixels, y_pixels, z_channels).astype(np.float32),
    np.random.rand(batch_size, x_pixels, y_pixels, z_channels).astype(np.float32),
]

# Real-space dimensions in angstroms (len_x, len_y)
# Using values that will give reasonable interpolation results
real_dim = (40.0, 30.0)  # 40 angstroms in x, 30 in y

# Target resolution in angstroms per pixel
target_res = 0.125

# Target multiple for cropping
target_multiple = 8

ARGS = {
    "X": X,
    "real_dim": real_dim,
    "target_res": target_res,
    "target_multiple": target_multiple,
}
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 list, ndim 5, dtype family float — a list 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
plot_input Ran
ran on a synthesized input
SINGROUP/ED-AFM/edafm/visualization.py
code served (permissive licence) · get_code("d768bd08c6344f79")
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 Figure. 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 numpy as np
import matplotlib
matplotlib.use('Agg')  # Use non-interactive backend
import matplotlib.pyplot as plt

# Create a small 3D AFM image array with shape (x, y, z)
# Using distinct dimensions: 4 x 5 x 3 (width x height x depth/slices)
X = np.random.rand(4, 5, 3) * 100  # Random values between 0-100

ARGS = {
    'X': X,
    'constant_range': False,
    'cmap': 'afmhot'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Figure — a Figure output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Figure 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
read_xyzs Ran
ran on a synthesized input
SINGROUP/ED-AFM/edafm/utils.py
code served (permissive licence) · get_code("e3c7049635d270aa")
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 list. 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 numpy as np
import tempfile
import os

# Create temporary xyz files for testing
temp_dir = tempfile.mkdtemp()

# Create first xyz file
xyz_file_1 = os.path.join(temp_dir, "mol1.xyz")
with open(xyz_file_1, 'w') as f:
    f.write("2\n")
    f.write("Water molecule\n")
    f.write("O 0.0 0.0 0.0\n")
    f.write("H 0.96 0.0 0.0\n")

# Create second xyz file
xyz_file_2 = os.path.join(temp_dir, "mol2.xyz")
with open(xyz_file_2, 'w') as f:
    f.write("3\n")
    f.write("Methane molecule\n")
    f.write("C 0.0 0.0 0.0\n")
    f.write("H 0.63 0.63 0.63\n")
    f.write("H -0.63 -0.63 0.63\n")

ARGS = {
    "file_paths": [xyz_file_1, xyz_file_2],
    "return_comment": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
recurrent_model Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
trichtu/Recurrent_Attention_U_net/network.py
code served (permissive licence) · get_code("3beac607fd391b24")
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 as nn

torch.manual_seed(0)

class SimpleRecurrentModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv = nn.Conv2d(5, 2, kernel_size=3, padding=1)
        self.rain_conv = nn.Conv2d(5, 1, kernel_size=3, padding=1)
    
    def forward(self, x, state2=None, state3=None, state4=None, state5=None):
        # x shape: [Batch, Filter, W, H]
        out = self.conv(x)
        rain = self.rain_conv(x)
        
        # Return output, rain, and dummy states
        return out, rain, state2, state3, state4, state5

model = SimpleRecurrentModel()

# Input shape: [Batch, Time, Filter, W, H]
# Batch=2, Time=3, Filter=5, W=4, H=6
input_tensor = torch.randn(2, 3, 5, 4, 6)

ARGS = {
    "model": model,
    "input": input_tensor
}
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
saveImg Ran
ran on a synthesized input
Spider-scnu/Instance-Segmentation-For-Cancer/code/solver.py
code served (permissive licence) · get_code("5ab493cebf02dab3")
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 Image. 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 numpy as np

torch.manual_seed(0)

# Construct a small binary tensor with shape (batch=1, channels=1, height=4, width=3)
# The function expects raw to have .cpu(), .detach(), .numpy() methods (torch tensor)
# and to be indexable with [0, :, :, :]
raw = torch.rand(1, 1, 4, 3)

# hw is used as (hw[0], hw[1]) for image resizing - should be (width, height) tuple
hw = (8, 6)

# threshold is used in a comparison: raw > threshold
threshold = 0.5

ARGS = {
    "raw": raw,
    "hw": hw,
    "threshold": threshold
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
saveImg_GT Ran
ran on a synthesized input
Spider-scnu/Instance-Segmentation-For-Cancer/code/solver.py
code served (permissive licence) · get_code("0cb65afe5793a55d")
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 Image. 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 numpy as np
from PIL import Image

torch.manual_seed(0)

# raw: a torch tensor with shape (batch, channels, height, width)
# The function expects [0, :, :, :] indexing and transpose(1, 2, 0)
# So we need (batch=1, channels=1, height=4, width=3)
raw = torch.rand(1, 1, 4, 3)

# hw: a tuple/list of (width, height) for the resize operation
hw = (8, 6)

ARGS = {
    "raw": raw,
    "hw": hw
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
saveImg_contour Ran
ran on a synthesized input
Spider-scnu/Instance-Segmentation-For-Cancer/code/solver.py
code served (permissive licence) · get_code("04de0c592493afd9")
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 Image. 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 numpy as np
from PIL import Image

torch.manual_seed(0)

# The function expects:
# - raw: a tensor that will be denormalized and converted to numpy, then indexed as [0, :, :, :]
#   and transposed as (1, 2, 0), suggesting it's shape (batch, channels, height, width)
# - hw: a tuple/list of (width, height) for resizing

# Create a small tensor with shape (batch=1, channels=3, height=4, width=5)
raw = torch.randn(1, 3, 4, 5)

# hw is used for im.resize((hw[0], hw[1])), so it should be a tuple/list of two integers
hw = (8, 6)

ARGS = {
    "raw": raw,
    "hw": hw
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
UNET_att_right Not yet run
unverified (harvested, no recorded run)
yingkaisha/keras-unet-collection/keras_unet_collection/_model_att_unet_2d.py
code served (permissive licence) · get_code("645ff0e654fa9193")
How it ran

no invocation recorded.

add_cutout Not yet run
unverified (harvested, no recorded run)
SINGROUP/ED-AFM/edafm/preprocessing.py
code served (permissive licence) · get_code("02133bf28330da3d")
How it ran

no invocation recorded.

define_G Not yet run
unverified (harvested, no recorded run)
ozan-oktay/Attention-Gated-Networks/models/networks_other.py
code served (permissive licence) · get_code("22e8e0199d36ed28")
How it ran

no invocation recorded.

download_weights Not yet run
unverified (harvested, no recorded run)
SINGROUP/ED-AFM/edafm/utils.py
code served (permissive licence) · get_code("e4e8c4660b51a786")
How it ran

no invocation recorded.

make_dataloader Not yet run
unverified (harvested, no recorded run)
SINGROUP/ED-AFM/edafm/training.py
code served (permissive licence) · get_code("e0604b6518ab750d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 28 samples lifted from this paper's linked repositories, 28 carry a function identity and 0 do not. Of the 27 distinct functions with an identity, 7 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 5 later) and 20 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_norm_layer 8 other papers
8 later
1903.08682 (2019-03)
Im2Pencil: Controllable Pencil Illustration from Photographs
1904.00637 (2019-04)
Single Image Reflection Removal Exploiting Misaligned Training Data and Network Enhancements
2004.05805 (2020-04)
Diversity Helps: Unsupervised Few-shot Learning via Distribution Shift-based Data Augmentation
and 5 more not named here
get_accuracy 3 other papers
1 dated earlier, 2 later
1802.06955 (2018-02)
Recurrent Residual Convolutional Neural Network based on U-Net (R2U-Net) for Medical Image Segmentation
2210.13012 (2022-10)
CMU-Net: A Strong ConvMixer-based Medical Ultrasound Image Segmentation Network
2402.15853 (2024-02)
RAUCA: A Novel Physical Adversarial Attack on Vehicle Detectors via Robust and Accurate Camouflage Generation
get_sensitivity 2 other papers
1 dated earlier, 1 later
1802.06955 (2018-02)
Recurrent Residual Convolutional Neural Network based on U-Net (R2U-Net) for Medical Image Segmentation
2402.15853 (2024-02)
RAUCA: A Novel Physical Adversarial Attack on Vehicle Detectors via Robust and Accurate Camouflage Generation
get_specificity 2 other papers
1 dated earlier, 1 later
1802.06955 (2018-02)
Recurrent Residual Convolutional Neural Network based on U-Net (R2U-Net) for Medical Image Segmentation
2402.15853 (2024-02)
RAUCA: A Novel Physical Adversarial Attack on Vehicle Detectors via Robust and Accurate Camouflage Generation
get_loader 1 other paper
1 later
2402.15853 (2024-02)
RAUCA: A Novel Physical Adversarial Attack on Vehicle Detectors via Robust and Accurate Camouflage Generation
get_sensitivity 1 other paper
1 dated earlier
1802.06955 (2018-02)
Recurrent Residual Convolutional Neural Network based on U-Net (R2U-Net) for Medical Image Segmentation
get_specificity 1 other paper
1 dated earlier
1802.06955 (2018-02)
Recurrent Residual Convolutional Neural Network based on U-Net (R2U-Net) for Medical Image Segmentation

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

More are linked than shown here.

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

Abstract

We propose a novel attention gate (AG) model for medical imaging that automatically learns to focus on target structures of varying shapes and sizes. Models trained with AGs implicitly learn to suppress irrelevant regions in an input image while highlighting salient features useful for a specific task. This enables us to eliminate the necessity of using explicit external tissue/organ localisation modules of cascaded convolutional neural networks (CNNs). AGs can be easily integrated into standard CNN architectures such as the U-Net model with minimal computational overhead while increasing the model sensitivity and prediction accuracy. The proposed Attention U-Net architecture is evaluated on two large CT abdominal datasets for multi-class image segmentation. Experimental results show that AGs consistently improve the prediction performance of U-Net across different datasets and training sizes while preserving computational efficiency. The code for the proposed architecture is publicly available.

For agents

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

get_harvested_code_for_paper("1804.03999")
get_code_for_paper("1804.03999")
have("1804.03999")

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

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

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

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

Connect an agent — have() is free.