pathml
Full-featured computational pathology toolkit. Use for advanced WSI analysis including multiplexed immunofluorescence (CODEX, Vectra), nucleus segmentation, tissue graph construction, and ML model training on pathology data. Supports 160+ slide formats. For simple tile extraction from H&E slides, histolab may be simpler.
Install
mkdir -p .claude/skills/pathml && curl -L -o skill.zip "https://mcp.directory/api/skills/download/6546" && unzip -o skill.zip -d .claude/skills/pathml && rm skill.zipInstalls to .claude/skills/pathml
About this skill
PathML
Overview
PathML is a comprehensive Python toolkit for computational pathology workflows, designed to facilitate machine learning and image analysis for whole-slide pathology images. The framework provides modular, composable tools for loading diverse slide formats, preprocessing images, constructing spatial graphs, training deep learning models, and analyzing multiparametric imaging data from technologies like CODEX and multiplex immunofluorescence.
When to Use This Skill
Apply this skill for:
- Loading and processing whole-slide images (WSI) in various proprietary formats
- Preprocessing H&E stained tissue images with stain normalization
- Nucleus detection, segmentation, and classification workflows
- Building cell and tissue graphs for spatial analysis
- Training or deploying machine learning models (HoVer-Net, HACTNet) on pathology data
- Analyzing multiparametric imaging (CODEX, Vectra, MERFISH) for spatial proteomics
- Quantifying marker expression from multiplex immunofluorescence
- Managing large-scale pathology datasets with HDF5 storage
- Tile-based analysis and stitching operations
Core Capabilities
PathML provides six major capability areas documented in detail within reference files:
1. Image Loading & Formats
Load whole-slide images from 160+ proprietary formats including Aperio SVS, Hamamatsu NDPI, Leica SCN, Zeiss ZVI, DICOM, and OME-TIFF. PathML automatically handles vendor-specific formats and provides unified interfaces for accessing image pyramids, metadata, and regions of interest.
See: references/image_loading.md for supported formats, loading strategies, and working with different slide types.
2. Preprocessing Pipelines
Build modular preprocessing pipelines by composing transforms for image manipulation, quality control, stain normalization, tissue detection, and mask operations. PathML's Pipeline architecture enables reproducible, scalable preprocessing across large datasets.
Key transforms:
StainNormalizationHE- Macenko/Vahadane stain normalizationTissueDetectionHE,NucleusDetectionHE- Tissue/nucleus segmentationMedianBlur,GaussianBlur- Noise reductionLabelArtifactTileHE- Quality control for artifacts
See: references/preprocessing.md for complete transform catalog, pipeline construction, and preprocessing workflows.
3. Graph Construction
Construct spatial graphs representing cellular and tissue-level relationships. Extract features from segmented objects to create graph-based representations suitable for graph neural networks and spatial analysis.
See: references/graphs.md for graph construction methods, feature extraction, and spatial analysis workflows.
4. Machine Learning
Train and deploy deep learning models for nucleus detection, segmentation, and classification. PathML integrates PyTorch with pre-built models (HoVer-Net, HACTNet), custom DataLoaders, and ONNX support for inference.
Key models:
- HoVer-Net - Simultaneous nucleus segmentation and classification
- HACTNet - Hierarchical cell-type classification
See: references/machine_learning.md for model training, evaluation, inference workflows, and working with public datasets.
5. Multiparametric Imaging
Analyze spatial proteomics and gene expression data from CODEX, Vectra, MERFISH, and other multiplex imaging platforms. PathML provides specialized slide classes and transforms for processing multiparametric data, cell segmentation with Mesmer, and quantification workflows.
See: references/multiparametric.md for CODEX/Vectra workflows, cell segmentation, marker quantification, and integration with AnnData.
6. Data Management
Efficiently store and manage large pathology datasets using HDF5 format. PathML handles tiles, masks, metadata, and extracted features in unified storage structures optimized for machine learning workflows.
See: references/data_management.md for HDF5 integration, tile management, dataset organization, and batch processing strategies.
Quick Start
Installation
# Install PathML
uv pip install pathml
# With optional dependencies for all features
uv pip install pathml[all]
Basic Workflow Example
from pathml.core import SlideData
from pathml.preprocessing import Pipeline, StainNormalizationHE, TissueDetectionHE
# Load a whole-slide image
wsi = SlideData.from_slide("path/to/slide.svs")
# Create preprocessing pipeline
pipeline = Pipeline([
TissueDetectionHE(),
StainNormalizationHE(target='normalize', stain_estimation_method='macenko')
])
# Run pipeline
pipeline.run(wsi)
# Access processed tiles
for tile in wsi.tiles:
processed_image = tile.image
tissue_mask = tile.masks['tissue']
Common Workflows
H&E Image Analysis:
- Load WSI with appropriate slide class
- Apply tissue detection and stain normalization
- Perform nucleus detection or train segmentation models
- Extract features and build spatial graphs
- Conduct downstream analysis
Multiparametric Imaging (CODEX):
- Load CODEX slide with
CODEXSlide - Collapse multi-run channel data
- Segment cells using Mesmer model
- Quantify marker expression
- Export to AnnData for single-cell analysis
Training ML Models:
- Prepare dataset with public pathology data
- Create PyTorch DataLoader with PathML datasets
- Train HoVer-Net or custom models
- Evaluate on held-out test sets
- Deploy with ONNX for inference
References to Detailed Documentation
When working on specific tasks, refer to the appropriate reference file for comprehensive information:
- Loading images:
references/image_loading.md - Preprocessing workflows:
references/preprocessing.md - Spatial analysis:
references/graphs.md - Model training:
references/machine_learning.md - CODEX/multiplex IF:
references/multiparametric.md - Data storage:
references/data_management.md
Resources
This skill includes comprehensive reference documentation organized by capability area. Each reference file contains detailed API information, workflow examples, best practices, and troubleshooting guidance for specific PathML functionality.
references/
Documentation files providing in-depth coverage of PathML capabilities:
image_loading.md- Whole-slide image formats, loading strategies, slide classespreprocessing.md- Complete transform catalog, pipeline construction, preprocessing workflowsgraphs.md- Graph construction methods, feature extraction, spatial analysismachine_learning.md- Model architectures, training workflows, evaluation, inferencemultiparametric.md- CODEX, Vectra, multiplex IF analysis, cell segmentation, quantificationdata_management.md- HDF5 storage, tile management, batch processing, dataset organization
Load these references as needed when working on specific computational pathology tasks.
More by K-Dense-AI
View all skills by K-Dense-AI →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversFrida enables dynamic instrumentation and debugging for mobile and desktop apps, offering advanced process management an
Supercharge Android Studio workflows with AI-driven SVG conversion, live logcat, and advanced mobile dev tools for smart
Unlock AI-ready web data with Firecrawl: scrape any website, handle dynamic content, and automate web scraping for resea
Extend your developer tools with GitHub MCP Server for advanced automation, supporting GitHub Student and student packag
Serena is a free AI code generator toolkit providing robust code editing and retrieval, turning LLMs into powerful artif
Advanced MCP server enabling AI agents to autonomously run 150+ security and penetration testing tools. Covers reconnais
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.