pathml

Load whole-slide images, preprocess, and construct spatial graphs for pathology.

Updated Dec 17, 2025
One-click install
npx skills add https://github.com/robotlearning123/claude-scientific-skills --skill pathml-robotlearning123
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pathml
Source: https://github.com/robotlearning123/claude-scientific-skills/tree/main/scientific-skills/pathml
Command: npx skills add https://github.com/robotlearning123/claude-scientific-skills --skill pathml-robotlearning123

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pathml, numpy, scipy, torch, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill solves complex computational pathology challenges, enabling efficient analysis of whole-slide images and multiparametric imaging data.

Core Features & Use Cases

  • Whole-Slide Image Analysis: Load and process WSI in various formats with automatic image pyramid handling.
  • Preprocessing: Build and execute preprocessing pipelines for image manipulation, quality control, and stain normalization.
  • Graph Construction: Construct spatial graphs for cell and tissue-level analysis.
  • Machine Learning: Train and deploy machine learning models for nucleus detection, segmentation, and classification.
  • Multiparametric Imaging: Analyze spatial proteomics and gene expression data from CODEX, Vectra, and MERFISH platforms.
  • Data Management: Efficiently store and manage large pathology datasets using HDF5 storage.
  • Use Case: If you need to process a large collection of histopathology slides for cancer research, PathML can help you efficiently segment nuclei, analyze tissue structure, and train machine learning models on your data.

Quick Start

Install PathML using the command: uv pip install pathml. Then, load a whole-slide image and preprocess it using the following code:

from pathml.core import SlideData
from pathml.preprocessing import Pipeline, StainNormalizationHE, TissueDetectionHE

wsi = SlideData.from_slide("path/to/slide.svs")
pipeline = Pipeline([
    TissueDetectionHE(),
    StainNormalizationHE(target='normalize', stain_estimation_method='macenko')
])
pipeline.run(wsi)

Frequently Asked Questions about pathml

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

FAQPage Schema
How do I load and preprocess whole-slide images for computational pathology?

Whole-slide image analysis involves loading various slide formats, automatic image pyramid handling, and executing preprocessing pipelines for quality control and stain normalization to prepare tissue samples for computational pathology workflows.

Can I train deep learning models for nucleus detection and tissue segmentation using Python?

Yes, you can train and deploy deep learning models for nucleus detection, segmentation, and classification by integrating computational pathology toolkits with PyTorch and other machine learning frameworks in Python.

What is the best way to construct spatial graphs for cell-level analysis from histopathology slides?

Construct spatial graphs for cell-level analysis from histopathology slides by using computational pathology toolkits that extract cellular features from preprocessed whole-slide images and map tissue-level spatial relationships into graph structures.

Does this computational pathology toolkit support multiparametric imaging platforms like CODEX and MERFISH?

Yes, this computational pathology toolkit supports multiparametric imaging platforms like CODEX, Vectra, and MERFISH, enabling the analysis of spatial proteomics and gene expression data alongside standard whole-slide histopathology images.

Do I need PyTorch and specialized Python libraries to run whole-slide image preprocessing pipelines?

Yes, you need PyTorch, NumPy, SciPy, and the specialized PathML Python library to run whole-slide image preprocessing pipelines, as these provide the deep learning and scientific computing dependencies required for tissue detection and stain normalization.

How do I manage large pathology datasets efficiently during whole-slide image analysis?

Manage large pathology datasets efficiently during whole-slide image analysis by utilizing HDF5 storage, which allows you to store and manage large collections of histopathology slides and multiparametric imaging data while preventing memory bottlenecks during pipeline execution.

Related Skills