SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1807.10165 · DLMIA/ML-CDS@MICCAI · 2018

UNet++: A Nested U-Net Architecture for Medical Image Segmentation

arXiv · PDF · Open in the Atlas

Code that ran

21 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; 1 honoured the contract we drafted, 2 violated it and 15 have no contract verdict; 3 failures of our instrument; 7 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-22; 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/1807.10165.json · badge: /api/ran/1807.10165.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
marccoru/marinedebrisdetector community (classifier label)
classifier basis not recorded on the link
9 ran · 0 no recorded run
ShawFromAttock/FYP-Medical-Image-Segmentation-using-Nested-UNet-Architecture community (classifier label)
classifier basis not recorded on the link
7 ran · 0 no recorded run
4uiiurz1/pytorch-nested-unet community (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
16xccheng/keras-unet reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
CarryHJR/Nested-UNet community (classifier label)
classifier basis not recorded on the link
0 ran · 3 no recorded run
TheUser0815/unetpp-pytorch reimplementation (classifier label)
classifier basis: classifier_2025
0 ran · 2 no recorded run
frgfm/Holocron reimplementation (classifier label)
classifier basis: classifier_2025
0 ran · 2 no recorded run
FunctionStatusWhere it lives
count_params Ran
ran, honoured the contract we drafted
4uiiurz1/pytorch-nested-unet/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from gdisag/gradient_disaggregation, is pointer only (licence: NONE) · get_code("616b5e82dd2a38f9")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from gdisag/gradient_disaggregation, and GitHub detected no licence in that repository 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.

accuracy Ran
ran on a synthesized input
ShawFromAttock/FYP-Medical-Image-Segmentation-using-Nested-UNet-Architecture/metrics.py
code served (permissive licence) · get_code("1cb023306761d772")
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)

# The function takes output and target tensors
# output: passed through sigmoid, then compared to 0.5
# target: compared to 0.5
# Both are checked for equality after thresholding
# Both need .sum(), .item(), and .numel() methods (tensor methods)

output = torch.randn(2, 4)  # batch_size=2, some_dim=4
target = torch.randn(2, 4)  # same shape as output

ARGS = {
    "output": output,
    "target": target,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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
calculate_metrics Ran
ran on a synthesized input
marccoru/marinedebrisdetector/marinedebrisdetector/metrics.py
code served (permissive licence) · get_code("e95088d81cb8fe59")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

torch_manual_seed = 0  # For reproducibility if needed

# Generate synthetic binary classification data
np.random.seed(0)
n_samples = 10

# targets: binary labels (0 or 1)
targets = np.array([0, 1, 0, 1, 1, 0, 1, 0, 1, 0], dtype=int)

# scores: probability-like scores between 0 and 1
scores = np.array([0.1, 0.9, 0.2, 0.85, 0.95, 0.15, 0.8, 0.3, 0.88, 0.25], dtype=float)

# optimal_threshold: a threshold value between 0 and 1
optimal_threshold = 0.5

ARGS = {
    'targets': targets,
    'scores': scores,
    'optimal_threshold': optimal_threshold
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
count_params Ran
ran on a synthesized input
ShawFromAttock/FYP-Medical-Image-Segmentation-using-Nested-UNet-Architecture/utils.py
code served (permissive licence) · get_code("9a69e7bedeb5fb62")
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)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__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

model = SimpleModel()

ARGS = {
    "model": model
}
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
dice_coef Ran
ran on a synthesized input
4uiiurz1/pytorch-nested-unet/metrics.py
code served (permissive licence) · get_code("fc0365a30b108850")
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 float32, 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
import numpy as np

torch.manual_seed(0)

# Create small tensors for output and target
# output: raw logits that will be passed through sigmoid
# target: binary labels
output = torch.randn(2, 4)  # batch_size=2, features=4
target = torch.randint(0, 2, (2, 4), dtype=torch.float32)  # binary targets

ARGS = {
    "output": output,
    "target": target
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float32, 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
dice_coef Ran
ran on a synthesized input
ShawFromAttock/FYP-Medical-Image-Segmentation-using-Nested-UNet-Architecture/metrics.py
code served (permissive licence) · get_code("6715b71d51fb26e1")
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)

# Create small tensors for output and target
# output: raw logits (before sigmoid), shape (2, 4) -> will be reshaped to (-1,)
# target: binary targets, shape (2, 4) -> will be reshaped to (-1,)
output = torch.randn(2, 4)
target = torch.randint(0, 2, (2, 4)).float()

ARGS = {
    'output': output,
    'target': target,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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
fai Ran
ran on a synthesized input
marccoru/marinedebrisdetector/marinedebrisdetector/model/random_forest/engineering_patches.py
code served (permissive licence) · get_code("49dfe1132fa16819")
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

torch.manual_seed(0)

# The function fai takes three parameters: band4, band8, band10
# Looking at the function body:
# - band4 is used in arithmetic operations (addition, subtraction)
# - band8 is used in arithmetic operations (subtraction)
# - band10 is used in arithmetic operations (subtraction)
# All parameters appear to be numeric tensors that support element-wise operations

# Create small tensors for the three bands
band4 = torch.randn(2, 4)
band8 = torch.randn(2, 4)
band10 = torch.randn(2, 4)

ARGS = {
    "band4": band4,
    "band8": band8,
    "band10": band10
}
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
fdi Ran
ran on a synthesized input
marccoru/marinedebrisdetector/marinedebrisdetector/visualization.py
code served (permissive licence) · get_code("ac74e2e4aba25d20")
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
import numpy as np

torch.manual_seed(0)

bands = ['B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B8A', 'B9', 'B11', 'B12']

# scene is indexed by band index, needs to have values at indices:
# bands.index('B8') = 7
# bands.index('B6') = 5
# bands.index('B11') = 10

# Create a scene as a list/array with 12 bands
scene = torch.randn(12)

ARGS = {
    'scene': scene
}
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 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
fdi Ran
ran on a synthesized input
marccoru/marinedebrisdetector/marinedebrisdetector/model/random_forest/engineering_patches.py
code served (permissive licence) · get_code("1d5e9dd5a69f0ba0")
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 3, dtype family float, shape (2, 4, 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)

# The function fdi takes three parameters: band6, band8, band10
# These appear to be satellite imagery bands (likely spectral data)
# They are used in arithmetic operations, so they should be tensors

# Create small sample tensors for the three bands
# Shape: (batch=2, height=4, width=3) to have distinct dimensions
band6 = torch.randn(2, 4, 3)
band8 = torch.randn(2, 4, 3)
band10 = torch.randn(2, 4, 3)

ARGS = {
    "band6": band6,
    "band8": band8,
    "band10": band10,
}
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 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 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
get_loss Ran
ran on a synthesized input
marccoru/marinedebrisdetector/marinedebrisdetector/metrics.py
code served (permissive licence) · get_code("39d5aa40f8a16385")
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 function. 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)

# The function takes one parameter: pos_weight
# pos_weight is passed to nn.BCEWithLogitsLoss, which expects either None or a tensor
# According to PyTorch docs, pos_weight should be a weight of positive class
# For BCEWithLogitsLoss, it should be a 1D tensor of size equal to number of classes

# Create a small pos_weight tensor
pos_weight = torch.tensor([1.5, 2.0, 0.8, 1.2])

ARGS = {
    'pos_weight': pos_weight
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
image_enhance Ran
ran; our contract draft was wrong, not the code
16xccheng/keras-unet/before_data.py
code served (permissive licence) · get_code("e16111786d4ace79")
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 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.

from PIL import Image
import numpy as np

# Create a small PIL Image object
# The function expects a PIL Image that can be passed to ImageEnhance.Contrast
img_array = np.random.randint(0, 256, (64, 64, 3), dtype=np.uint8)
img = Image.fromarray(img_array, mode='RGB')

ARGS = {
    'img': img
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
PIL, numpy — 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
iou Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ShawFromAttock/FYP-Medical-Image-Segmentation-using-Nested-UNet-Architecture/lovasz_losses.py
code served (permissive licence) · get_code("d94639b28b2134ff")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (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 numpy as np
import torch

torch.manual_seed(0)

# Construct valid arguments for the iou function
# preds: prediction array/tensor with class indices
# labels: ground truth array/tensor with class indices
# C: number of classes
# EMPTY: value to return for empty unions (default 1.0)
# ignore: class index to ignore (default None)
# per_image: whether to compute per-image IoU (default False)

# Create small prediction and label arrays
# Using shape (2, 4) - batch of 2, spatial dimension of 4
preds = np.array([[0, 1, 2, 3],
                   [1, 2, 0, 1]], dtype=np.int64)

labels = np.array([[0, 1, 1, 3],
                    [1, 2, 2, 1]], dtype=np.int64)

# Number of classes
C = 4

# EMPTY value for classes with no union
EMPTY = 1.0

# Class to ignore during computation
ignore = None

# Whether to compute per-image IoU
per_image = False

ARGS = {
    "preds": preds,
    "labels": labels,
    "C": C,
    "EMPTY": EMPTY,
    "ignore": ignore,
    "per_image": per_image
}
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 ndarray, ndim 1, dtype family float, shape (4,) — shape (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
iou_binary Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ShawFromAttock/FYP-Medical-Image-Segmentation-using-Nested-UNet-Architecture/lovasz_losses.py
code served (permissive licence) · get_code("1211530cd527bd0b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

def isnan(x):
    return x != x

def mean(l, ignore_nan=False, empty=0):
    """
    nanmean compatible with generators.
    """
    l = iter(l)
    if ignore_nan:
        from itertools import filterfalse
        l = filterfalse(isnan, l)
    try:
        n = 1
        acc = next(l)
    except StopIteration:
        if empty == 'raise':
            raise ValueError('Empty mean')
        return empty
    for n, v in enumerate(l, 2):
        acc += v
    if n == 1:
        return acc
    return acc / n

def iou_binary(preds, labels, EMPTY=1.0, ignore=None, per_image=True):
    """
    IoU for foreground class
    binary: 1 foreground, 0 background
    """
    if not per_image:
        preds, labels = ((preds,), (labels,))
    ious = []
    for pred, label in zip(preds, labels):
        intersection = ((label == 1) & (pred == 1)).sum()
        union = ((label == 1) | (pred == 1) & (label != ignore)).sum()
        if not union:
            iou = EMPTY
        else:
            iou = float(intersection) / float(union)
        ious.append(iou)
    iou = mean(ious)
    return 100 * iou

# Setup code
np.random.seed(0)

# Create small prediction and label arrays for binary segmentation
# Shape: (height=4, width=3) for two images
preds_img1 = np.array([[0, 1, 1],
                       [1, 1, 0],
                       [0, 1, 1],
                       [1, 0, 0]], dtype=np.int32)

labels_img1 = np.array([[0, 1, 0],
                        [1, 1, 1],
                        [0, 1, 0],
                        [1, 0, 1]], dtype=np.int32)

preds_img2 = np.array([[1, 1, 0],
                       [0, 1, 1],
                       [1, 1, 0],
                       [0, 0, 1]], dtype=np.int32)

labels_img2 = np.array([[1, 0, 0],
                        [0, 1, 1],
                        [1, 0, 0],
                        [0, 1, 1]], dtype=np.int32)

# Arguments for iou_binary function
ARGS = {
    'preds': np.array([preds_img1, preds_img2]),
    'labels': np.array([labels_img1, labels_img2]),
    'EMPTY': 1.0,
    'ignore': 0,
    'per_image': True,
}
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 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
iou_score Ran
ran on a synthesized input
4uiiurz1/pytorch-nested-unet/metrics.py
code served (permissive licence) · get_code("e776bd6afa2c9c5b")
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 float64, 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

torch.manual_seed(0)

# Create small binary tensors for output and target
# output: raw logits that will be passed through sigmoid
output = torch.randn(2, 4)  # batch_size=2, spatial_dims=4

# target: binary ground truth
target = torch.randint(0, 2, (2, 4)).float()

ARGS = {
    "output": output,
    "target": target,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
iou_score Ran
ran on a synthesized input
ShawFromAttock/FYP-Medical-Image-Segmentation-using-Nested-UNet-Architecture/metrics.py
code served (permissive licence) · get_code("3bf8e35e1134aefa")
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)

# Create small random tensors for output and target
# Both should be float tensors that can be passed through sigmoid
# Batch size: 2, spatial/feature dimensions: 4x3
output = torch.randn(2, 4, 3, dtype=torch.float32)
target = torch.randn(2, 4, 3, dtype=torch.float32)

ARGS = {
    "output": output,
    "target": target,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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
lovasz_grad Ran
ran, violated the contract we drafted
ShawFromAttock/FYP-Medical-Image-Segmentation-using-Nested-UNet-Architecture/lovasz_losses.py
code served (permissive licence) · get_code("e85b5d21dc5b8382")
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 (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

torch.manual_seed(0)

# gt_sorted should be a 1D tensor of binary/boolean values
# representing ground truth sorted by some error metric
# The function expects a tensor with sum(), float(), cumsum() methods
gt_sorted = torch.tensor([0, 0, 1, 1], dtype=torch.long)

ARGS = {
    "gt_sorted": gt_sorted
}
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 (4,) — shape (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
ndvi Ran
ran on a synthesized input
marccoru/marinedebrisdetector/marinedebrisdetector/visualization.py
code served (permissive licence) · get_code("479d21d01d2d5419")
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 (4, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

bands = ['B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B8A', 'B9', 'B11', 'B12']

# scene should be a tensor with shape (12, height, width) or similar
# where the first dimension corresponds to the 12 bands
# The function indexes into scene using band indices (B8 is index 7, B4 is index 3)
scene = torch.randn(12, 4, 3)

ARGS = {
    'scene': scene
}
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 Tensor, ndim 2, dtype family float, shape (4, 3) — shape (4, 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
ndvi Ran
ran on a synthesized input
marccoru/marinedebrisdetector/marinedebrisdetector/model/random_forest/engineering_patches.py
code served (permissive licence) · get_code("6d2413162a87adb9")
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 numpy as np

torch.manual_seed(0)

# band4 and band8 are expected to be tensors representing satellite imagery bands
# The function performs element-wise arithmetic operations on them
# They should have the same shape for broadcasting to work correctly

band4 = torch.randn(2, 4)  # batch size 2, 4 channels/values
band8 = torch.randn(2, 4)  # same shape as band4

ARGS = {
    "band4": band4,
    "band8": band8,
}
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 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
normalize Ran
ran on a synthesized input
marccoru/marinedebrisdetector/marinedebrisdetector/main_cli.py
code served (permissive licence) · get_code("984093c755b1cdb6")
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
import torch.nn as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.threshold = 0.5
    
    def forward(self, x):
        return x

model = SimpleModel()
score = torch.tensor(2.0)

ARGS = {
    "score": score,
    "model": model
}
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
rgb Ran
ran on a synthesized input
marccoru/marinedebrisdetector/marinedebrisdetector/visualization.py
code served (permissive licence) · get_code("5e404888c5cb7120")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 3, dtype family float, shape (3, 5, 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 numpy as np

# Create a small scene array with shape (4, 5, 3) representing a small RGB image
# The function indexes it with [3, 2, 1] which requires at least 4 channels in first dimension
scene = np.random.randint(0, 256, size=(4, 5, 3), dtype=np.uint8)

ARGS = {
    "scene": scene
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (3, 5, 3) — shape (3, 5, 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
str2bool Ran
ran, violated the contract we drafted
4uiiurz1/pytorch-nested-unet/utils.py
code served (permissive licence) · get_code("8b9a62f72ecd14a7")
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 bool, 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 argparse

def str2bool(v):
    if v.lower() in ['true', 1]:
        return True
    elif v.lower() in ['false', 0]:
        return False
    else:
        raise argparse.ArgumentTypeError('Boolean value expected.')

# The function takes a single parameter 'v' which should be a string
# It calls .lower() on v, so v must be a string
# It checks if v.lower() is in a list containing 'true' or 1
# Valid inputs are strings like 'true', 'True', 'TRUE', 'false', 'False', 'FALSE'

ARGS = {
    'v': 'true'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
bce_dice_loss Not yet run
unverified (harvested, no recorded run)
CarryHJR/Nested-UNet/model.py
code served (permissive licence) · get_code("266b478c32f11c2b")
How it ran

no invocation recorded.

build_model Not yet run
unverified (harvested, no recorded run)
TheUser0815/unetpp-pytorch/model_builder.py
pointer only (licence: GPL-3.0) · get_code("f86121c00bc34218")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, TheUser0815/unetpp-pytorch, is not in the permissive set Syntology serves inline. 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. No invocation recorded.

default_model Not yet run
unverified (harvested, no recorded run)
TheUser0815/unetpp-pytorch/model_builder.py
pointer only (licence: GPL-3.0) · get_code("225ae4599c2eae5f")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, TheUser0815/unetpp-pytorch, is not in the permissive set Syntology serves inline. 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. No invocation recorded.

dice_coef Not yet run
unverified (harvested, no recorded run)
CarryHJR/Nested-UNet/model.py
code served (permissive licence) · get_code("f2cfef7bbdbe32a7")
How it ran

no invocation recorded.

mean_iou Not yet run
unverified (harvested, no recorded run)
CarryHJR/Nested-UNet/model.py
code served (permissive licence) · get_code("273fa6f9b4100875")
How it ran

no invocation recorded.

unetp Not yet run
unverified (harvested, no recorded run)
frgfm/Holocron/holocron/models/segmentation/unetpp.py
code served (permissive licence) · get_code("6b0f999f9e74b1c8")
How it ran

no invocation recorded.

unetpp Not yet run
unverified (harvested, no recorded run)
frgfm/Holocron/holocron/models/segmentation/unetpp.py
code served (permissive licence) · get_code("42e3369990bb3769")
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 28 distinct functions with an identity, 8 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 8 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
lovasz_grad 40 other papers
1 dated earlier, 39 later · 1 only as an assembly brick
1505.04597 (2015-05)
U-Net: Convolutional Networks for Biomedical Image Segmentation
1811.11721 (2018-11)
CCNet: Criss-Cross Attention for Semantic Segmentation
1905.06368 (2019-05)
Collaborative Global-Local Networks for Memory-Efficient Segmentation of Ultra-High Resolution Images
and 37 more not named here
iou 24 other papers
24 later
1811.11721 (2018-11)
CCNet: Criss-Cross Attention for Semantic Segmentation
2003.10778 (2020-03)
PanNuke Dataset Extension, Insights and Baselines
2003.13948 (2020-03)
Segmenting Transparent Objects in the Wild
and 21 more not named here
iou_binary 24 other papers
24 later
1811.11721 (2018-11)
CCNet: Criss-Cross Attention for Semantic Segmentation
2003.10778 (2020-03)
PanNuke Dataset Extension, Insights and Baselines
2003.13948 (2020-03)
Segmenting Transparent Objects in the Wild
and 21 more not named here
count_params 13 other papers
13 later
1811.11168 (2018-11)
Deformable ConvNets v2: More Deformable, Better Results
1907.03950 (2019-07)
Learning by Abstraction: The Neural State Machine
2004.03657 (2020-04)
FedMAX: Mitigating Activation Divergence for Accurate and Communication-Efficient Federated Learning
and 10 more not named here
str2bool 5 other papers
5 later
1811.11168 (2018-11)
Deformable ConvNets v2: More Deformable, Better Results
2004.03657 (2020-04)
FedMAX: Mitigating Activation Divergence for Accurate and Communication-Efficient Federated Learning
2106.00487 (2021-06)
Dense Nested Attention Network for Infrared Small Target Detection
and 2 more not named here
dice_coef 1 other paper
1 later
2203.04967 (2022-03)
UNeXt: MLP-based Rapid Medical Image Segmentation Network
unetp 1 other paper
1 later
1912.05074 (2019-12)
UNet++: Redesigning Skip Connections to Exploit Multiscale Features in Image Segmentation
unetpp 1 other paper
1 later
1912.05074 (2019-12)
UNet++: Redesigning Skip Connections to Exploit Multiscale Features in 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-22.

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

In this paper, we present UNet++, a new, more powerful architecture for medical image segmentation. Our architecture is essentially a deeply-supervised encoder-decoder network where the encoder and decoder sub-networks are connected through a series of nested, dense skip pathways. The re-designed skip pathways aim at reducing the semantic gap between the feature maps of the encoder and decoder sub-networks. We argue that the optimizer would deal with an easier learning task when the feature maps from the decoder and encoder networks are semantically similar. We have evaluated UNet++ in comparison with U-Net and wide U-Net architectures across multiple medical image segmentation tasks: nodule segmentation in the low-dose CT scans of chest, nuclei segmentation in the microscopy images, liver segmentation in abdominal CT scans, and polyp segmentation in colonoscopy videos. Our experiments demonstrate that UNet++ with deep supervision achieves an average IoU gain of 3.9 and 3.4 points over U-Net and wide U-Net, respectively.

For agents

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

get_harvested_code_for_paper("1807.10165")
get_code_for_paper("1807.10165")
have("1807.10165")

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

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

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

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

Connect an agent — have() is free.