本文へ移動
cccskills
無料GitHub で公開

clam

Use CLAM for weakly supervised computational pathology workflows on whole-slide images, from WSI patching through features, training, evaluation, and heatmaps.

インストール方法を見る

含まれるファイル(32)

  • SKILL.md4.9 KB
  • references/pipeline-overview.md3.5 KB
  • references/repo-provenance.md1.9 KB
  • references/repo-routing-metadata.json310 B
  • references/troubleshooting.md4.1 KB
  • scripts/clam_preflight.py2.6 KB
  • sub-skills/feature-extraction/references/encoder-reference.md2.7 KB
  • sub-skills/feature-extraction/references/legacy-pipeline.md2.0 KB
  • sub-skills/feature-extraction/references/troubleshooting.md4.0 KB
  • sub-skills/feature-extraction/references/workflows.md4.1 KB
  • sub-skills/feature-extraction/scripts/clam_feature_command_builder.py8.8 KB
  • sub-skills/feature-extraction/SKILL.md2.7 KB
  • sub-skills/heatmap-visualization/references/configuration.md7.7 KB
  • sub-skills/heatmap-visualization/references/troubleshooting.md7.7 KB
  • sub-skills/heatmap-visualization/references/workflows.md6.6 KB
  • sub-skills/heatmap-visualization/scripts/validate_heatmap_config.py24.9 KB
  • sub-skills/heatmap-visualization/SKILL.md2.1 KB
  • sub-skills/training-evaluation/references/data-formats.md4.5 KB
  • sub-skills/training-evaluation/references/evaluation-reference.md4.0 KB
  • sub-skills/training-evaluation/references/model-api.md4.0 KB
  • sub-skills/training-evaluation/references/training-reference.md4.4 KB
  • sub-skills/training-evaluation/references/troubleshooting.md5.2 KB
  • sub-skills/training-evaluation/scripts/clam_split_recipe.py8.9 KB
  • sub-skills/training-evaluation/scripts/clam_train_eval_command_builder.py13.4 KB
  • sub-skills/training-evaluation/SKILL.md3.2 KB
  • sub-skills/wsi-preprocessing/references/legacy-pipeline.md2.1 KB
  • sub-skills/wsi-preprocessing/references/parameters.md6.0 KB
  • sub-skills/wsi-preprocessing/references/troubleshooting.md3.7 KB
  • sub-skills/wsi-preprocessing/references/workflows.md5.5 KB
  • sub-skills/wsi-preprocessing/scripts/build_preset_template.py4.5 KB
  • sub-skills/wsi-preprocessing/scripts/clam_command_builder.py4.4 KB
  • sub-skills/wsi-preprocessing/SKILL.md1.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

CLAM

Use this repo skill when a task involves CLAM: data-efficient, weakly supervised computational pathology on whole-slide images with slide-level labels. CLAM workflows usually move from WSI segmentation and patch coordinates, to feature extraction, to CLAM/MIL training and evaluation, and finally to attention heatmap visualization.

Route First

  • For raw WSIs, tissue masks, patch-coordinate .h5 files, stitched QC images, process lists, or segmentation presets, read sub-skills/wsi-preprocessing/SKILL.md.
  • For ResNet50, UNI, or CONCH feature extraction into h5_files/ and pt_files/, read sub-skills/feature-extraction/SKILL.md.
  • For dataset CSVs, train/validation/test splits, main.py, eval.py, CLAM_SB/CLAM_MB/MIL choices, checkpoints, or metrics, read sub-skills/training-evaluation/SKILL.md.
  • For attention heatmaps, create_heatmaps.py, YAML/process-list validation, ROI heatmaps, sampled patches, or checkpoint visualization, read sub-skills/heatmap-visualization/SKILL.md.
  • For install/import, OpenSlide, optional encoder checkpoints, GPU/runtime, or cross-workflow failures, start with references/troubleshooting.md.

Pipeline Order

  1. Prepare WSIs with the fast coordinate pipeline: segment tissue, generate patches/<slide>.h5, and optionally create masks/stitches for QC.
  2. Extract patch features from those coordinate bags and original slides into feature h5_files/ and pt_files/.
  3. Prepare dataset CSVs and splits, then train or evaluate CLAM/MIL models against the feature root.
  4. Use trained checkpoints plus heatmap YAML configuration to render attention heatmaps and sampled high-attention patches.

Key CLAM Facts

  • CLAM is script-oriented rather than an installable Python package; public workflows run repository scripts such as create_patches_fp.py, extract_features_fp.py, main.py, eval.py, and create_heatmaps.py from a CLAM working tree or equivalent copy.
  • The documented environment targets Python 3.10 with OpenSlide, PyTorch, torchvision, timm, h5py, pandas, PyYAML, OpenCV, matplotlib, scikit-learn, scipy, tqdm, openslide-python, smooth-topk, and tensorboardX.
  • resnet50_trunc is the default encoder; uni_v1 needs UNI_CKPT_PATH; conch_v1 needs the CONCH package plus CONCH_CKPT_PATH.
  • ResNet50 and UNI features use --embed_dim 1024; CONCH features use --embed_dim 512 in training, evaluation, and heatmap configs.
  • Heavy native runs can require WSIs, OpenSlide system libraries, GPU memory, pretrained encoder checkpoints, and trained model checkpoints. Use bundled helpers for command/config preflight before launching expensive jobs.

Public Setup Check

From a CLAM working tree, follow the upstream public setup path:

conda env create -f env.yml
conda activate clam_latest

For optional CONCH feature extraction, also install the upstream CONCH package and set CONCH_CKPT_PATH; for UNI, set UNI_CKPT_PATH to the downloaded checkpoint. After setup, run this minimal source-tree import check from the CLAM working tree before launching heavy workflows:

python -c "import torch, openslide, pandas; from models.model_clam import CLAM_SB; from dataset_modules.dataset_generic import Generic_MIL_Dataset; print('CLAM import ok')"

References

  • Read references/pipeline-overview.md for a concise end-to-end map of CLAM inputs, scripts, outputs, and handoffs between sub-skills.
  • Read references/troubleshooting.md for cross-cutting install/import, OpenSlide, encoder, data-layout, GPU, and script-working-directory failures.
  • Read references/repo-provenance.md when deciding whether this skill is stale relative to the source repository.
  • references/repo-routing-metadata.json is structured metadata used by the managed repo-skills router during import.

Bundled Scripts

  • Run scripts/clam_preflight.py --help for a safe, dependency-light checklist that validates expected CLAM workflow paths and reminds agents which sub-skill owns each stage.
  • Sub-skills include deeper workflow helpers for preprocessing command generation, preset CSV creation, feature extraction command generation, split/train/eval command generation, and heatmap YAML validation.

Safety Notes

  • Do not tell a future user to rely on this generated skill's source checkout or artifact reports at runtime; use bundled references and scripts.
  • Do not run WSI processing, feature extraction, model training, checkpoint evaluation, or heatmap generation without confirming required data, checkpoints, runtime hardware, and output locations.
  • Prefer fast dry-run helpers and YAML/CSV validation before launching GPU-heavy or storage-heavy CLAM jobs.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Routes 3D ResNets PyTorch video action-recognition workflows across training, inference, and data preparation.

日本語の概要は準備中です。原文の説明を表示しています。

VectorSpaceLab/AREX-Skill3322026年9月3日 更新

3ddfa

無料

Guide 3DDFA Python inference, geometry rendering, training/evaluation, and optional C++ ONNX workflows for 3D dense face alignment.

日本語の概要は準備中です。原文の説明を表示しています。

VectorSpaceLab/AREX-Skill3322026年9月3日 更新

3ddfa-v2

無料

Routes 3DDFA_V2 face-alignment setup, still-image demos, video tracking, and ONNX benchmarking workflows.

日本語の概要は準備中です。原文の説明を表示しています。

VectorSpaceLab/AREX-Skill3322026年9月3日 更新

ab3dmot

無料

Operate AB3DMOT 3D multi-object tracking workflows for KITTI and nuScenes data, tracking, evaluation, and visualization.

日本語の概要は準備中です。原文の説明を表示しています。

VectorSpaceLab/AREX-Skill3322026年9月3日 更新

Use Hugging Face Accelerate for PyTorch training-loop migration, distributed launch/configuration, DeepSpeed/FSDP/TPU backend setup, big-model inference/offload, checkpointing, tracking, and troubleshooting.

日本語の概要は準備中です。原文の説明を表示しています。

VectorSpaceLab/AREX-Skill3322026年9月3日 更新

acme

無料

Route Acme reinforcement-learning framework tasks across core loops, replay/data, JAX agents, and TensorFlow/Sonnet agents.

日本語の概要は準備中です。原文の説明を表示しています。

VectorSpaceLab/AREX-Skill3322026年9月3日 更新

VectorSpaceLab のスキルをすべて見る

このスキルの問題を報告する