File size: 3,447 Bytes
69ec760 9716da7 69ec760 9716da7 69ec760 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | ---
license: other
license_name: topbrain-research-use
tags:
- medical
- image-segmentation
- nnunet
- angiography
pipeline_tag: image-segmentation
library_name: topbrain-infer
---
# ToPBrain TA36 — cerebral artery segmentation
36-class segmentation of the cerebral arteries from CT angiography or MR angiography / TOF.
nnU-Net v2, ResEnc-L encoder, 5-fold ensemble per modality.
Run these weights with **[topbrain-infer](https://github.com/ignacio-ms/topbrain)**, which applies the
preprocessing below for you:
```bash
pip install git+https://github.com/ignacio-ms/topbrain
topbrain-infer -i scan.nii.gz -o out/ --hf-repo THIS/REPO
```
## Models
| Directory | Modality | Input channels | Folds | Checkpoint |
|---|---|---|---|---|
| `Dataset507_TopBrainTA36CT` | CT | 2 | 5 | `checkpoint_best.pth` |
| `Dataset508_TopBrainTA36MR` | MR | 1 | 5 | `checkpoint_final.pth` |
## Preprocessing — required, and not recoverable from the weights
Both models were trained on volumes already mapped onto `[0, 1]`, and nnU-Net's own
normalisation is calibrated on that result. **Feeding raw Hounsfield units or raw TOF units
produces a confident, wrong segmentation rather than an error.**
**CT — two input channels**, the same volume windowed twice:
| Channel | Window | Purpose |
|---|---|---|
| `_0000` | `-100` to `1500` HU, clipped, mapped to `[0, 1]` | Wide anatomical context |
| `_0001` | `300` to `600` HU, clipped, mapped to `[0, 1]` | Narrow window on the contrast-filled lumen |
**MR / TOF — one input channel**: percentiles `0.5` and
`99.5`, measured **per volume** over **non-zero voxels only**, mapped onto
`[0, 1]`. Per-volume because MR units are arbitrary; non-zero only because TOF stores air as
exactly 0 over most of the field of view, which would otherwise pin the low percentile at 0.
Test-time augmentation is off: `inference_allowed_mirroring_axes` is `null` in every checkpoint,
because the classes are lateralised and mirroring would average `R-ICA` with `L-ICA`.
## Labels
36 foreground classes, identical for both models. `0` is background. `R-`/`L-` are
the **patient's** right and left; the internal carotid is split into supraclinoid (4 / 6) and
infraclinoid (35 / 36) segments.
| | | | | | |
|---|---|---|---|---|---|
| 1 BA | 2 R-P1P2 | 3 L-P1P2 | 4 R-ICA-C6-C7 | 5 R-M1 | 6 L-ICA-C6-C7 |
| 7 L-M1 | 8 R-Pcom | 9 L-Pcom | 10 Acom | 11 R-A1A2 | 12 L-A1A2 |
| 13 R-A3 | 14 L-A3 | 15 3rd-A2 | 16 3rd-A3 | 17 R-M2 | 18 R-M3 |
| 19 L-M2 | 20 L-M3 | 21 R-P3P4 | 22 L-P3P4 | 23 R-VA | 24 L-VA |
| 25 R-SCA | 26 L-SCA | 27 R-AICA | 28 L-AICA | 29 R-PICA | 30 L-PICA |
| 31 R-AChA | 32 L-AChA | 33 R-OA | 34 L-OA | 35 R-ICA-C1-C5 | 36 L-ICA-C1-C5 |
## What is in these files
Checkpoints are stripped to what inference reads — `network_weights`, `trainer_name`,
`init_args['configuration']`, `inference_allowed_mirroring_axes` — which halves them from 820 MB
to 410 MB per fold. Predictions are bit-identical to the training checkpoints. Optimizer state,
training logs, and per-case validation outputs are **not** included.
## Intended use and limitations
Research use only. **Not a medical device and not for clinical decision-making.** Trained on
research angiography cohorts; behaviour on scanners, contrast protocols, pathology or age groups
outside those cohorts is unvalidated. The rarer distal and cerebellar classes are the least
reliable. Always inspect the output before relying on it.
|