Image-to-Image
medvae
MedVAE / README.md
ashwinkumargb's picture
Update README.md
1d1a555 verified
metadata
license: mit
library_name: medvae
pipeline_tag: image-to-image

MedVAE

MedVAE is a family of six large-scale, generalizable 2D and 3D variational autoencoders (VAEs) designed for medical imaging. It is trained on over one million medical images across multiple anatomical regions and modalities. MedVAE autoencoders encode medical images as downsized latent representations and decode latent representations back to high-resolution images. Across diverse tasks obtained from 20 medical image datasets, we demonstrate that utilizing MedVAE latent representations in place of high-resolution images when training downstream models can lead to efficiency benefits (up to 70x improvement in throughput) while simultaneously preserving clinically-relevant features.

[πŸ’» Github] [πŸ“„ Paper]

πŸ“Œ Model Description

Total Compression Factor Channels Dimensions Modalities Anatomies Config File Model File
16 1 2D X-ray Chest, Breast (FFDM) medvae_4x1.yaml vae_4x_1c_2D.ckpt
16 3 2D X-ray Chest, Breast (FFDM) medvae_4x3.yaml vae_4x_3c_2D.ckpt
64 1 2D X-ray Chest, Breast (FFDM) medvae_8x1.yaml vae_8x_1c_2D.ckpt
64 3 2D X-ray Chest, Breast (FFDM) medvae_8x4.yaml vae_8x_4c_2D.ckpt
64 1 3D MRI, CT Whole-Body medvae_4x1.yaml vae_4x_1c_3D.ckpt
512 1 3D MRI, CT Whole-Body medvae_8x1.yaml vae_8x_1c_3D.ckpt

Note: Model weights and checkpoints are located in the model_weights folder.

⚑️ Installation

To install MedVAE, you can simply run:

pip install medvae

For an editable installation, use the following commands to clone and install this repository.

git clone https://github.com/StanfordMIMI/MedVAE.git
cd medvae
pip install -e .[dev]

πŸš€ Usage Instruction

We allow for easy-to-use CLI inference tool for compressing your high-dimensional medical images into usable latents:

medvae_inference -i INPUT_FOLDER -o OUTPUT_FOLDER -model_name MED_VAE_MODEL -modality MODALITY

πŸ“Ž Citation

If you use MedVAE, please cite the original paper:

@misc{varma2025medvaeefficientautomatedinterpretation,
      title={MedVAE: Efficient Automated Interpretation of Medical Images with Large-Scale Generalizable Autoencoders}, 
      author={Maya Varma and Ashwin Kumar and Rogier van der Sluijs and Sophie Ostmeier and Louis Blankemeier and Pierre Chambon and Christian Bluethgen and Jip Prince and Curtis Langlotz and Akshay Chaudhari},
      year={2025},
      eprint={2502.14753},
      archivePrefix={arXiv},
      primaryClass={eess.IV},
      url={https://arxiv.org/abs/2502.14753}, 
}

For questions, please place a Github Issues message.