Skip to main content

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

Project description

Merlin: Vision Language Foundation Model for 3D Computed Tomography

arXiv    Hugging Face    pypi    Watch the Talk on YouTube    License

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

⚡️ 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
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)

For inference on a demo CT scan, please check out the demo

For additional information, please read the documentation.

📂 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 original paper:

@article{blankemeier2024merlin,
  title={Merlin: A vision language foundation model for 3d computed tomography},
  author={Blankemeier, Louis and Cohen, Joseph Paul and Kumar, Ashwin and Van Veen, Dave and Gardezi, Syed Jamal Safdar and Paschali, Magdalini and Chen, Zhihong and Delbrouck, Jean-Benoit and Reis, Eduardo and Truyts, Cesar and others},
  journal={Research Square},
  pages={rs--3},
  year={2024}
}

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.4.tar.gz (12.3 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.4-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: merlin_vlm-0.0.4.tar.gz
  • Upload date:
  • Size: 12.3 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.4.tar.gz
Algorithm Hash digest
SHA256 ea5a3a4bb3e153452cd5e74a5b0d89e4d4c73e8adfc861f175cc77a977fde453
MD5 084b27bc6b6a7bd589c17ad6791659fc
BLAKE2b-256 5aef06333c2417e0c5a15b4a770a29eff99e746c8de11a3dde3be0d1c580ba56

See more details on using hashes here.

File details

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

File metadata

  • Download URL: merlin_vlm-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 12.7 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 235e8f19ef38f57507a4b7f9ecd6bea08b546b1b1bf6859f1abd691d6b1d5ec8
MD5 b354cc40dd897ecc3231d18aebb593a4
BLAKE2b-256 f6d6e5b264c4503ae9a17f240ad450c98ed4fc7e0ad2c025e06458508b3f0df9

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