Please use. NET 5,. NET 6, NET 7,. NET 8, NET Framework 4.6, NET Framework 4.61, NET Framework 4.7, NET Framework 4.72, NET Framework 4.8, NET Framework 4.81, and. NET Core 3.1 versions

Core Class

This class represents an OpenVINO runtime Core entity.

ov_runtime_c#_api

Definition

Namespace: OpenVinoSharp
Assembly: OpenVINO_CSharp_API (in OpenVINO_CSharp_API.dll) Version: 2024.3.0.2+a9617c0f8f80882646d0eba11b88ae6cb17b3fb8
C#
public class Core : IDisposable
Inheritance
Object    Core
Implements
IDisposable

Remarks

User applications can create several Core class instances, but in this case the underlying plugins are created multiple times and not shared between several Core instances.The recommended way is to have a single Core instance per application.

Constructors

Core Constructs an OpenVINO Core instance with devices and their plugins description.

There are two ways how to configure device plugins:

1. (default) Use XML configuration file in case of dynamic libraries build;

2. Use strictly defined configuration in case of static libraries build.

Properties

Ptr [public]Core class pointer.

Methods

compile_model(Model, DictionaryString, String) Creates a compiled model from a source model object.
compile_model(String, DictionaryString, String) Reads and loads a compiled model from the IR/ONNX/PDPD file to the default OpenVINO device selected by the AUTO plugin.
compile_model(Model, String, DictionaryString, String) Creates and loads a compiled model from a source model to the default OpenVINO device selected by the AUTO
compile_model(String, String, DictionaryString, String) Reads a model and creates a compiled model from the IR/ONNX/PDPD file.
Dispose Release unmanaged resources
Finalize Core's destructor
(Overrides ObjectFinalize)
get_available_devices Returns devices available for inference. Core objects go over all registered plugins and ask about available devices.
get_property(String, PropertyKey) Gets properties related to device behaviour. The method extracts information that can be set via the set_property method.
get_property(String, String) Gets properties related to device behaviour. The method extracts information that can be set via the set_property method.
get_versions Returns device plugins version information.
import_model Imports a compiled model from the previously exported one.
read_model(Byte, Tensor) Reads models from IR / ONNX / PDPD / TF / TFLite formats.
read_model(String, Tensor) Reads models from IR / ONNX / PDPD / TF / TFLite formats.
read_model(String, String) Reads models from IR / ONNX / PDPD / TF / TFLite file formats.
set_property(String, DictionaryString, String)  
set_property(String, KeyValuePairString, String) Sets properties for a device, acceptable keys can be found in PropertyKey.

Fields

m_ptr [private]Core class pointer.

See Also