Skip to content

Commit

Permalink
v0.1.0 Add model and experiments (Simulation & Histopathology) (#3)
Browse files Browse the repository at this point in the history
- Add model
- Add simulation and histopathology experiments
- Push package to pypi
  • Loading branch information
jan-engelmann authored Dec 12, 2023
1 parent 82500f8 commit 8a2ccd3
Show file tree
Hide file tree
Showing 16 changed files with 1,706 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,7 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

.DS_Store
data
*.out
40 changes: 39 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,40 @@
# MixMIL
Code coming soon.
Code for the paper: [Attention-based Multi-instance Mixed Models](https://arxiv.org/abs/2311.02455)

Please raise an issue for questions and bug-reports.
## Installation
Install with:
```
pip install mixmil
```
or if you want to adapt the code:
```
git clone https://github.com/AIH-SGML/mixmil.git
cd mixmil
pip install -e .
```
To enable computations on GPU please follow the installation instructions of [PyTorch](https://pytorch.org/) and [PyTorch Scatter](https://github.com/rusty1s/pytorch_scatter).
MixMIL works e.g. with PyTorch 2.1.
## Experiments
See the notebooks in the `experiments` folder for examples on how to run the simulation and histopathology experiments.

### Histopathology
Install `anndata` (`pip install anndata`) to run the notebook.

#### Download Data
To download the embeddings provided by the DSMIL authors, either:
- Full embeddings: `python scripts/dsmil_data_download.py`
- PCA reduced embeddings: [Google Drive](https://drive.google.com/drive/folders/1X9ho1_W5ixyHSw_2hCfQsBb5nzkjMviA?usp=sharing)


## Citation
```
@misc{engelmann2023attentionbased,
title={Attention-based Multi-instance Mixed Models},
author={Jan P. Engelmann and Alessandro Palma and Jakub M. Tomczak and Fabian J Theis and Francesco Paolo Casale},
year={2023},
eprint={2311.02455},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
```
Loading

0 comments on commit 8a2ccd3

Please sign in to comment.