SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2107.09559 · 2021

SynthSeg: Segmentation of brain MRI scans of any contrast and resolution without retraining

arXiv · PDF · Open in the Atlas

Code that ran

3 of 6 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 3 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/2107.09559.json · badge: /api/ran/2107.09559.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
BBillot/SynthSR canonical (classifier label)
classifier basis: census
3 ran · 3 no recorded run
FunctionStatusWhere it lives
blurring_sigma_for_downsampling Ran
ran on a synthesized input
BBillot/SynthSR/ext/lab2im/edit_tensors.py
code served (permissive licence) · get_code("b149f1adf50c5f3c")
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 (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
import tensorflow as tf
import keras.layers as KL

# Test case 1: numpy arrays without optional parameters
current_res_1 = np.array([64.0, 128.0, 256.0])
downsample_res_1 = np.array([32.0, 64.0, 128.0])

# Test case 2: numpy arrays with mult_coef
current_res_2 = np.array([100.0, 200.0])
downsample_res_2 = np.array([50.0, 100.0])
mult_coef_2 = 0.5

# Test case 3: numpy arrays with thickness
current_res_3 = np.array([512.0, 512.0, 512.0])
downsample_res_3 = np.array([256.0, 256.0, 256.0])
thickness_3 = np.array([200.0, 200.0, 200.0])

# Test case 4: tensorflow tensors without optional parameters
current_res_4 = tf.constant([64.0, 128.0], dtype=tf.float32)
downsample_res_4 = tf.constant([32.0, 64.0], dtype=tf.float32)

# Test case 5: tensorflow tensors with mult_coef
current_res_5 = tf.constant([100.0, 150.0, 200.0], dtype=tf.float32)
downsample_res_5 = tf.constant([50.0, 75.0, 100.0], dtype=tf.float32)
mult_coef_5 = 0.8

# Test case 6: tensorflow tensors with thickness
current_res_6 = tf.constant([256.0, 256.0], dtype=tf.float32)
downsample_res_6 = tf.constant([128.0, 128.0], dtype=tf.float32)
thickness_6 = tf.constant([100.0, 100.0], dtype=tf.float32)

# Use the first test case as the default
ARGS = {
    "current_res": current_res_1,
    "downsample_res": downsample_res_1,
    "mult_coef": None,
    "thickness": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras, numpy, tensorflow — 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 (3,) — shape (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
conv_enc Ran
ran on a synthesized input
BBillot/SynthSR/ext/neuron/models.py
code served (permissive licence) · get_code("0c981ce8cb47950c")
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 Functional. 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 keras.layers as KL
from keras.models import Model

ARGS = {
    'nb_features': 16,
    'input_shape': (4, 3, 1),  # (height, width, channels) for 2D
    'nb_levels': 2,
    'conv_size': 3,
    'name': 'test_encoder',
    'prefix': 'enc',
    'feat_mult': 2,
    'pool_size': 2,
    'dilation_rate_mult': 1,
    'padding': 'same',
    'activation': 'elu',
    'layer_nb_feats': None,
    'use_residuals': False,
    'nb_conv_per_level': 2,
    'conv_dropout': 0.0,
    'batch_norm': None,
    'input_model': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional 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
discriminator_block Ran
ran on a synthesized input
BBillot/SynthSR/SynthSR/fine_tuning_with_adversary.py
code served (permissive licence) · get_code("eeef681f0970de5c")
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 KerasTensor. 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 keras.layers as KL
import tensorflow as tf
import numpy as np

# Create a small 3D input tensor (batch=2, spatial dims=4x4x4, channels=3)
layer_input = tf.keras.Input(shape=(4, 4, 4, 3), batch_size=2)

# Define parameters
filters = 16
strides = (1, 1, 1)

ARGS = {
    'layer_input': layer_input,
    'filters': filters,
    'strides': strides
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras, numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type KerasTensor — a KerasTensor 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
make_discriminator Not yet run
unverified (harvested, no recorded run)
BBillot/SynthSR/SynthSR/fine_tuning_with_adversary.py
code served (permissive licence) · get_code("cdbfcddd4e30d17c")
How it ran

no invocation recorded.

sobel_kernels Not yet run
unverified (harvested, no recorded run)
BBillot/SynthSR/ext/lab2im/edit_tensors.py
code served (permissive licence) · get_code("7053f37198d52faf")
How it ran

no invocation recorded.

unet Not yet run
unverified (harvested, no recorded run)
BBillot/SynthSR/ext/neuron/models.py
code served (permissive licence) · get_code("ccdf75b227c739c8")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 later) and 4 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
blurring_sigma_for_downsampling 1 other paper
1 dated earlier
2003.01995 (2020-03)
A Learning Strategy for Contrast-agnostic MRI Segmentation
sobel_kernels 1 other paper
1 dated earlier
2003.01995 (2020-03)
A Learning Strategy for Contrast-agnostic MRI 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

Despite advances in data augmentation and transfer learning, convolutional neural networks (CNNs) difficultly generalise to unseen domains. When segmenting brain scans, CNNs are highly sensitive to changes in resolution and contrast: even within the same MRI modality, performance can decrease across datasets. Here we introduce SynthSeg, the first segmentation CNN robust against changes in contrast and resolution. SynthSeg is trained with synthetic data sampled from a generative model conditioned on segmentations. Crucially, we adopt a domain randomisation strategy where we fully randomise the contrast and resolution of the synthetic training data. Consequently, SynthSeg can segment real scans from a wide range of target domains without retraining or fine-tuning, which enables straightforward analysis of huge amounts of heterogeneous clinical data. Because SynthSeg only requires segmentations to be trained (no images), it can learn from labels obtained by automated methods on diverse populations (e.g., ageing and diseased), thus achieving robustness to a wide range of morphological variability. We demonstrate SynthSeg on 5,000 scans of six modalities (including CT) and ten resolutions, where it exhibits unparalleled generalisation compared with supervised CNNs, state-of-the-art domain adaptation, and Bayesian segmentation. Finally, we demonstrate the generalisability of SynthSeg by applying it to cardiac MRI and CT scans.

For agents

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

get_harvested_code_for_paper("2107.09559")
get_code_for_paper("2107.09559")
have("2107.09559")

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

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

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

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

Connect an agent — have() is free.