Examples
Here you can find a collection of examples that demonstrate how to use torchmil in practice.
- Representing data in torchmil: we explain how data is represented in torchmil. We cover bags, instances, graphs, mini-batching, and more.
- Datasets in torchmil: we explain how datasets are implemented in torchmil. We cover processed datasets vs non-processed datasets, and how to create your own dataset.
- Training your first MIL model: we show how to train a simple attention-based MIL model with a toy dataset.
- WSI classification in torchmil: we show how to train an attention-based MIL model with WSI data.
- CT scan classification in torchmil: we show how to train a transformer-based MIL model with CT scan data.
- Integrating torchmil with Graph Neural Networks (GNNs) frameworks: we show how to integrate torchmil with GNNs frameworks like PyTorch Geometric and Deep Graph Library (DGL).
- Shifted Mean MIL Dataset: we demonstrate how to use the
ShiftedMeanMILDatasetto create a synthetic dataset for experimenting with MIL models.