SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1811.09800 · 2018

Bayesian QuickNAT: Model Uncertainty in Deep Whole-Brain Segmentation for Structure-wise Quality Control

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 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 5 have no contract verdict; 0 failures of our instrument; 2 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/1811.09800.json · badge: /api/ran/1811.09800.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
ai-med/quickNAT_pytorch community (classifier label)
classifier basis not recorded on the link
5 ran · 2 no recorded run
FunctionStatusWhere it lives
compute_volume Ran
ran on a synthesized input
ai-med/quickNAT_pytorch/utils/evaluator.py
code served (permissive licence) · get_code("e9f2847240975534")
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

# Construct arguments for compute_volume function
prediction_map = np.array([
    [0, 1, 2, 0],
    [1, 2, 0, 1]
], dtype=np.int32)

label_map = ['background', 'class_1', 'class_2', 'class_3']

ID = 'sample_001'

ARGS = {
    'prediction_map': prediction_map,
    'label_map': label_map,
    'ID': ID
}
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 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
dice_confusion_matrix Ran
ran on a synthesized input
ai-med/quickNAT_pytorch/utils/evaluator.py
code served (permissive licence) · get_code("d3624fbc165839bb")
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 torch
import numpy as np

torch.manual_seed(0)

# vol_output: predicted class indices, shape (batch_size, spatial_dims...)
# Should be integer tensor with class predictions
vol_output = torch.randint(0, 3, (2, 4))  # 2 samples, 4 spatial elements, 3 classes

# ground_truth: ground truth class indices, same shape as vol_output
ground_truth = torch.randint(0, 3, (2, 4))  # 2 samples, 4 spatial elements, 3 classes

# num_classes: number of classes
num_classes = 3

# no_samples: number of samples to use in train mode
no_samples = 1

# mode: either 'train' or 'test'
mode = 'train'

ARGS = {
    'vol_output': vol_output,
    'ground_truth': ground_truth,
    'num_classes': num_classes,
    'no_samples': no_samples,
    'mode': mode
}
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 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
dice_score_perclass Ran
ran on a synthesized input
ai-med/quickNAT_pytorch/utils/evaluator.py
code served (permissive licence) · get_code("bb8fee5ba734e976")
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 (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)

# Create small test tensors
batch_size = 2
spatial_dim = 4
num_classes = 3

# vol_output: predicted class indices, shape (batch_size, spatial_dim)
vol_output = torch.randint(0, num_classes, (batch_size, spatial_dim))

# ground_truth: ground truth class indices, same shape as vol_output
ground_truth = torch.randint(0, num_classes, (batch_size, spatial_dim))

ARGS = {
    'vol_output': vol_output,
    'ground_truth': ground_truth,
    'num_classes': num_classes,
    'no_samples': 1,
    'mode': 'train'
}
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 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
get_imdb_dataset Ran
ran on a synthesized input
ai-med/quickNAT_pytorch/utils/data_utils.py
code served (permissive licence) · get_code("4addd964b92585ee")
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 os
import h5py
import numpy as np
import torch
import tempfile
import shutil

torch.manual_seed(0)

# Create a temporary directory for test HDF5 files
temp_dir = tempfile.mkdtemp()

# Create minimal HDF5 files with required datasets
def create_hdf5_file(filepath, data_key, data_array):
    with h5py.File(filepath, 'w') as f:
        f.create_dataset(data_key, data=data_array)

# Create small test data (2 samples, 1 channel, 4x3 spatial dims)
train_data = np.random.randn(2, 1, 4, 3).astype(np.float32)
train_labels = np.array([[1, 0], [0, 1]], dtype=np.float32)
train_class_weights = np.array([[0.5], [0.5]], dtype=np.float32)
train_weights = np.array([[1.0], [1.0]], dtype=np.float32)

test_data = np.random.randn(2, 1, 4, 3).astype(np.float32)
test_labels = np.array([[1, 0], [0, 1]], dtype=np.float32)
test_class_weights = np.array([[0.5], [0.5]], dtype=np.float32)
test_weights = np.array([[1.0], [1.0]], dtype=np.float32)

# Write HDF5 files
create_hdf5_file(os.path.join(temp_dir, 'train_data.h5'), 'data', train_data)
create_hdf5_file(os.path.join(temp_dir, 'train_label.h5'), 'label', train_labels)
create_hdf5_file(os.path.join(temp_dir, 'train_class_weights.h5'), 'class_weights', train_class_weights)
create_hdf5_file(os.path.join(temp_dir, 'train_weights.h5'), 'weights', train_weights)
create_hdf5_file(os.path.join(temp_dir, 'test_data.h5'), 'data', test_data)
create_hdf5_file(os.path.join(temp_dir, 'test_label.h5'), 'label', test_labels)
create_hdf5_file(os.path.join(temp_dir, 'test_class_weights.h5'), 'class_weights', test_class_weights)
create_hdf5_file(os.path.join(temp_dir, 'test_weights.h5'), 'weights', test_weights)

ARGS = {
    'data_params': {
        'data_dir': temp_dir,
        'train_data_file': 'train_data.h5',
        'train_label_file': 'train_label.h5',
        'train_class_weights_file': 'train_class_weights.h5',
        'train_weights_file': 'train_weights.h5',
        'test_data_file': 'test_data.h5',
        'test_label_file': 'test_label.h5',
        'test_class_weights_file': 'test_class_weights.h5',
        'test_weights_file': 'test_weights.h5',
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
h5py, numpy, torch, torchvision — 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
remap_labels Ran
ran on a synthesized input
ai-med/quickNAT_pytorch/utils/preprocessor.py
code served (permissive licence) · get_code("f419700d7ae296ee")
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 2, dtype family int, 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 numpy as np

# Create a small label array with some of the labels that will be remapped
labels = np.array([
    [2, 3, 4, 5],
    [7, 8, 10, 11]
], dtype=np.int32)

remap_config = 'FS'

ARGS = {
    'labels': labels,
    'remap_config': remap_config
}
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 ndarray, ndim 2, dtype family int, 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
estimate_weights_mfb Not yet run
unverified (harvested, no recorded run)
ai-med/quickNAT_pytorch/utils/preprocessor.py
code served (permissive licence) · get_code("fcf754503b98adc9")
How it ran

no invocation recorded.

rotate_orientation Not yet run
unverified (harvested, no recorded run)
ai-med/quickNAT_pytorch/utils/preprocessor.py
code served (permissive licence) · get_code("fa1041b0fb86f73e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-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 introduce Bayesian QuickNAT for the automated quality control of whole-brain segmentation on MRI T1 scans. Next to the Bayesian fully convolutional neural network, we also present inherent measures of segmentation uncertainty that allow for quality control per brain structure. For estimating model uncertainty, we follow a Bayesian approach, wherein, Monte Carlo (MC) samples from the posterior distribution are generated by keeping the dropout layers active at test time. Entropy over the MC samples provides a voxel-wise model uncertainty map, whereas expectation over the MC predictions provides the final segmentation. Next to voxel-wise uncertainty, we introduce four metrics to quantify structure-wise uncertainty in segmentation for quality control. We report experiments on four out-of-sample datasets comprising of diverse age range, pathology and imaging artifacts. The proposed structure-wise uncertainty metrics are highly correlated with the Dice score estimated with manual annotation and therefore present an inherent measure of segmentation quality. In particular, the intersection over union over all the MC samples is a suitable proxy for the Dice score. In addition to quality control at scan-level, we propose to incorporate the structure-wise uncertainty as a measure of confidence to do reliable group analysis on large data repositories. We envisage that the introduced uncertainty metrics would help assess the fidelity of automated deep learning based segmentation methods for large-scale population studies, as they enable automated quality control and group analyses in processing large data repositories.

For agents

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

get_harvested_code_for_paper("1811.09800")
get_code_for_paper("1811.09800")
have("1811.09800")

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

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

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

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

Connect an agent — have() is free.