public interface IModelInferEngine : IDisposable
This interface provides standardization for different inference implementations (ONNX Runtime, TensorRT, OpenVINO etc.) to ensure consistent behavior. 该接口为不同的推理实现(ONNX Runtime、TensorRT、OpenVINO等)提供标准化,确保行为一致。
All implementing classes must be thread-safe for Predict operations and properly manage native resources through IDisposable pattern. 所有实现类必须保证Predict操作的线程安全性,并通过IDisposable模式正确管理原生资源。
Dispose | Releases all resources used by the inference engine. 释放推理引擎使用的所有资源。 |
LoadModel | Loads and initializes the model with specified configuration. 使用指定配置加载并初始化模型。 |
Predict | Performs model prediction/inference on the input tensor. 对输入张量执行模型预测/推理 |