pathml

Convert whole-slide pathology images into structured inputs for segmentation and machine learning.

Updated May 24, 2026
One-click install
npx skills add https://github.com/Estrella-231/Mathematical_modeling_tongmeng --skill pathml-estrella-231
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pathml
Source: https://github.com/Estrella-231/Mathematical_modeling_tongmeng/tree/main/.agents/skills/pathml
Command: npx skills add https://github.com/Estrella-231/Mathematical_modeling_tongmeng --skill pathml-estrella-231

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

PathML removes the friction of turning raw whole-slide pathology images (including large vendor-specific formats) into clean, structured inputs for segmentation, graph-based spatial analysis, and machine learning.

Core Features & Use Cases

  • Load 160+ WSI formats: Read slides via unified interfaces, including pyramids, metadata, and ROI/tile access for formats like SVS, NDPI, SCN, ZVI, DICOM, and OME-TIFF.
  • Build reproducible preprocessing pipelines: Compose transforms for tissue detection, nucleus detection, stain normalization (H&E), artifact/white-space labeling, denoising, and mask generation.
  • Create spatial and cell graphs: Convert segmentation into cell/tissue/spatial omics graphs with configurable connectivity (knn/radius/delaunay/contact) and rich node/edge features.
  • Train and run pathology ML models: Use PyTorch-integrated workflows and prebuilt nucleus models (e.g., HoVer-Net, HACTNet), including tile-based inference and ONNX deployment support.
  • Handle multiparametric imaging (CODEX/Vectra/MERFISH): Collapse multiplex runs, segment cells with DeepCell Mesmer, and quantify marker expression into AnnData for downstream analysis.
  • Store large outputs efficiently: Persist tiles, masks, features, and metadata using HDF5 for fast random access and scalable batch processing.

Quick Start

Use the pathml skill to load a slide and create a preprocessing pipeline that performs tissue detection, then H&E stain normalization, then nucleus detection on tile level for downstream modeling.

Frequently Asked Questions about pathml

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert whole-slide imaging formats like SVS or NDPI into structured data for machine learning?

Whole-slide imaging formats like SVS and NDPI are converted into structured data using unified WSI loaders that extract tiles, pyramids, and metadata for machine learning preprocessing. This process transforms raw pathology slides into clean computational inputs for segmentation and modeling.

How do I build a reproducible H&E stain normalization and nucleus detection pipeline?

A reproducible H&E stain normalization and nucleus detection pipeline is built by composing preprocessing transforms for tissue detection, stain normalization, and mask generation. These composable pipelines ensure consistent preprocessing outputs for downstream analysis.

Can I process multiparametric CODEX, Vectra, or MERFISH imaging for spatial graph analysis?

Multiparametric CODEX, Vectra, and MERFISH imaging can be processed for spatial graph analysis by collapsing multiplex runs and segmenting cells. Marker expression is quantified into AnnData to support configurable spatial omics graph construction with knn, radius, or delaunay connectivity.

Does this pathology ML workflow support PyTorch models and ONNX deployment?

The pathology ML workflow supports PyTorch-integrated training and prebuilt nucleus models like HoVer-Net for tile-based inference. It also includes ONNX deployment support to operationalize trained segmentation models within computational pathology pipelines.

What is the best way to manage large pathology tiles and masks for scalable batch processing?

Large pathology tiles and masks are managed for scalable batch processing using HDF5-backed storage. This approach persists tiles, masks, features, and metadata to enable fast random access and reproducible analytics across extensive whole-slide imaging datasets.

How do spatial graphs work for cell and tissue segmentation in pathology analysis?

Spatial graphs for cell and tissue segmentation work by converting segmentation masks into graph structures with configurable connectivity like knn, radius, or contact. These graphs include rich node and edge features for spatial omics modeling and downstream machine learning analysis.