Architecture

Architecture

How the project is put together: the external context, the two segmentations pipelines, the component responsibilities, and the data and label contract that everything else is built on.

1. Why architecture deserves its own section

On the surface this is “a segmentation repo”. In practice three independent structures are layered on top of one another, and untangling them is the main cost of onboarding:

LayerWhat it decidesWhere it lives
Data contract What a training sample is: which labels are valid, how sparse foreground is handled, and which keys a batch exposes to the model and loss. src/approach/unetbasic/data/dataset.py
Modelling The network, the auxiliary prediction heads, and the loss composition that trades off voxel accuracy against topological correctness. models/, utils/losses.py
Experiment configuration Which of the above is active, with what weights, patch size, augmentation set and schedule. configs/ + src/approach/*/configs/experiments/

The pages in this section walk each layer in turn. The single most useful thing to understand first is the data and label flow: almost every naming decision elsewhere in the codebase — label_fg_bin, label_valid, distance_unsigned — is explained by the transform chain documented there.