by Sirada Kittipaisarnkul
Radboud University Medical Center (RadboudUMC)
This project presents a weakly supervised deep learning pipeline for the automated classification of Drug Reaction with Eosinophilia and Systemic Symptoms (DRESS) versus Morbilliform Drug Eruption (MDE) from whole slide images (WSIs). It incorporates modern Multiple Instance Learning (MIL) techniques and multi-resolution feature extraction to assist clinical diagnosis in dermatopathology.
Note: This dataset is private and cannot be redistributed.
- 231 WSIs from:
- Massachusetts General Hospital (MGH)
- Brigham and Women's Hospital (BWH)
- Ohio State University Wexner Medical Center (OSU)
- Each WSI is labeled weakly at slide level (DRESS or MDE)
Examples
DRESS WSI | MDE WSI |
---|---|
![]() |
![]() |
![]() |
![]() |
- WSIs are tiled at 10× and 20× magnification.
- TRIDENT extracts patch-level features using multiple encoders:
- UNI (2024)
- Gigapath (2024)
- Hoptim1 (internal encoder)
*Please refer to TRIDENT repository
We compare three MIL-based pipelines:
Global attention pooling on patch features. Use the same command as CLAM but change this flag to --model_type abmil
Selects top-k most informative patches using attention.
Trained per encoder, then ensembled via late fusion (product of probabilities). *Please refer to CLAM repository
Uses top-k coordinates from 10× CLAM to zoom into 20× regions.
Aggregates both magnifications using average or sum fusion.
python zoom.py \
--checkpoint_path results/CLAM_UNI_10x.pt \
--csv_path dataset_csv/dataset_split.csv \
--features_dir_10x Data/Features/UNI_10x \
--features_dir_20x Data/Features/UNI_20x \
--output_csv results/zoom_predictions.csv \
--fusion avg
Late-fusion ensemble of CLAM models from multiple encoders:
python ensemble.py \
--model_paths results/CLAM_UNI_20x.pt results/CLAM_Gigapath_20x.pt results/CLAM_Hoptim1_20x.pt \
--feature_dirs Data/Features/UNI_20x Data/Features/Gigapath_20x Data/Features/Hoptim1_20x \
--dataset_csv dataset_csv/dataset_split.csv \
--output_csv results/ensemble_predictions.csv
We use CLAM's attention scores to visualize diagnostically relevant regions in each WSI. These heatmaps help interpret model focus and support clinical validation.
- Run the CLAM model in inference mode.
- Extract attention scores from the attention pooling layer.
- Overlay the scores back onto WSI coordinates to generate a heatmap.
- Save heatmaps as image files (PNG/JPG) and raw attention scores if needed
Note:
Modify the configuration inheatmap/configs/config_template.yaml
to match your data paths and settings.