neurovlm.models.load_model#
- neurovlm.models.load_model(name=None, *, family=ModelFamily.MLP, task=None, domain=None, variant=None)[source]#
Load a packaged model by legacy name or structured fields.
- Parameters:
name (str, optional) – Existing packaged-model name. Every name supported before the structured API remains an alias to the same checkpoint.
family ({"mlp", "cnn"}, default: "mlp") – Architecture family. MLP remains the global default.
task (str, optional) – Structured task identifier. Required when
nameis omitted.domain ({"pubmed", "nilearn", "neurovault"}, optional) – Required for CNN contrastive/text-to-brain models and for fine-tuned CNN autoencoders.
variant (str, optional) – CNN models default to
mixed_baseline. Domain-specialized CNN checkpoints require the explicit valuefinetuned.
- Return type:
model
Examples
Existing calls continue to work:
>>> model = load_model("autoencoder")
Structured CNN selection defaults to the mixed baseline:
>>> model = load_model(family="cnn", task="contrastive", domain="nilearn")