Skip to main content

resolve_model_config

Function resolve_model_config 

Source
pub fn resolve_model_config(
    path: impl AsRef<Path>,
    signals: Option<ModelSignals>,
    overrides: &ModelOverrides,
) -> Result<ResolvedModelConfig, ModelConfigError>
Expand description

Resolves the configuration of the model file at path: what it embeds, the files in its directory, and signals when given.

ยงErrors

ModelConfigError::Io when the model or a sidecar cannot be read, and every error of resolve_sources.

use edgefirst_decoder::model_config::{resolve_model_config, ModelOverrides};

let config = resolve_model_config("segformer.onnx", None, &ModelOverrides::default())?;
for line in config.describe() {
    println!("{line}");
}