lingxitong/MIL_BASELINE
A library that integrates different MIL methods into a unified framework
What it solves
Computational pathology involves analyzing pathological images that are often too large (hundreds of billions of pixels) for traditional image analysis methods. This project provides a unified, standardized library for Multiple Instance Learning (MIL), which is the primary paradigm used to handle these massive images. It solves the problem of fragmented frameworks and inconsistent structures across different MIL methods, making research and reproducibility easier.
How it works
The library integrates a wide variety of MIL architectures into a single framework. It separates the workflow into distinct stages:
- Feature Extraction: It supports various backbones (like ResNet50, ViT-S, and specialized pathology models like UNI and Virchow) to convert large images into feature vectors.
- Dataset Management: It uses a uniform CSV interface for dataset definitions and provides multiple scripts for splitting data into training, validation, and test sets (including K-fold options).
- Model Training: Users configure models via YAML files and run a standardized training script (
train_mil.py) and testing script (test_mil.py). - Visualization: It includes tools to generate t-SNE dimensionality reduction maps and attention heatmaps to interpret model decisions.
Who it’s for
Researchers and practitioners in computational pathology who need a standardized baseline to implement, compare, and evaluate different Multiple Instance Learning models on whole-slide images (WSIs).
Highlights
- Extensive Model Zoo: Implements a vast array of MIL networks, including AB-MIL, CLAM, TransMIL, and the latest Mamba-based and Graph-based architectures.
- Unified Interface: Standardizes how datasets are loaded and how models are configured, allowing for easy swapping of different MIL methods.
- Comprehensive Metrics: Built-in support for AUC, F1, Accuracy, Balanced Accuracy, and Kappa scores.
- Foundation Model Integration: Supports feature extraction using state-of-the-art pathology foundation models like GigaPath and CONCH.
Related
- Project
- Project
- Project
- Project
- Project