neurovlm.core.NeuroVLM#
- class neurovlm.core.NeuroVLM(datasets=None, device='cpu')[source]#
Unified interface for text-to-brain and brain-to-text.
- Parameters:
datasets (sequence of str, optional) – Text corpora to include for
to_text.device (str, optional) – Torch device for inference.
- __init__(datasets=None, device='cpu')[source]#
- Parameters:
datasets (Sequence[str] | None)
device (str)
- Return type:
None
Methods
__init__([datasets, device])brain(X)Start a brain-driven chain.
decode_brain(latent)Decode one latent brain vector into NIfTI.
decode_brains(latents)Decode multiple latent brain vectors into NIfTI images.
generate_llm_response(backend, model_name[, ...])Generate an LLM summary using the last retrieval result as context.
get_niftis([index])Return NIfTI image(s) from the latest generated (MSE) brain maps.
plot(image[, threshold, display_mode, ...])Plot a provided NIfTI image.
text(X)Start a text-driven chain.
to_brain(X[, head, project, dataset])Retrieve brain results for one or many queries.
to_text(X[, datasets, project])Retrieve text results for one or many queries.
top_k([k, target, query_index, dataset])Return top-k rows from the latest retrieval.
Attributes
resultsReturn the latest retrieval/generation result object.