# Histostargan Segmentation Eval

> Evaluates a unified GAN framework's ability to perform stain-invariant segmentation of glomeruli in renal histopathology. It tests generalization across multiple known staining modalities and unseen stainings, measuring how well the model maintains segmentation accuracy despite domain shifts in histological appearance. Use when the user wants to benchmark on AIDPATH & Custom PAS dataset, or asks about evaluating this task. Reports F1.

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

---


# histostargan-segmentation-eval

> HistoStarGAN: A Unified Approach to Stain Normalisation, Stain Transfer and Stain Invariant Segmentation in Renal Histopathology — Vasiljevic et al. (2022) (arXiv:2210.09798, 2022)

## What this evaluates

Evaluates a unified GAN framework's ability to perform stain-invariant segmentation of glomeruli in renal histopathology. It tests generalization across multiple known staining modalities and unseen stainings, measuring how well the model maintains segmentation accuracy despite domain shifts in histological appearance.

## Datasets

- **AIDPATH & Custom PAS dataset** — total ?; splits: test (-1)

## Metrics

- `F1` **(primary)** — range: [0, 1]
  - Harmonic mean of precision and recall: 2 * (Precision * Recall) / (Precision + Recall).
- `Precision` — range: [0, 1]
  - Ratio of true positive predictions to all positive predictions: TP / (TP + FP).
- `Recall` — range: [0, 1]
  - Ratio of true positive predictions to all actual positives: TP / (TP + FN).

## Input / output format

**Input**: 508x508 image patches cropped from 512x512 patches of whole-slide histopathology images.

**Output**: Binary segmentation mask indicating glomeruli regions.

## Scoring recipe

```python
For each patch, compute TP, FP, FN by comparing predicted mask to ground truth.
Precision = TP / (TP + FP)
Recall = TP / (TP + FN)
F1 = 2 * Precision * Recall / (Precision + Recall)
Average metrics across all test patches and report mean ± std over 3 independent training runs.
```

## Common pitfalls

- Patches are cropped from 512x512 to 508x508 before processing, which may affect boundary metrics.
- Metrics are averaged over three independent training repetitions, not just a single run.
- Results are reported per staining modality and an 'Overall' average, which may mask per-stain performance variations.

## Evidence (verbatim from paper)

> Table 1 presents the segmentation results for test WSIs from all stainings (virtually) seen during training. The model's performance is compared to UDA-GAN, which uses the same CycleGAN models for data augmentation. Since the patch size is 512 × 512, each patch is cropped to 508 × 508 during UDA-GAN training. The presented results are the averages of three independent training repetitions with corresponding standard deviations. Table 1: Quantitative results for HistoStarGAN compared to UDA-GAN. Each model is trained on annotated PAS (source staining) and tested on different (target) stainings. Standard deviations are in parentheses, the highest F1 scores for each staining are in bold.

## Citation

```bibtex
@misc{vasiljevic2022histostargan,
  title={HistoStarGAN: A Unified Approach to Stain Normalisation, Stain Transfer and Stain Invariant Segmentation in Renal Histopathology},
  author={Vasiljevic et al. (2022)},
  year={2022},
  note={arXiv:2210.09798}
}
```

- arXiv: 2210.09798

