# Brain Tumor Segmentation Eval

> Evaluates the accuracy of brain tumor segmentation algorithms on MRI images by comparing predicted tumor masks against radiologist-annotated ground truth. It probes the ability of thresholding and region-growing methods to correctly identify tumor boundaries and distinguish tumor tissue from healthy brain tissue. Use when the user wants to benchmark on Self-made Brain Tumor MRI Dataset, or asks about evaluating this task. Reports F-score.

- Skill: `qhjqhj00/brain-tumor-segmentation-eval` (Agent Skill)
- Install (CLI): `npx skillmds add qhjqhj00/brain-tumor-segmentation-eval`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/brain-tumor-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/brain-tumor-segmentation-eval

---


# brain-tumor-segmentation-eval

> Brain Tumor Segmentation: A Comparative Analysis — Qadar et al. (2015) (arXiv:1503.02466, 2015)

## What this evaluates

Evaluates the accuracy of brain tumor segmentation algorithms on MRI images by comparing predicted tumor masks against radiologist-annotated ground truth. It probes the ability of thresholding and region-growing methods to correctly identify tumor boundaries and distinguish tumor tissue from healthy brain tissue.

## Datasets

- **Self-made Brain Tumor MRI Dataset** — total 40; splits: test (40)

## Metrics

- `F-score` **(primary)** — range: [0, 1]
  - Harmonic mean of sensitivity and precision: 2 * (sensitivity * precision) / (sensitivity + precision). Higher values indicate better segmentation accuracy.
- `Sensitivity` — range: [0, 1]
  - True positive rate: TP / (TP + FN). Measures the percentage of tumor pixels correctly detected.
- `Specificity` — range: [0, 1]
  - True negative rate: TN / (TN + FP). Measures the percentage of non-tumor pixels correctly identified.
- `Precision` — range: [0, 1]
  - Positive predictive value: TP / (TP + FP). Measures the proportion of predicted tumor pixels that are actually tumor.

## Input / output format

**Input**: MRI brain images containing benign tumors.

**Output**: Binary segmentation mask indicating the tumor region of interest (ROI).

## Scoring recipe

```python
def compute_metrics(predictions, gold):
    TP = np.logical_and(predictions, gold).sum()
    FP = np.logical_and(predictions, np.logical_not(gold)).sum()
    TN = np.logical_and(np.logical_not(predictions), np.logical_not(gold)).sum()
    FN = np.logical_and(np.logical_not(predictions), gold).sum()
    sensitivity = TP / (TP + FN) if (TP + FN) > 0 else 0
    specificity = TN / (TN + FP) if (TN + FP) > 0 else 0
    precision = TP / (TP + FP) if (TP + FP) > 0 else 0
    f_score = 2 * (sensitivity * precision) / (sensitivity + precision) if (sensitivity + precision) > 0 else 0
    return f_score, sensitivity, specificity, precision
```

## Common pitfalls

- The dataset is self-made, collected from the internet and hospitals, and is not publicly available for external benchmarking.
- Only benign tumors are included, limiting generalizability to malignant or mixed tumor types.
- Performance is highly sensitive to seed point selection for region growing and threshold values for other methods, making direct comparisons dependent on careful hyperparameter tuning.

## Evidence (verbatim from paper)

> For quantitative analysis, number of false negative and false positive are calculated based on number of pixels of interested region (ROI). Four parameter true positive (TP), false positive (FP), true negative (TN), false negative (FN) are calculated by the logical AND between ground truth and segmented image. Sensitivity and specificity in terms of brain tumor region could be defined as, sensitivity is the percentage of patients correctly detected with tumor, whereas specificity is the percentage of patients could not correctly identified with tumor, and F-score measure accuracy of test, it has been reported that higher the value of F-score more accurate is the test [19], formulation as follows: $$ \text {S e n s t i v i t y} = \frac {\mathrm {T P}}{\mathrm {T P} + \mathrm {F N}} \tag {14} $$ $$ \text {S p e c i f i c i t y} = \frac {\mathrm {T N}}{\mathrm {T N} + \mathrm {F P}} \tag {15} $$ $$ P r e c i s i o n = \frac {\mathrm {T P}}{\mathrm {T P} + \mathrm {F P}} \tag {16} $$ $$ F - \text {s c o r e} = \frac {2 * (\text {s e n t i v i t y} * \text {p r e c i s i o n})}{\text {s e n t i v i t y} + \text {p r e c i s i o n}} \tag {17} $$

## Citation

```bibtex
@misc{qadar2015braintumor,
  title={Brain Tumor Segmentation: A Comparative Analysis},
  author={Qadar et al. (2015)},
  year={2015},
  note={arXiv:1503.02466}
}
```

- arXiv: 1503.02466

