Welcome to the mil4wsi Framework – your gateway to state-of-the-art Multiple Instance Learning (MIL) model implementations for gigapixel whole slide images. This comprehensive open-source repository empowers researchers, developers, and enthusiasts to explore and leverage cutting-edge MIL techniques.
conda create -n wsissl python=3.9
conda activate wsissl
conda env update --file environment.yml
This work uses CLAM to filter out background patches. After the .h5 coordinate generation, use:
- H5-to-jpg: It converts .h5 coordinates into jpg images
- Sort images: It reorganizes patches into hierarchical folders
- Dino Training: Given the patches, train dino with the
vit_small
option - Feature Extraction: It extracts patch features and adjacency matrices
- Geometric Dataset Conversion: It allows to work with graphs architectures and PyTorch geometric
- MaxPooling
- MeanPooling
- ABMIL
- DSMIL
- DASMIL
- BUFFERMIL
- TRANSMIL
- HIPT
@inproceedings{Bontempo2023,
title={{DAS-MIL: Distilling Across Scales for MIL Classification of Histological WSIs}},
author={Bontempo, Gianpaolo and Porrello, Angelo and Bolelli, Federico and Calderara, Simone and Ficarra, Elisa},
booktitle={{Medical Image Computing and Computer Assisted Intervention – MICCAI 2023}},
year={2023}
}
python main.py --datasetpath DATASETPATH --dataset [cam or lung]
DINO Camelyon16 | DINO LUNG |
---|---|
x5 ~0.65GB | x5 ~0.65GB |
x10 ~0.65GB | x10 ~0.65GB |
x20 ~0.65GB | x20 ~0.65GB |
DASMIL Camelyon16 | DASMIL LUNG |
---|---|
model ~9MB | model ~15MB |
ACC: 0.945 | ACC: 0.92 |
AUC: 0.967 | AUC: 0.966 |
Camelyon16 | LUNG |
---|---|
Dataset ~4.25GB | Dataset ~17.5GB |
setup checkpoints and datasets paths in utils/experiment.py then
python eval.py --datasetpath DATASETPATH --checkpoint CHECKPOINTPATH --dataset [cam or lung]
We encourage and welcome contributions from the community to help improve the MIL Models Framework and make it even more valuable for the entire machine-learning community.