Class ModelRegistry
- Namespace
- InferenceEngine.Core.ModelProviders
- Assembly
- InferenceEngine.Core.dll
Registry of known models and their download URLs from popular model hubs. Allows engines to specify only a model name for commonly known models.
public class ModelRegistry
- Inheritance
-
ModelRegistry
- Inherited Members
Constructors
ModelRegistry(string?, ILogger?)
Creates a model registry from a JSON file.
public ModelRegistry(string? registryPath = null, ILogger? logger = null)
Parameters
registryPathstringPath to the JSON registry file. Uses default if null.
loggerILoggerOptional logger
Methods
CreateDefaultRegistry(string?)
Creates a default registry file with common models if it doesn't exist.
public static void CreateDefaultRegistry(string? path = null)
Parameters
pathstringPath to create the registry file
GetModelEntry(string)
Gets the full registry entry for a model by name.
public ModelRegistryEntry? GetModelEntry(string modelName)
Parameters
modelNamestringName of the model file (e.g., "yolo11n.onnx")
Returns
- ModelRegistryEntry
The registry entry, or null if not found
GetModelUrls(string)
Gets download URLs for a model by name.
public string[]? GetModelUrls(string modelName)
Parameters
modelNamestringName of the model file (e.g., "yolo11n.onnx")
Returns
- string[]
Array of URLs to download the model from, or null if not found
GetRegisteredModels()
Gets all registered model names.
public IReadOnlyCollection<string> GetRegisteredModels()
Returns
- IReadOnlyCollection<string>
Collection of registered model names
IsModelRegistered(string)
Checks if a model is registered.
public bool IsModelRegistered(string modelName)
Parameters
modelNamestringName of the model file
Returns
- bool
True if the model is in the registry