Package org.intel.openvino
Class Core
- java.lang.Object
-
- org.intel.openvino.Wrapper
-
- org.intel.openvino.Core
-
public class Core extends Wrapper
This class represents an OpenVINO runtime Core entity.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.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNATIVE_LIBRARY_NAME
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CompiledModelcompile_model(Model model, java.lang.String device)Creates a compiled model from a source model object.protected voiddelete(long nativeObj)Anyget_property(java.lang.String device, java.lang.String name)Gets properties related to device behaviour.static voidloadNativeLibs()Use this method to initialize native libraries.Modelread_model(java.lang.String modelPath)Same asread_model(String, String)but with empty weights pathModelread_model(java.lang.String modelPath, java.lang.String weightPath)Reads models from IR/ONNX/PDPD formats.voidset_property(java.lang.String device, java.util.Map<java.lang.String,java.lang.String> prop)Sets properties for a device, acceptable keys can be found in openvino/runtime/properties.hpp.-
Methods inherited from class org.intel.openvino.Wrapper
finalize, getNativeObjAddr
-
-
-
-
Field Detail
-
NATIVE_LIBRARY_NAME
public static final java.lang.String NATIVE_LIBRARY_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
loadNativeLibs
public static void loadNativeLibs()
Use this method to initialize native libraries. Other files like plugins.xml and *.mvcmd will be also copied to temporal location which makes them visible in runtime. To Do: fix for Android!
-
read_model
public Model read_model(java.lang.String modelPath)
Same asread_model(String, String)but with empty weights path
-
read_model
public Model read_model(java.lang.String modelPath, java.lang.String weightPath)
Reads models from IR/ONNX/PDPD formats.- Parameters:
modelPath- Path to a model.weightPath- Path to a data file.For IR format (*.bin):
- if path is empty, will try to read a bin file with the same name as xml and
- if the bin file with the same name is not found, will load IR without weights.
- the bin_path parameter is not used.
- the bin_path parameter is not used.
- Returns:
- A model.
-
compile_model
public CompiledModel compile_model(Model model, java.lang.String device)
Creates a compiled model from a source model object.Users can create as many compiled models as they need and use them simultaneously (up to the limitation of the hardware resources).
- Parameters:
model- Model object acquired fromread_model(java.lang.String).device- Name of a device to load a model to.- Returns:
- A compiled model.
-
get_property
public Any get_property(java.lang.String device, java.lang.String name)
Gets properties related to device behaviour.The method extracts information that can be set via the set_property method.
- Parameters:
device- Name of a device to get a property value.name-Propertyname.- Returns:
- Value of a property corresponding to the property name.
-
set_property
public void set_property(java.lang.String device, java.util.Map<java.lang.String,java.lang.String> prop)Sets properties for a device, acceptable keys can be found in openvino/runtime/properties.hpp.- Parameters:
device- Name of a device to get a property value.prop- Map of pairs: (property name, property value).
-
-