jpskill.com
🛠️ 開発・MCP コミュニティ 🔴 エンジニア向け 👤 エンジニア・AI開発者

🛠️ Pathml

pathml

病理組織のデジタル画像(WSI)を高度

⏱ ボイラープレート実装 半日 → 30分

📺 まず動画で見る(YouTube)

▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗

※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。

📜 元の英語説明(参考)

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.

🇯🇵 日本人クリエイター向け解説

一言でいうと

病理組織のデジタル画像(WSI)を高度

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o pathml.zip https://jpskill.com/download/4200.zip && unzip -o pathml.zip && rm pathml.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/4200.zip -OutFile "$d\pathml.zip"; Expand-Archive "$d\pathml.zip" -DestinationPath $d -Force; ri "$d\pathml.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して pathml.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → pathml フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-18
同梱ファイル
7

💬 こう話しかけるだけ — サンプルプロンプト

  • Pathml を使って、最小構成のサンプルコードを示して
  • Pathml の主な使い方と注意点を教えて
  • Pathml を既存プロジェクトに組み込む方法を教えて

これをClaude Code に貼るだけで、このSkillが自動発動します。

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

PathML

概要

PathMLは、計算病理ワークフローのための包括的なPythonツールキットです。これは、全スライド病理画像に対する機械学習と画像解析を容易にするように設計されています。このフレームワークは、多様なスライド形式の読み込み、画像の事前処理、空間グラフの構築、深層学習モデルのトレーニング、CODEXや多重免疫蛍光などの技術からの多変量画像データの解析のための、モジュール式で構成可能なツールを提供します。

このスキルを使用する場面

このスキルは、以下の目的で適用してください。

  • さまざまな独自の形式の全スライド画像(WSI)の読み込みと処理
  • 染色正規化によるH&E染色組織画像の事前処理
  • 核検出、セグメンテーション、分類ワークフロー
  • 空間解析のための細胞および組織グラフの構築
  • 病理データに対する機械学習モデル(HoVer-Net、HACTNet)のトレーニングまたはデプロイ
  • 空間プロテオミクスを目的とした多変量画像(CODEX、Vectra、MERFISH)の解析
  • 多重免疫蛍光からのマーカー発現の定量化
  • HDF5ストレージによる大規模病理データセットの管理
  • タイルベースの解析とスティッチング操作

コア機能

PathMLは、リファレンスファイルで詳細に文書化されている6つの主要な機能領域を提供します。

1. 画像の読み込みと形式

Aperio SVS、Hamamatsu NDPI、Leica SCN、Zeiss ZVI、DICOM、OME-TIFFを含む160以上の独自の形式から全スライド画像を読み込みます。PathMLはベンダー固有の形式を自動的に処理し、画像ピラミッド、メタデータ、関心領域にアクセスするための統一されたインターフェースを提供します。

参照: サポートされている形式、読み込み戦略、および異なるスライドタイプでの作業については、references/image_loading.mdを参照してください。

2. 前処理パイプライン

画像操作、品質管理、染色正規化、組織検出、マスク操作のための変換を構成することで、モジュール式の前処理パイプラインを構築します。PathMLのパイプラインアーキテクチャは、大規模なデータセット全体で再現性のあるスケーラブルな前処理を可能にします。

主要な変換:

  • StainNormalizationHE - Macenko/Vahadane染色正規化
  • TissueDetectionHENucleusDetectionHE - 組織/核セグメンテーション
  • MedianBlurGaussianBlur - ノイズリダクション
  • LabelArtifactTileHE - アーティファクトの品質管理

参照: 完全な変換カタログ、パイプライン構築、および前処理ワークフローについては、references/preprocessing.mdを参照してください。

3. グラフ構築

細胞レベルおよび組織レベルの関係を表す空間グラフを構築します。セグメント化されたオブジェクトから特徴を抽出し、グラフニューラルネットワークや空間解析に適したグラフベースの表現を作成します。

参照: グラフ構築方法、特徴抽出、および空間解析ワークフローについては、references/graphs.mdを参照してください。

4. 機械学習

核検出、セグメンテーション、分類のための深層学習モデルをトレーニングおよびデプロイします。PathMLは、PyTorchを事前構築済みモデル(HoVer-Net、HACTNet)、カスタムDataLoaders、および推論のためのONNXサポートと統合しています。

主要なモデル:

  • HoVer-Net - 同時核セグメンテーションと分類
  • HACTNet - 階層的細胞型分類

参照: モデルトレーニング、評価、推論ワークフロー、および公開データセットでの作業については、references/machine_learning.mdを参照してください。

5. 多変量イメージング

CODEX、Vectra、MERFISH、およびその他の多重イメージングプラットフォームからの空間プロテオミクスおよび遺伝子発現データを解析します。PathMLは、多変量データの処理、Mesmerによる細胞セグメンテーション、および定量化ワークフローのための特殊なスライドクラスと変換を提供します。

参照: CODEX/Vectraワークフロー、細胞セグメンテーション、マーカー定量化、およびAnnDataとの統合については、references/multiparametric.mdを参照してください。

6. データ管理

HDF5形式を使用して、大規模な病理データセットを効率的に保存および管理します。PathMLは、機械学習ワークフロー用に最適化された統一されたストレージ構造で、タイル、マスク、メタデータ、および抽出された特徴を処理します。

参照: HDF5統合、タイル管理、データセット編成、およびバッチ処理戦略については、references/data_management.mdを参照してください。

クイックスタート

インストール

# 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画像解析:

  1. 適切なスライドクラスでWSIを読み込む
  2. 組織検出と染色正規化を適用する
  3. 核検出を実行するか、セグメンテーションモデルをトレーニングする
  4. 特徴を抽出し、空間グラフを構築する
  5. ダウンストリーム解析を実施する

多変量イメージング(CODEX):

  1. CODEXSlideでCODEXスライドを読み込む
  2. マルチランチャネルデータを結合する
  3. Mesmerモデルを使用して細胞をセグメント化する
  4. マーカー発現を定量化する
  5. シングルセル解析のためにAnnDataにエクスポートする

MLモデルのトレーニング:

  1. 公開病理データでデータセットを準備する
  2. PathMLデータセットでPyTorch DataLoaderを作成する
  3. HoVer-Netまたはカスタムモデルをトレーニングする
  4. ホールドアウトテストセットで評価する
  5. 推論のためにONNXでデプロイする

詳細なドキュメントへの参照

特定のタスクに取り組む際は、包括的な情報については適切なリファレンスファイルを参照してください。

  • 画像の読み込み: references/image_loading.md
  • 前処理ワークフロー: references/preprocessing.md
  • 空間解析: references/graphs.md
  • モデルトレーニング: references/machine_learning.md
  • CODEX/多重IF: references/multiparametric.md
  • データストレージ: references/data_management.md

リソース

このスキルにはcompが含まれています。

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

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 normalization
  • TissueDetectionHE, NucleusDetectionHE - Tissue/nucleus segmentation
  • MedianBlur, GaussianBlur - Noise reduction
  • LabelArtifactTileHE - 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:

  1. Load WSI with appropriate slide class
  2. Apply tissue detection and stain normalization
  3. Perform nucleus detection or train segmentation models
  4. Extract features and build spatial graphs
  5. Conduct downstream analysis

Multiparametric Imaging (CODEX):

  1. Load CODEX slide with CODEXSlide
  2. Collapse multi-run channel data
  3. Segment cells using Mesmer model
  4. Quantify marker expression
  5. Export to AnnData for single-cell analysis

Training ML Models:

  1. Prepare dataset with public pathology data
  2. Create PyTorch DataLoader with PathML datasets
  3. Train HoVer-Net or custom models
  4. Evaluate on held-out test sets
  5. 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 classes
  • preprocessing.md - Complete transform catalog, pipeline construction, preprocessing workflows
  • graphs.md - Graph construction methods, feature extraction, spatial analysis
  • machine_learning.md - Model architectures, training workflows, evaluation, inference
  • multiparametric.md - CODEX, Vectra, multiplex IF analysis, cell segmentation, quantification
  • data_management.md - HDF5 storage, tile management, batch processing, dataset organization

Load these references as needed when working on specific computational pathology tasks.

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。