
Download pre-trained OSSL soilVAE models from Zenodo
Source:R/download_models.R
download_ossl_models.RdDownloads one or both pre-trained model archives from the autoSpectra
Zenodo deposit and extracts them into model_dir. After the first
download, models are cached locally and loaded from disk (or from the
in-memory cache via get_cached_model()) on subsequent calls to
predict_soil().
Arguments
- family_id
Character vector of family IDs to download. One or both of
"OSSL_VisNIR"and"OSSL_MIR". Default: both families.- model_dir
Local directory where models are stored. Default:
getOption("autoSpectra.model_dir", "models").- zenodo_record
Zenodo record ID (string). Normally left at default.
- overwrite
Logical. If
TRUE, re-download even if models are already present. DefaultFALSE.- timeout_sec
Download timeout in seconds (default 3600 = 1 h).
Quick-start workflow
library(autoSpectra)
download_ossl_models() # one-time setup
predict_soil(df, "OSSL_VisNIR") # works immediately