# Medflowseg Eval

> Evaluates medical image segmentation accuracy across diverse imaging modalities (MRI, fundus, histology, ultrasound). Probes the model's ability to delineate anatomical structures and refine boundaries using a deterministic flow-matching framework. Use when the user wants to benchmark on ACDC, BraTS-2021, REFUGE-2, GlaS, CAMUS, or asks about evaluating this task. Reports Dice.

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

---


# medflowseg-eval

> MedFlowSeg: Flow Matching for Medical Image Segmentation with Frequency-Aware Attention — Chen et al. (2026) (arXiv:2604.19675, 2026)

## What this evaluates

Evaluates medical image segmentation accuracy across diverse imaging modalities (MRI, fundus, histology, ultrasound). Probes the model's ability to delineate anatomical structures and refine boundaries using a deterministic flow-matching framework.

## Datasets

- **ACDC** — total ?; splits: test (-1)
- **BraTS-2021** — total ?; splits: test (-1)
- **REFUGE-2** — total ?; splits: test (-1)
- **GlaS** — total ?; splits: test (-1)
- **CAMUS** — total ?; splits: test (-1)

## Metrics

- `Dice` **(primary)** — range: [0, 1]
  - Dice Similarity Coefficient: 2 * |A ∩ B| / (|A| + |B|), where A and B are the prediction and ground truth masks.
- `IoU` — range: [0, 1]
  - Intersection over Union: |A ∩ B| / |A ∪ B|, measuring the overlap ratio between prediction and ground truth.
- `HD95` — range: other
  - 95th percentile of the Hausdorff Distance between the prediction and ground truth boundary sets. Lower values indicate better boundary alignment.

## Input / output format

**Input**: 2D medical images uniformly resized to 256×256 pixels.

**Output**: Segmentation masks (multi-class or binary) matching the 256×256 input resolution.

## Scoring recipe

```python
def compute_metrics(pred_mask, gt_mask):
    intersection = np.sum(pred_mask & gt_mask)
    dice = 2 * intersection / (np.sum(pred_mask) + np.sum(gt_mask))
    iou = intersection / np.sum((pred_mask | gt_mask))
    hd95 = np.percentile(hausdorff_distance(pred_mask, gt_mask), 95)
    return dice, iou, hd95
```

## Common pitfalls

- Uses STAPLE ensemble fusion over 10 stochastic runs instead of a single deterministic pass, which inflates apparent performance if not replicated.
- HD95 is a distance metric where lower values indicate better performance, opposite to Dice and IoU.
- All images are uniformly resized to 256×256, which may alter aspect ratios or lose fine anatomical details in original scans.

## Evidence (verbatim from paper)

> Segmentation performance was assessed using Dice, IoU, and HD95. Higher Dice and IoU values, together with lower HD95 values, indicate better agreement with the ground truth. ... For each case, the model was run 10 times to generate an ensemble of segmentation samples, which were subsequently fused using the STAPLE algorithm

## Citation

```bibtex
@misc{chen2026medflowseg,
  title={MedFlowSeg: Flow Matching for Medical Image Segmentation with Frequency-Aware Attention},
  author={Chen et al. (2026)},
  year={2026},
  note={arXiv:2604.19675}
}
```

- arXiv: 2604.19675

