# Brats Segmentation Eval

> Evaluates the precision of brain tumor segmentation models on multi-modal MRI scans across three clinically relevant regions (Whole Tumor, Tumor Core, Enhancing Tumor). It probes the model's ability to accurately delineate heterogeneous tumor boundaries and correctly identify positive tumor voxels in medical imaging data. Use when the user wants to benchmark on BraTS2019/2020, or asks about evaluating this task. Reports Dice coefficient.

- Skill: `qhjqhj00/brats-segmentation-eval` (Agent Skill)
- Install (CLI): `npx skillmds add qhjqhj00/brats-segmentation-eval`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/brats-segmentation-eval/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: qhjqhj00 (https://skillmd.com/u/qhjqhj00)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/qhjqhj00/brats-segmentation-eval

---


# brats-segmentation-eval

> multiPI-TransBTS: A Multi-Path Learning Framework for Brain Tumor Image Segmentation Based on Multi-Physical Information — Zhu et al. (2024) (arXiv:2409.12167, 2024)

## What this evaluates

Evaluates the precision of brain tumor segmentation models on multi-modal MRI scans across three clinically relevant regions (Whole Tumor, Tumor Core, Enhancing Tumor). It probes the model's ability to accurately delineate heterogeneous tumor boundaries and correctly identify positive tumor voxels in medical imaging data.

## Datasets

- **BraTS2019/2020** — total 704; splits: train (-1), val (-1), test (-1)

## Metrics

- `Dice coefficient` **(primary)** — range: [0, 1]
  - Measures overlap between predicted segmentation and ground truth. Formula: (1/M) * sum_M [ 2 * sum_N(y_i * y_hat_i) / (sum_N(y_i^2) + sum_N(y_hat_i^2)) ], where y is ground truth, y_hat is prediction, N is pixels per sample, M is samples.
- `Hausdorff distance (HD95)` — range: other
  - The 95th percentile of the Hausdorff distance, assessing boundary alignment by focusing on worst-case discrepancies between predicted and true point sets.
- `Sensitivity` — range: [0, 1]
  - Measures the ability to correctly identify positive regions. Formula: TP / (TP + FN), where TP is true positives and FN is false negatives.

## Input / output format

**Input**: Multi-modal MRI volumes in NIfTI format (.nii.gz) with four channels: T1, T1Gd, T2, and FLAIR.

**Output**: Binary segmentation masks (0 or 1) for three anatomical regions: GD-enhancing tumor (ET), peritumoral edema (ED), and necrotic/non-enhancing tumor core (NCR/NET).

## Scoring recipe

```python
def compute_metrics(pred, gt):
    dice_scores, hd95_scores, sens_scores = [], [], []
    for p, g in zip(pred, gt):
        intersection = np.sum(p * g)
        dice_scores.append(2 * intersection / (np.sum(p) + np.sum(g) + 1e-6))
        hd95_scores.append(hd95_distance(p, g))
        tp = np.sum((p == 1) & (g == 1))
        fn = np.sum((p == 0) & (g == 1))
        sens_scores.append(tp / (tp + fn + 1e-6))
    return np.mean(dice_scores), np.percentile(hd95_scores, 95), np.mean(sens_scores)
```

## Common pitfalls

- HD95 measures boundary discrepancy at the 95th percentile, not the maximum, so it is less sensitive to extreme outliers than full HD.
- The 8:1:1 random split differs from the official BraTS challenge test set, making direct comparison with prior papers using the official split potentially invalid.
- Sensitivity only captures true positive detection and ignores false positives, so it should not be used in isolation to judge segmentation quality.

## Evidence (verbatim from paper)

> Consistent with previous research [62-64], our evaluation employs three widely recognized metrics: Dice coefficient, Hausdorff distance (HD95), and Sensitivity.

The Dice coefficient evaluates the overall accuracy of the segmentation by measuring the overlap between the predicted segmentation and the ground truth. Mathematically, it is defined as:

$$
\operatorname {D i c e} = \frac {1}{M} \sum_ {M} \frac {2 \sum_ {i = 1} ^ {N} y _ {i} \hat {y} _ {i}}{\sum_ {i = 1} ^ {N} y _ {i} ^ {2} + \sum_ {i = 1} ^ {N} \hat {y} _ {i} ^ {2}}, \tag {25}
$$

where  $\hat{y}$  represents the predicted segmentation result (0 or 1), and  $y$  is the ground truth label (0 or 1).

## Citation

```bibtex
@misc{zhu2024multipi,
  title={multiPI-TransBTS: A Multi-Path Learning Framework for Brain Tumor Image Segmentation Based on Multi-Physical Information},
  author={Zhu et al. (2024)},
  year={2024},
  note={arXiv:2409.12167}
}
```

- arXiv: 2409.12167

