domains / science / computational-pathology-wsi / pathml

pathml

Skill card

combined

The K-Dense-AI copy is the only one that provides a version-pinned, reproducible installation and a correct, minimal API workflow for PathML 3.0.8 (using HESlide and SlideData.run). The other three copies (Vibe-Skills, medical-research-skills, OpenClaw-Medical-Skills) are nearly identical to each other but contain a critical API error: they use SlideData.from_slide() and Pipeline.run(), which the K-Dense copy explicitly states do not exist in the current stable release. They also recommend pathml[all], which the K-Dense copy warns against. Because the copies disagree on the core execution steps and installation constraints, crowning one would hide a real alternative (the incorrect API usage) that an agent might follow.

Repositories

RepositoryPath
K-Dense-AI/scientific-agent-skillsskills/pathml/SKILL.md
foryourhealth111-pixel/Vibe-Skillsbundled/skills/pathml/SKILL.md
aipoch/medical-research-skillsscientific-skills/Data Analysis/pathml/SKILL.md
FreedomIntelligence/OpenClaw-Medical-Skillsskills/pathml/SKILL.md

Other copies

RoleRepositoryPath
peerK-Dense-AI/scientific-agent-skillsskills/pathml/SKILL.md
peerforyourhealth111-pixel/Vibe-Skillsbundled/skills/pathml/SKILL.md
peeraipoch/medical-research-skillsscientific-skills/Data Analysis/pathml/SKILL.md
peerFreedomIntelligence/OpenClaw-Medical-Skillsskills/pathml/SKILL.md

Combined skill

---
name: pathml
description: "Supports local computational pathology research with PathML: slide loading, preprocessing, h5path storage, multiplex quantification, and model inference. Use for whole-slide H&E, CODEX, Vectra, and HoVer-Net workflows."
license: MIT
---

# PathML

## Scope and Safety
Use PathML for local computational pathology research. It is beta research software, not a validated medical device. Do not use outputs for diagnosis or treatment. De-identify all patient data and use pseudonymous IDs before processing.

## Installation
Use Python 3.11. Install native prerequisites (OpenSlide, JDK 17) before the Python package.

```bash
uv venv --python 3.11
source .venv/bin/activate
uv pip install "pathml==3.0.8"
```

Do not use pathml[all]; the base distribution pins the required scientific stack.

## Core Workflow
PathML 3.0.8 uses slide convenience classes and SlideData.run(). It does not provide SlideData.from_slide().

```python
from pathml.core import HESlide
from pathml.preprocessing import BoxBlur, Pipeline, TissueDetectionHE

slide = HESlide("data/pseudonymous_slide.svs", backend="openslide")
pipeline = Pipeline([
    BoxBlur(kernel_size=5),
    TissueDetectionHE(mask_name="tissue", min_region_size=5000),
])

slide.run(
    pipeline,
    distributed=False,
    tile_size=512,
    tile_stride=512,
    level=0,
    tile_pad=False,
)
slide.write("derived/pseudonymous_slide.h5path")
```

## Capabilities
1. **Image Loading:** Supports 160+ formats (SVS, NDPI, DICOM, OME-TIFF). See references/image_loading.md.
2. **Preprocessing:** Composable pipelines for stain normalization, tissue detection, and QC. See references/preprocessing.md.
3. **Graph Construction:** Spatial graphs for cellular relationships. See references/graphs.md.
4. **Machine Learning:** HoVer-Net and HACTNet integration with PyTorch. See references/machine_learning.md.
5. **Multiparametric Imaging:** CODEX, Vectra, and MERFISH analysis. See references/multiparametric.md.
6. **Data Management:** HDF5 storage for tiles and features. See references/data_management.md.

## Conflicts
- **Repository:** foryourhealth111-pixel/Vibe-Skills, aipoch/medical-research-skills, FreedomIntelligence/OpenClaw-Medical-Skills
- **Conflicting Step:** These repositories use SlideData.from_slide() and pipeline.run(wsi), which are not valid in PathML 3.0.8. They also recommend pathml[all], which is not a valid extra in the current release.