Skip to main content

NeuroVLM

NeuroVLM maps between neuroimaging activation maps and neuroscience text.

model

Install

Minimal, inference-only installation:

pip install neurovlm

With optional dependencies needed to train and reproduce analyses:

pip install "neurovlm[full]"

Quickstart

Fetch NeuroVLM's datasets:

from neurovlm.data import fetch_data
fetch_data()

Use the NeuroVLM object for text-to-brain and brain-to-text:

from neurovlm import NeuroVLM
from neurovlm.data import load_latent

# Text-to-brain: generation
nvlm = NeuroVLM()
result = nvlm.text(["vision", "default mode network"]).to_brain(head="mse")
result.to_nifti() # returns list of nib.Nifti1Image
result.plot(0, threshold=0.25) # plot image for vision
result.plot(1, threshold=0.15) # plot image for DMN

# Text-to-brain: ranking and retrieval
nvlm = NeuroVLM()
result = nvlm.text("motor").to_brain(head='infonce')
top = result.top_k(2) # each row pairs to a neuorimage that is similar to the text query
top.plot_row(1, threshold=0.1) # WashU atlas
top.plot_row(2, threshold=2.5) # NeuroVault
top.plot_row(4, threshold=0.1) # PubMed

# Brain-to-text: ranking and retrieval
nvlm = NeuroVLM()
result = nvlm.brain(load_latent("networks_neuro")["Du"]["AUD"]).to_text()
result.top_k(5).query("cosine_similarity > 0.4") # return up to 5 examples per dataset

Documentation

See the docs for the API and tutorials.

License

Apache-2.0 (LICENSE).

Download files

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

Source Distribution

neurovlm-0.0.4.tar.gz (129.2 kB view details)

Uploaded Source

Built Distribution

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

neurovlm-0.0.4-py3-none-any.whl (140.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: neurovlm-0.0.4.tar.gz
  • Upload date:
  • Size: 129.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for neurovlm-0.0.4.tar.gz
Algorithm Hash digest
SHA256 3c21a9816d643251b519d3ffa647aa9616b8cd343bb1c5dff87055ee3c66d970
MD5 6aa6fbd068ef5ada93df085e46d32642
BLAKE2b-256 02c2d755049a078ef83f4250c21a45b4f749f30ffde986c60ff7ab5a2e12aa57

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neurovlm-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 140.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for neurovlm-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a441c8dd4d866fa39aa064aaba4c4b1641f273a5fcd3126a3547548608ae426b
MD5 9ab546e1ce4fd77f83ddb46c4509555a
BLAKE2b-256 f205f8e417da070c2cde19f0a7d6e56019e23978b383a663b4e7cd1abdb9352a

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.5

2 files

This release

0.0.4 This release

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

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