# Spider Patch Classification Eval

> Evaluates patch-level histopathology classification across four organ types (Skin, Colorectal, Thorax, Breast). It probes a model's ability to correctly identify tissue morphologies using both a central patch and its surrounding contextual patches. Use when the user wants to benchmark on SPIDER, or asks about evaluating this task. Reports accuracy.

- Skill: `qhjqhj00/spider-patch-classification-eval` (Agent Skill)
- Install (CLI): `npx get-skill add qhjqhj00/spider-patch-classification-eval`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/spider-patch-classification-eval/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: qhjqhj00 (https://skillmd.com/u/qhjqhj00)
- Updated: 2026-11-23
- Page: https://skillmd.com/skills/qhjqhj00/spider-patch-classification-eval

---


# spider-patch-classification-eval

> SPIDER: A Comprehensive Multi-Organ Supervised Pathology Dataset and Baseline Models — Nechaev et al. (2025) (arXiv:2503.02876, 2025)

## What this evaluates

Evaluates patch-level histopathology classification across four organ types (Skin, Colorectal, Thorax, Breast). It probes a model's ability to correctly identify tissue morphologies using both a central patch and its surrounding contextual patches.

## Datasets

- **SPIDER** — total 408235; splits: train (339330), test (68905)

## Metrics

- `accuracy` **(primary)** — range: [0, 1]
  - Standard classification accuracy: the proportion of correctly predicted class labels for the central 224x224 patches out of the total test set.

## Input / output format

**Input**: A central 224×224 pixel histopathology patch at 20X magnification, accompanied by 24 surrounding context patches of the same size (forming an 1120×1120 region).

**Output**: A single predicted class label corresponding to the tissue morphology of the central patch.

## Scoring recipe

```python
correct = 0
for central_patch, context_patches, true_label in test_set:
    pred = model(central_patch, context_patches)
    if pred == true_label:
        correct += 1
return correct / len(test_set)
```

## Common pitfalls

- Data leakage if patches from the same whole slide image (WSI) are split across train and test sets; the protocol mandates a strict slide-level split.
- Ignoring the 24 context patches, which are critical for classifying ambiguous patches (e.g., distinguishing fat tissue from empty background).
- Assuming total unique patches equals central patches × 25; overlapping context patches reduce the actual unique patch count.

## Evidence (verbatim from paper)

> We provide a train-test split to ensure consistent benchmarking, but users can also merge and re-split the data as needed. The split is done at the slide level, meaning patches from the same WSI do not appear in both the training and test sets.

## Citation

```bibtex
@misc{nechaev2025spider,
  title={SPIDER: A Comprehensive Multi-Organ Supervised Pathology Dataset and Baseline Models},
  author={Nechaev et al. (2025)},
  year={2025},
  note={arXiv:2503.02876}
}
```

- arXiv: 2503.02876

