CLAM Heatmap Visualization
Use this sub-skill when the task is to create CLAM attention heatmaps, validate a heatmap YAML/process list, configure ROI or top-k patch sampling, explain create_heatmaps.py outputs, or diagnose heatmap failures caused by checkpoint, encoder, model, or slide-input mismatches.
Route Tasks
- For heatmap YAML structure, process-list columns, model/encoder consistency, and safe preflight checks, read
references/configuration.md and run scripts/validate_heatmap_config.py.
- For end-to-end heatmap commands, the interactive
Continue? prompt, raw versus production outputs, ROI rendering, and sampled-patch outputs, read references/workflows.md.
- For checkpoint shape errors, missing UNI/CONCH settings, absent slides, ROI column problems, GPU memory issues, and heatmap rendering options, read
references/troubleshooting.md.
- For patch-coordinate generation before heatmaps, use
../wsi-preprocessing/SKILL.md.
- For pretrained encoder setup and feature-dimension choices, use
../feature-extraction/SKILL.md.
- For training checkpoints and evaluation-time model arguments, use
../training-evaluation/SKILL.md.
Key CLAM Facts
- CLAM heatmaps are produced by
create_heatmaps.py --config_file <yaml-name>, where the script resolves the config under heatmaps/configs/.
- Heatmap inference initializes a CLAM checkpoint, loads a pretrained encoder, scans slides or ROI regions with OpenSlide, computes attention scores, and writes both raw HDF5 assets and rendered production images.
- ResNet50-truncated and UNI features are 1024-dimensional; CONCH v1 features are 512-dimensional, so
model_arguments.embed_dim must match the checkpoint and encoder family.
- The bundled validator is static and safe: it checks YAML/CSV shape and consistency without loading checkpoints, WSI files, OpenSlide, PyTorch, or encoders.
1---2name: heatmap-visualization3description: "Configure, validate, run, and troubleshoot CLAM attention heatmap4 inference from trained checkpoints."5disable-model-invocation: true6metadata:7 source: https://skillmd.com/skills/vectorspacelab/heatmap-visualization8 disco-role: operating9license: GPL 3.010---1112# CLAM Heatmap Visualization1314Use this sub-skill when the task is to create CLAM attention heatmaps, validate a heatmap YAML/process list, configure ROI or top-k patch sampling, explain `create_heatmaps.py` outputs, or diagnose heatmap failures caused by checkpoint, encoder, model, or slide-input mismatches.1516## Route Tasks1718- For heatmap YAML structure, process-list columns, model/encoder consistency, and safe preflight checks, read `references/configuration.md` and run `scripts/validate_heatmap_config.py`.19- For end-to-end heatmap commands, the interactive `Continue?` prompt, raw versus production outputs, ROI rendering, and sampled-patch outputs, read `references/workflows.md`.20- For checkpoint shape errors, missing UNI/CONCH settings, absent slides, ROI column problems, GPU memory issues, and heatmap rendering options, read `references/troubleshooting.md`.21- For patch-coordinate generation before heatmaps, use `../wsi-preprocessing/SKILL.md`.22- For pretrained encoder setup and feature-dimension choices, use `../feature-extraction/SKILL.md`.23- For training checkpoints and evaluation-time model arguments, use `../training-evaluation/SKILL.md`.2425## Key CLAM Facts2627- CLAM heatmaps are produced by `create_heatmaps.py --config_file <yaml-name>`, where the script resolves the config under `heatmaps/configs/`.28- Heatmap inference initializes a CLAM checkpoint, loads a pretrained encoder, scans slides or ROI regions with OpenSlide, computes attention scores, and writes both raw HDF5 assets and rendered production images.29- ResNet50-truncated and UNI features are 1024-dimensional; CONCH v1 features are 512-dimensional, so `model_arguments.embed_dim` must match the checkpoint and encoder family.30- The bundled validator is static and safe: it checks YAML/CSV shape and consistency without loading checkpoints, WSI files, OpenSlide, PyTorch, or encoders.