SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2107.05840 · 2021

NucMM Dataset: 3D Neuronal Nuclei Instance Segmentation at Sub-Cubic Millimeter Scale

arXiv · PDF · Open in the Atlas

Code that ran

6 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 6 have no contract verdict; 0 failures of our instrument; 0 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.05840.json · badge: /api/ran/2107.05840.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
zudi-lin/pytorch_connectomics canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
FunctionStatusWhere it lives
build_chunk_grid Ran
ran on a synthesized input
zudi-lin/pytorch_connectomics/connectomics/chunked/chunk_grid.py
code served (permissive licence) · get_code("b3379aeebf6248a9")
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 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
from typing import Sequence

torch.manual_seed(0)

# The function build_chunk_grid takes:
# - volume_shape: Sequence[int] - a sequence of 3 integers representing the volume dimensions
# - chunk_shape: Sequence[int] - a sequence of 3 integers representing the chunk dimensions

# Let's create simple, distinct sizes for testing
volume_shape = [64, 48, 32]  # distinct sizes: 64, 48, 32
chunk_shape = [16, 12, 8]    # distinct sizes: 16, 12, 8

ARGS = {
    'volume_shape': volume_shape,
    'chunk_shape': chunk_shape,
}
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 list, ndim 1, 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
build_model Ran
ran on a synthesized input
zudi-lin/pytorch_connectomics/connectomics/models/build.py
code served (permissive licence) · get_code("3dcf26bc41ca75d0")
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 MockModel. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from omegaconf import OmegaConf
import logging

torch.manual_seed(0)
logger = logging.getLogger(__name__)

# Create a minimal stand-in for the architecture builder registry
class MockArchitectureRegistry:
    @staticmethod
    def get_architecture_builder(arch_type):
        """Return a builder function for the given architecture type."""
        def mock_builder(cfg):
            """Create a mock model with the required methods."""
            class MockModel(nn.Module):
                def __init__(self, cfg):
                    super().__init__()
                    self.cfg = cfg
                    self.linear = nn.Linear(1, 1)
                
                def forward(self, x):
                    return x
                
                def get_model_info(self):
                    return {
                        'parameters': 42,
                        'trainable_parameters': 41,
                        'deep_supervision': self.cfg.model.get('deep_supervision', False),
                        'output_scales': [1, 2, 4] if self.cfg.model.get('deep_supervision', False) else [1],
                    }
            
            return MockModel(cfg)
        
        return mock_builder

# Monkey-patch the function to use our mock builder
def get_architecture_builder(arch_type):
    return MockArchitectureRegistry.get_architecture_builder(arch_type)

# Inject the function into the namespace
import sys
current_module = sys.modules[__name__]
current_module.get_architecture_builder = get_architecture_builder

# Create the configuration object
cfg = OmegaConf.create({
    'model': {
        'arch': {
            'type': 'mednext'
        },
        'in_channels': 1,
        'out_channels': 2,
        'mednext': {
            'size': 'S',
            'kernel_size': 3
        },
        'deep_supervision': True,
    }
})

ARGS = {
    'cfg': cfg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
omegaconf, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MockModel — a MockModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockModel output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_inference_model_config Ran
ran on a synthesized input
zudi-lin/pytorch_connectomics/connectomics/utils/model_outputs.py
code served (permissive licence) · get_code("352e89d233de04c8")
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 torch
import torch.nn as nn
from collections.abc import Mapping

torch.manual_seed(0)

# Test case 1: cfg is None
def test_case_1():
    return None

# Test case 2: cfg is a dict with nested inference.model
def test_case_2():
    return {
        'inference': {
            'model': {'param1': 'value1', 'param2': 42}
        }
    }

# Test case 3: cfg is a dict with inference but no model
def test_case_3():
    return {
        'inference': {'other_key': 'value'}
    }

# Test case 4: cfg is a dict with no inference key
def test_case_4():
    return {'other_key': 'value'}

# Test case 5: cfg is an object with attributes
class ConfigObject:
    def __init__(self):
        self.inference = InferenceConfig()

class InferenceConfig:
    def __init__(self):
        self.model = {'model_param': 'model_value'}

def test_case_5():
    return ConfigObject()

# Test case 6: cfg is an object with inference but inference has no model
class PartialConfigObject:
    def __init__(self):
        self.inference = {}

def test_case_6():
    return PartialConfigObject()

# Use test case 2 as the main test case - a properly nested dict
ARGS = {
    'cfg': {
        'inference': {
            'model': {'model_type': 'transformer', 'hidden_dim': 768}
        }
    }
}
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 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
get_inference_model_value Ran
ran on a synthesized input
zudi-lin/pytorch_connectomics/connectomics/utils/model_outputs.py
code served (permissive licence) · get_code("a6270047491651d8")
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 str. 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
from collections import OrderedDict

def test_setup():
    torch.manual_seed(0)
    
    # Test case 1: cfg is a dict with nested inference.model structure
    cfg_dict = {
        'inference': {
            'model': {
                'some_key': 'some_value',
                'another_key': 42
            }
        }
    }
    
    # Test case 2: cfg is an object with attributes
    class ConfigObj:
        def __init__(self):
            self.inference = InferenceConfig()
    
    class InferenceConfig:
        def __init__(self):
            self.model = ModelConfig()
    
    class ModelConfig:
        def __init__(self):
            self.some_key = 'test_value'
            self.numeric_key = 100
    
    cfg_obj = ConfigObj()
    
    # Use the dict-based config for simplicity
    cfg = cfg_dict
    key = 'some_key'
    default = 'default_value'
    
    return cfg, key, default

cfg, key, default = test_setup()

ARGS = {
    'cfg': cfg,
    'key': key,
    'default': default
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_inference_select_channel Ran
ran on a synthesized input
zudi-lin/pytorch_connectomics/connectomics/utils/model_outputs.py
code served (permissive licence) · get_code("01c9fed91822ebba")
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 str. 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
from collections import namedtuple

torch.manual_seed(0)

# The function get_inference_select_channel(cfg) only takes one parameter: cfg
# It chains through:
# 1. get_inference_model_config(cfg) which looks for cfg.inference.model
# 2. get_inference_model_value(cfg, 'select_channel', None) which looks for 
#    cfg.inference.model.select_channel

# Build a nested config structure that supports both dict-like and attribute access
class ConfigNode:
    def __init__(self, **kwargs):
        for key, value in kwargs.items():
            setattr(self, key, value)
    
    def get(self, key, default=None):
        return getattr(self, key, default)

# Create the nested config: cfg.inference.model.select_channel
model_config = ConfigNode(select_channel='output_channel_0')
inference_config = ConfigNode(model=model_config)
cfg = ConfigNode(inference=inference_config)

ARGS = {
    'cfg': cfg
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
load_external_weights Ran
ran on a synthesized input
zudi-lin/pytorch_connectomics/connectomics/training/model_weights.py
code served (permissive licence) · get_code("cbcf3e4056a34c24")
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 SimpleModel. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from pathlib import Path
import tempfile

torch.manual_seed(0)

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

# Create the model instance
model = SimpleModel()

# Create a temporary checkpoint file with valid state_dict
checkpoint_state_dict = model.state_dict()
temp_dir = tempfile.mkdtemp()
checkpoint_path = Path(temp_dir) / "checkpoint.pt"
torch.save(checkpoint_state_dict, str(checkpoint_path))

# Create a config object with required attributes
class Config:
    def __init__(self, weights_path, key_prefix=''):
        self.model = type('ModelConfig', (), {
            'external_weights_path': weights_path,
            'external_weights_key_prefix': key_prefix
        })()

cfg = Config(str(checkpoint_path), key_prefix='')

ARGS = {
    'model': model,
    'cfg': cfg
}
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 SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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

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, 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 6 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

Segmenting 3D cell nuclei from microscopy image volumes is critical for biological and clinical analysis, enabling the study of cellular expression patterns and cell lineages. However, current datasets for neuronal nuclei usually contain volumes smaller than $10^{\text{-}3}\ mm^3$ with fewer than 500 instances per volume, unable to reveal the complexity in large brain regions and restrict the investigation of neuronal structures. In this paper, we have pushed the task forward to the sub-cubic millimeter scale and curated the NucMM dataset with two fully annotated volumes: one $0.1\ mm^3$ electron microscopy (EM) volume containing nearly the entire zebrafish brain with around 170,000 nuclei; and one $0.25\ mm^3$ micro-CT (uCT) volume containing part of a mouse visual cortex with about 7,000 nuclei. With two imaging modalities and significantly increased volume size and instance numbers, we discover a great diversity of neuronal nuclei in appearance and density, introducing new challenges to the field. We also perform a statistical analysis to illustrate those challenges quantitatively. To tackle the challenges, we propose a novel hybrid-representation learning model that combines the merits of foreground mask, contour map, and signed distance transform to produce high-quality 3D masks. The benchmark comparisons on the NucMM dataset show that our proposed method significantly outperforms state-of-the-art nuclei segmentation approaches. Code and data are available at https://connectomics-bazaar.github.io/proj/nucMM/index.html.

For agents

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

get_harvested_code_for_paper("2107.05840")
get_code_for_paper("2107.05840")
have("2107.05840")

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

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

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

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

Connect an agent — have() is free.