pathml by davila7/claude-code-templates
npx skills add https://github.com/davila7/claude-code-templates --skill pathmlPathML 是一个用于计算病理学工作流程的综合性 Python 工具包,旨在促进全切片病理图像的机器学习和图像分析。该框架提供模块化、可组合的工具,用于加载各种切片格式、预处理图像、构建空间图、训练深度学习模型,以及分析来自 CODEX 和多重免疫荧光等技术的多参数成像数据。
在以下场景中应用此技能:
PathML 提供六大主要功能领域,详细信息记录在参考文件中:
从 160 多种专有格式加载全切片图像,包括 Aperio SVS、Hamamatsu NDPI、Leica SCN、Zeiss ZVI、DICOM 和 OME-TIFF。PathML 自动处理供应商特定格式,并提供统一的接口来访问图像金字塔、元数据和感兴趣区域。
参见: references/image_loading.md 了解支持的格式、加载策略以及处理不同类型的切片。
通过组合用于图像处理、质量控制、染色归一化、组织检测和掩码操作的变换,构建模块化预处理流水线。PathML 的 Pipeline 架构支持跨大型数据集进行可重复、可扩展的预处理。
关键变换:
StainNormalizationHE - Macenko/Vahadane 染色归一化TissueDetectionHE, - 组织/细胞核分割广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
NucleusDetectionHEMedianBlur, GaussianBlur - 降噪LabelArtifactTileHE - 伪影质量控制参见: references/preprocessing.md 获取完整的变换目录、流水线构建和预处理工作流程。
构建表示细胞和组织层面关系的空间图。从分割对象中提取特征,创建适用于图神经网络和空间分析的基于图的表示。
参见: references/graphs.md 了解图构建方法、特征提取和空间分析工作流程。
训练和部署用于细胞核检测、分割和分类的深度学习模型。PathML 将 PyTorch 与预构建模型、自定义 DataLoader 以及用于推理的 ONNX 支持集成在一起。
关键模型:
参见: references/machine_learning.md 了解模型训练、评估、推理工作流程以及使用公共数据集。
分析来自 CODEX、Vectra、MERFISH 和其他多重成像平台的空间蛋白质组学和基因表达数据。PathML 提供专门的切片类和变换,用于处理多参数数据、使用 Mesmer 进行细胞分割以及量化工作流程。
参见: references/multiparametric.md 了解 CODEX/Vectra 工作流程、细胞分割、标记物量化以及与 AnnData 的集成。
使用 HDF5 格式高效存储和管理大型病理数据集。PathML 在针对机器学习工作流程优化的统一存储结构中处理图块、掩码、元数据和提取的特征。
参见: references/data_management.md 了解 HDF5 集成、图块管理、数据集组织和批处理策略。
# 安装 PathML
uv pip install pathml
# 安装包含所有功能的可选依赖项
uv pip install pathml[all]
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)
# 访问处理后的图块
for tile in wsi.tiles:
processed_image = tile.image
tissue_mask = tile.masks['tissue']
H&E 图像分析:
多参数成像:
CODEXSlide 加载 CODEX 切片训练 ML 模型:
处理特定任务时,请参考相应的参考文件以获取全面信息:
references/image_loading.mdreferences/preprocessing.mdreferences/graphs.mdreferences/machine_learning.mdreferences/multiparametric.mdreferences/data_management.md此技能包含按功能领域组织的全面参考文档。每个参考文件都包含详细的 API 信息、工作流程示例、最佳实践以及针对特定 PathML 功能的故障排除指南。
提供 PathML 功能深入介绍的文档文件:
image_loading.md - 全切片图像格式、加载策略、切片类preprocessing.md - 完整的变换目录、流水线构建、预处理工作流程graphs.md - 图构建方法、特征提取、空间分析machine_learning.md - 模型架构、训练工作流程、评估、推理multiparametric.md - CODEX、Vectra、多重免疫荧光分析、细胞分割、量化data_management.md - HDF5 存储、图块管理、批处理、数据集组织在处理特定的计算病理学任务时,根据需要加载这些参考资料。
每周安装次数
133
代码仓库
GitHub 星标数
23.4K
首次出现
2026 年 1 月 21 日
安全审计
安装于
claude-code119
opencode109
cursor105
gemini-cli105
antigravity102
codex94
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.
Apply this skill for:
PathML provides six major capability areas documented in detail within reference files:
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.
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 artifactsSee: references/preprocessing.md for complete transform catalog, pipeline construction, and preprocessing workflows.
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.
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:
See: references/machine_learning.md for model training, evaluation, inference workflows, and working with public datasets.
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.
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.
# Install PathML
uv pip install pathml
# With optional dependencies for all features
uv pip install pathml[all]
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']
H &E Image Analysis:
Multiparametric Imaging (CODEX):
CODEXSlideTraining ML Models:
When working on specific tasks, refer to the appropriate reference file for comprehensive information:
references/image_loading.mdreferences/preprocessing.mdreferences/graphs.mdreferences/machine_learning.mdreferences/multiparametric.mdreferences/data_management.mdThis 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.
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 organizationLoad these references as needed when working on specific computational pathology tasks.
Weekly Installs
133
Repository
GitHub Stars
23.4K
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code119
opencode109
cursor105
gemini-cli105
antigravity102
codex94
AI 代码实施计划编写技能 | 自动化开发任务分解与 TDD 流程规划工具
47,700 周安装