SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1603.05959 · 2016

Efficient Multi-Scale 3D CNN with Fully Connected CRF for Accurate Brain Lesion Segmentation

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 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 9 have no contract verdict; 0 failures of our instrument; 3 no recorded run), 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/1603.05959.json · badge: /api/ran/1603.05959.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
Kamnitsask/deepmedic community (classifier label)
classifier basis not recorded on the link
9 ran · 3 no recorded run
FunctionStatusWhere it lives
calc_rec_field_of_path_assuming_strides_1 Ran
ran on a synthesized input
Kamnitsask/deepmedic/deepmedic/neuralnet/utils.py
code served (permissive licence) · get_code("8db9843f9dcbf528")
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 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

def calc_rec_field_of_path_assuming_strides_1(kern_dims):
    if not kern_dims:
        return 0
    n_dims = len(kern_dims[0])
    receptive_field = [1] * n_dims
    for dim_idx in range(n_dims):
        for layer_idx in range(len(kern_dims)):
            receptive_field[dim_idx] += kern_dims[layer_idx][dim_idx] - 1
    return receptive_field

# kern_dims is a list of tuples/lists where each element represents kernel dimensions for a layer
# Each inner tuple/list should have the same number of dimensions
# Let's create a valid argument: 3 layers with 2D kernels of different sizes
kern_dims = [
    (3, 3),      # Layer 1: 3x3 kernel
    (3, 5),      # Layer 2: 3x5 kernel
    (5, 3),      # Layer 3: 5x3 kernel
]

ARGS = {
    "kern_dims": kern_dims
}
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 list, ndim 1, dtype family int — 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
check_kern_dims_per_l_correct_3d_and_n_layers Ran
ran on a synthesized input
Kamnitsask/deepmedic/deepmedic/neuralnet/utils.py
code served (permissive licence) · get_code("338063673d94ab09")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Test case 1: Valid case - kern_dims_per_layer has correct structure
kern_dims_per_layer_valid = [
    (3, 3, 3),
    (3, 3, 3),
    (3, 3, 3)
]
n_layers_valid = 3

ARGS = {
    "kern_dims_per_layer": kern_dims_per_layer_valid,
    "n_layers": n_layers_valid
}
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 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
check_rec_field_vs_inp_dims Ran
ran on a synthesized input
Kamnitsask/deepmedic/deepmedic/neuralnet/utils.py
code served (permissive licence) · get_code("8aecaa717071051e")
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 torch
import numpy as np

torch.manual_seed(0)

# The function check_rec_field_vs_inp_dims takes two parameters:
# rec_field_dims: dimensions of receptive field (should be a sequence/tuple/list)
# inp_dims: dimensions of input (should be a sequence/tuple/list)
# 
# The function checks:
# 1. Both have the same number of dimensions
# 2. Each dimension of rec_field_dims is <= corresponding dimension of inp_dims

# Case 1: Valid case where receptive field fits within input
rec_field_dims_valid = [3, 4, 5]
inp_dims_valid = [7, 8, 9]

ARGS = {
    "rec_field_dims": rec_field_dims_valid,
    "inp_dims": inp_dims_valid
}
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 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
conv_3d Ran
ran on a synthesized input
Kamnitsask/deepmedic/deepmedic/neuralnet/ops.py
code served (permissive licence) · get_code("4357cf5f087db495")
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 EagerTensor, ndim 5, dtype family float, shape (2, 7, 2, 3, 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 tensorflow as tf
import numpy as np

# Create input tensor with shape (batch, channels, depth, height, width)
# Using distinct sizes: batch=2, channels=3, depth=4, height=5, width=6
input_tensor = tf.constant(np.random.randn(2, 3, 4, 5, 6).astype(np.float32))

# Create weight tensor with shape (out_channels, in_channels, kernel_d, kernel_h, kernel_w)
# Using distinct sizes: out_channels=7, in_channels=3, kernel_d=3, kernel_h=3, kernel_w=3
w_tensor = tf.constant(np.random.randn(7, 3, 3, 3, 3).astype(np.float32))

# Define padding parameter
padding_mode = 'VALID'

ARGS = {
    'input': input_tensor,
    'w': w_tensor,
    'padding': padding_mode
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 5, dtype family float, shape (2, 7, 2, 3, 4) — shape (2, 7, 2, 3, 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
prelu Ran
ran on a synthesized input
Kamnitsask/deepmedic/deepmedic/neuralnet/ops.py
code served (permissive licence) · get_code("a6fcd9282f9d659f")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Create small test tensors
input_tensor = tf.constant([[-0.5, 0.2, -0.3, 0.8],
                             [0.1, -0.9, 0.4, -0.2]], dtype=tf.float32)

a_param = tf.constant(0.1, dtype=tf.float32)

ARGS = {
    "input": input_tensor,
    "a": a_param
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
random_affine_deformation Ran
ran on a synthesized input
Kamnitsask/deepmedic/deepmedic/dataManagement/augmentImage.py
code served (permissive licence) · get_code("346f2897c0851202")
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 3D image arrays for testing
np.random.seed(0)

# Channels: list of 3D images (e.g., 2 channels of 4x4x4 volumes)
channels = [
    np.random.rand(4, 4, 4).astype(np.float32),
    np.random.rand(4, 4, 4).astype(np.float32)
]

# Ground truth labels: single 3D label map
gt_lbls = np.random.randint(0, 3, size=(4, 4, 4)).astype(np.int32)

# ROI mask: binary 3D mask
roi_mask = np.random.randint(0, 2, size=(4, 4, 4)).astype(np.int32)

# Weight maps list: list of 3D weight maps
wmaps_l = [
    np.random.rand(4, 4, 4).astype(np.float32),
    np.random.rand(4, 4, 4).astype(np.float32)
]

# Parameters dict for augmentation
prms = {
    'prob': 0.8,  # probability of applying augmentation
    'max_rot_xyz': [15.0, 15.0, 15.0],  # max rotation in degrees for x, y, z
    'max_scaling': 0.1,  # max scaling factor
    'seed': 42,
    'interp_order_imgs': 1,  # interpolation order for channel images
    'interp_order_lbls': 0,  # interpolation order for labels (nearest neighbor)
    'interp_order_roi': 0,  # interpolation order for ROI mask
    'interp_order_wmaps': 1,  # interpolation order for weight maps
    'boundary_mode': 'nearest'  # boundary handling mode
}

ARGS = {
    'channels': channels,
    'gt_lbls': gt_lbls,
    'roi_mask': roi_mask,
    'wmaps_l': wmaps_l,
    'prms': prms
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
random_gamma_correction Ran
ran on a synthesized input
Kamnitsask/deepmedic/deepmedic/dataManagement/augmentImage.py
code served (permissive licence) · get_code("9a505431f15e3e27")
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

# Construct valid arguments for random_gamma_correction
# The function expects:
# - channels: a list of numpy arrays with shape [n_channs, height, width, depth] or similar
# - gamma_std: float or None (optional, default 0.05)

# Create a list of channel arrays
# Each array should have non-negative values (function asserts np.min(channels[path_idx]) >= 0.0)
n_channels = 3
height = 4
width = 5
depth = 6

channels = [
    np.random.uniform(0.1, 1.0, size=(n_channels, height, width, depth)).astype('float32'),
    np.random.uniform(0.1, 1.0, size=(n_channels, height, width, depth)).astype('float32'),
]

ARGS = {
    'channels': channels,
    'gamma_std': 0.05,
}
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, 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
relu Ran
ran on a synthesized input
Kamnitsask/deepmedic/deepmedic/neuralnet/ops.py
code served (permissive licence) · get_code("5d605f64da7a03e1")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Create a small TensorFlow tensor for testing
input_tensor = tf.constant([[-2.0, -1.0, 0.5, 2.0], [1.5, -3.0, 0.0, -0.5]], dtype=tf.float32)

ARGS = {
    "input": input_tensor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
x_entr Ran
ran on a synthesized input
Kamnitsask/deepmedic/deepmedic/neuralnet/cost_functions.py
code served (permissive licence) · get_code("21d9f65263774216")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Set seed for reproducibility
tf.random.set_seed(0)

# Create small test tensors
batch_size = 2
num_classes = 4

# p_y_given_x_train: shape (batch_size, num_classes, 1, 1, 1)
# This is a probability distribution over classes for each sample
p_y_given_x_train = tf.constant(
    np.random.dirichlet([1]*num_classes, size=batch_size).astype(np.float32)
)
# Reshape to 5D as expected by the function
p_y_given_x_train = tf.reshape(p_y_given_x_train, [batch_size, num_classes, 1, 1, 1])

# y_gt: ground truth class labels, shape (batch_size, 1, 1, 1)
# Contains class indices in range [0, num_classes)
y_gt = tf.constant(
    [[0], [2]],
    dtype=tf.int32
)
y_gt = tf.reshape(y_gt, [batch_size, 1, 1, 1])

# weightPerClass: weight for each class, shape (num_classes,)
weightPerClass = tf.constant([1.0, 1.0, 1.0, 1.0], dtype=tf.float32)

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

ARGS = {
    "p_y_given_x_train": p_y_given_x_train,
    "y_gt": y_gt,
    "weightPerClass": weightPerClass,
    "eps": eps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
augment_imgs_of_case Not yet run
unverified (harvested, no recorded run)
Kamnitsask/deepmedic/deepmedic/dataManagement/augmentImage.py
code served (permissive licence) · get_code("b79ab7d1e72f7b3b")
How it ran

no invocation recorded.

dsc Not yet run
unverified (harvested, no recorded run)
Kamnitsask/deepmedic/deepmedic/neuralnet/cost_functions.py
code served (permissive licence) · get_code("9d5e70582a1d30c1")
How it ran

no invocation recorded.

iou Not yet run
unverified (harvested, no recorded run)
Kamnitsask/deepmedic/deepmedic/neuralnet/cost_functions.py
code served (permissive licence) · get_code("730ced37040cedf6")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 10 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
dsc 1 other paper
1 later
1907.10982 (2019-07)
Overfitting of neural nets under class imbalance: Analysis and improvements for segmentation
iou 1 other paper
1 later
1907.10982 (2019-07)
Overfitting of neural nets under class imbalance: Analysis and improvements for 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

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

Abstract

We propose a dual pathway, 11-layers deep, three-dimensional Convolutional Neural Network for the challenging task of brain lesion segmentation. The devised architecture is the result of an in-depth analysis of the limitations of current networks proposed for similar applications. To overcome the computational burden of processing 3D medical scans, we have devised an efficient and effective dense training scheme which joins the processing of adjacent image patches into one pass through the network while automatically adapting to the inherent class imbalance present in the data. Further, we analyze the development of deeper, thus more discriminative 3D CNNs. In order to incorporate both local and larger contextual information, we employ a dual pathway architecture that processes the input images at multiple scales simultaneously. For post-processing of the network's soft segmentation, we use a 3D fully connected Conditional Random Field which effectively removes false positives. Our pipeline is extensively evaluated on three challenging tasks of lesion segmentation in multi-channel MRI patient data with traumatic brain injuries, brain tumors, and ischemic stroke. We improve on the state-of-the-art for all three applications, with top ranking performance on the public benchmarks BRATS 2015 and ISLES 2015. Our method is computationally efficient, which allows its adoption in a variety of research and clinical settings. The source code of our implementation is made publicly available.

For agents

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

get_harvested_code_for_paper("1603.05959")
get_code_for_paper("1603.05959")
have("1603.05959")

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

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

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

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

Connect an agent — have() is free.