Skip to main content

Merlin: A Vision Language Foundation Model for 3D Computed Tomography

Project description

Merlin: A Computed Tomography Vision–Language Foundation Model and Dataset

Nature Paper    arXiv    Hugging Face    Merlin Dataset    Watch the Talk on YouTube

Merlin is a 3D VLM for computed tomography that leverages both structured electronic health records (EHR) and unstructured radiology reports for pretraining. (Nature 2026)

Key Graphic

⚡️ Installation

To install Merlin, you can simply run:

pip install merlin-vlm

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

conda create --name merlin python==3.10
conda activate merlin

git clone https://github.com/StanfordMIMI/Merlin.git
cd Merlin
pip install -e .

# Alternatively, to install exact package versions as tested:
# uv sync

🚀 Inference with Merlin

To create a Merlin model with both image and text embeddings enabled, use the following:

from merlin import Merlin

model = Merlin()

To initialize the model with only image embeddings active, use:

from merlin import Merlin

model = Merlin(ImageEmbedding=True)

To initialize the model for phenotype classification, use:

from merlin import Merlin

model = Merlin(PhenotypeCls=True)

To initialize the model for five-year disease prediction, use:

from merlin import Merlin

model = Merlin(FiveYearPred=True)

To initialize the model for radiology report generation, use:

from merlin import Merlin

model = Merlin(RadiologyReport=True)

For inference on a demo CT scan, please check out the general demo and report generation demo.

For additional information, please read the inference documentation and report generation documentation.

For segmentation, we integrated Merlin with nnU-Net framework. Please refer to the Merlin segmentation repository and its README for detailed setup and inference instructions.

📂 Merlin Abdominal CT Dataset

We are excited to release the Merlin Abdominal CT Dataset to the community!

For details on accessing and using the dataset, please see the download documentation!

📎 Citation

If you find this repository useful for your work, please cite the cite the Nature paper:

@article{blankemeier_kumar2026merlin,
  author = {Blankemeier, Louis and Kumar, Ashwin and Cohen, Joseph Paul and Liu, Jiaming and Liu, Longchao and Van Veen, Dave and Gardezi, Syed Jamal Safdar and Yu, Hongkun and Paschali, Magdalini and Chen, Zhihong and Delbrouck, Jean-Benoit and Reis, Eduardo and Holland, Robbie and Truyts, Cesar and Bluethgen, Christian and Wu, Yufu and Lian, Long and Jensen, Malte Engmann Kjeldskov and Ostmeier, Sophie and Varma, Maya and Valanarasu, Jeya Maria Jose and Fang, Zhongnan and Huo, Zepeng and Nabulsi, Zaid and Ardila, Diego and Weng, Wei-Hung and Amaro Junior, Edson and Ahuja, Neera and Fries, Jason and Shah, Nigam H. and Zaharchuk, Greg and Willis, Marc and Yala, Adam and Johnston, Andrew and Boutin, Robert D. and Wentland, Andrew and Langlotz, Curtis P. and Hom, Jason and Gatidis, Sergios and Chaudhari, Akshay S.},
  title   = {Merlin: a computed tomography vision-language foundation model and dataset},
  journal = {Nature},
  year    = {2026},
  doi     = {10.1038/s41586-026-10181-8},
  url     = {https://doi.org/10.1038/s41586-026-10181-8}
}

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

merlin_vlm-0.0.7.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

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

merlin_vlm-0.0.7-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file merlin_vlm-0.0.7.tar.gz.

File metadata

  • Download URL: merlin_vlm-0.0.7.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.0 CPython/3.10.14

File hashes

Hashes for merlin_vlm-0.0.7.tar.gz
Algorithm Hash digest
SHA256 99538a90ce4b34e3e02ee7dbc422c4812e65fd5a44a2ff8affe722a5a7f9e144
MD5 9bb7c1b9a28695c86aa8dc0841991418
BLAKE2b-256 1346958c9c17bcd2f63fe2ab9716ebd0130d9b1487d9270c4934526a8e882d70

See more details on using hashes here.

File details

Details for the file merlin_vlm-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: merlin_vlm-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.0 CPython/3.10.14

File hashes

Hashes for merlin_vlm-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 8c05937477117b037769fe9911c2bce3ad5ccf77ddbb13704e36e1a7d421eb1c
MD5 edb8da49b5c32c51580eb2216e8125ff
BLAKE2b-256 0c656b26c734688e6012e5c6788cabfd3fca1bbc88c627241223a45f6752a1ff

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