Skip to main content

Attention-based Multi-instance Mixed Models

Project description

MixMIL

Code for the paper: Mixed Models with Multiple Instance Learning

Accepted at AISTATS 24 as an oral presentation & Outstanding Student Paper Highlight.

Please raise an issue for questions and bug-reports.

Installation

Install with:

pip install mixmil

alternatively, if you want to include the optional experiment and test dependencies use:

pip install "mixmil[experiments,test]"

or if you want to adapt the code:

git clone https://github.com/AIH-SGML/mixmil.git
cd mixmil
pip install -e ".[experiments,test]"

To enable computations on GPU please follow the installation instructions of PyTorch and 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.

Make sure the experiments requirements are installed:

pip install "mixmil[experiments]"

Histopathology

The histopathology experiment was performed on the CAMELYON16 dataset.

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

Microscopy

The full BBBC021 dataset can be downloaded here.

Download Data

  • We make the featurized cells available at BBBC021
  • The features are stored as an AnnData object. We recommend using the scanpy package to read and process them
  • The weights of the featurizer trained with the SimCLR algorithm can be downloaded from the original GitHub repository

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}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mixmil-0.1.2.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mixmil-0.1.2-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file mixmil-0.1.2.tar.gz.

File metadata

  • Download URL: mixmil-0.1.2.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for mixmil-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c7ab8a075f9f0b59713402ddc5008d9cc1bf249f55083e99c576d2d0b4466e89
MD5 63949366bdb20b0ba0d567af36238cf1
BLAKE2b-256 28e53732e2d436e5d481f65df8053cb6b76d076c7f675fa161869d27da80fe69

See more details on using hashes here.

File details

Details for the file mixmil-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: mixmil-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for mixmil-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4441f72da79e7358d726b5170b63483f025a7111f8f3d56b5e8a81dbd96f772d
MD5 d8692402d6fee97848ea8e25337b086d
BLAKE2b-256 1ed24eade4e4c6ef57f6a427eed42f2eb2e249e89db5e001a1a4911d7a857382

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page