diff --git a/docs/sphinx_setup/api/nodejs_api/addon.rst b/docs/sphinx_setup/api/nodejs_api/addon.rst index ff88d02aecd72e..f6ee4ab7b15836 100644 --- a/docs/sphinx_setup/api/nodejs_api/addon.rst +++ b/docs/sphinx_setup/api/nodejs_api/addon.rst @@ -22,6 +22,7 @@ Property addon Output <./openvino-node/interfaces/Output> OutputInfo <./openvino-node/interfaces/OutputInfo> OutputTensorInfo <./openvino-node/interfaces/OutputTensorInfo> + OVAny <./openvino-node/types/OVAny> PartialShape <./openvino-node/interfaces/PartialShape> PartialShapeConstructor <./openvino-node/interfaces/PartialShapeConstructor> PrePostProcessor <./openvino-node/interfaces/PrePostProcessor> @@ -39,19 +40,20 @@ The **openvino-node** package exports ``addon`` which contains the following pro .. code-block:: ts - interface NodeAddon { + export interface NodeAddon { Core: CoreConstructor; - PartialShape: PartialShapeConstructor; Tensor: TensorConstructor; - element: typeof element; + PartialShape: PartialShapeConstructor; + preprocess: { - PrePostProcessor: PrePostProcessorConstructor; - resizeAlgorithm: typeof resizeAlgorithm; + resizeAlgorithm: typeof resizeAlgorithm; + PrePostProcessor: PrePostProcessorConstructor; }; - } + element: typeof element; + } * **Defined in:** - `addon.ts:591 `__ + `addon.ts:669 `__ Properties @@ -71,7 +73,7 @@ Properties - CoreConstructor: :doc:`CoreConstructor <./openvino-node/interfaces/CoreConstructor>` - **Defined in:** - `addon.ts:592 `__ + `addon.ts:670 `__ .. rubric:: PartialShape @@ -87,7 +89,7 @@ Properties - PartialShapeConstructor: :doc:`PartialShapeConstructor <./openvino-node/interfaces/PartialShapeConstructor>` - **Defined in:** - `addon.ts:594 `__ + `addon.ts:672 `__ .. rubric:: Tensor @@ -102,7 +104,7 @@ Properties - TensorConstructor: :doc:`TensorConstructor <./openvino-node/interfaces/TensorConstructor>` - **Defined in:** - `addon.ts:593 `__ + `addon.ts:671 `__ .. rubric:: element @@ -118,7 +120,7 @@ Properties - element: typeof :doc:`element <./openvino-node/enums/element>` - **Defined in:** - `addon.ts:600 `__ + `addon.ts:678 `__ .. rubric:: preprocess @@ -128,15 +130,15 @@ Properties .. code-block:: ts preprocess: { - PrePostProcessor: PrePostProcessorConstructor; resizeAlgorithm: typeof resizeAlgorithm; + PrePostProcessor: PrePostProcessorConstructor; } * **Type declaration:** - - PrePostProcessor: :doc:`PrePostProcessorConstructor <./openvino-node/interfaces/PrePostProcessorConstructor>` - resizeAlgorithm: typeof :doc:`resizeAlgorithm <./openvino-node/enums/resizeAlgorithm>` + - PrePostProcessor: :doc:`PrePostProcessorConstructor <./openvino-node/interfaces/PrePostProcessorConstructor>` - **Defined in:** - `addon.ts:596 `__ + `addon.ts:674 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/nodejs_api.rst b/docs/sphinx_setup/api/nodejs_api/nodejs_api.rst index 72108b671891e7..0ad4d1fb53d126 100644 --- a/docs/sphinx_setup/api/nodejs_api/nodejs_api.rst +++ b/docs/sphinx_setup/api/nodejs_api/nodejs_api.rst @@ -41,6 +41,8 @@ For more details, refer to the API Development ##################### +Get started with OpenVINO Node.js API development :doc:`here <./addon>`. + OpenVINO 2024.4 has introduced the following methods: - :ref:`Model.clone() ` diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/enums/element.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/enums/element.rst index 507752adeaca3f..61197254580f81 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/enums/element.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/enums/element.rst @@ -10,7 +10,7 @@ Enumeration element f32: number * **Defined in:** - `addon.ts:640 `__ + `addon.ts:658 `__ .. rubric:: f64 @@ -22,7 +22,7 @@ Enumeration element f64: number * **Defined in:** - `addon.ts:641 `__ + `addon.ts:659 `__ .. rubric:: i16 @@ -34,7 +34,7 @@ Enumeration element i16: number * **Defined in:** - `addon.ts:637 `__ + `addon.ts:655 `__ .. rubric:: i32 @@ -46,7 +46,7 @@ Enumeration element i32: number * **Defined in:** - `addon.ts:638 `__ + `addon.ts:656 `__ .. rubric:: i64 @@ -58,7 +58,7 @@ Enumeration element i64: number * **Defined in:** - `addon.ts:639 `__ + `addon.ts:657 `__ .. rubric:: i8 @@ -70,7 +70,7 @@ Enumeration element i8: number * **Defined in:** - `addon.ts:636 `__ + `addon.ts:654 `__ .. rubric:: string @@ -82,7 +82,7 @@ Enumeration element string: string * **Defined in:** - `addon.ts:642 `__ + `addon.ts:660 `__ .. rubric:: u16 @@ -94,7 +94,7 @@ Enumeration element u16: number * **Defined in:** - `addon.ts:634 `__ + `addon.ts:652 `__ .. rubric:: u32 @@ -106,7 +106,7 @@ Enumeration element u32: number * **Defined in:** - `addon.ts:633 `__ + `addon.ts:651 `__ .. rubric:: u64 @@ -118,7 +118,7 @@ Enumeration element u64: number * **Defined in:** - `addon.ts:635 `__ + `addon.ts:653 `__ .. rubric:: u8 @@ -130,5 +130,5 @@ Enumeration element u8: number * **Defined in:** - `addon.ts:632 `__ + `addon.ts:650 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/enums/resizeAlgorithm.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/enums/resizeAlgorithm.rst index 08b61e0a201677..168c2cca846d23 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/enums/resizeAlgorithm.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/enums/resizeAlgorithm.rst @@ -10,7 +10,7 @@ Enumeration resizeAlgorithm RESIZE_CUBIC: number - **Defined in:** - `addon.ts:647 `__ + `addon.ts:663 `__ .. rubric:: RESIZE_LINEAR @@ -22,7 +22,7 @@ Enumeration resizeAlgorithm RESIZE_LINEAR: number - **Defined in:** - `addon.ts:648 `__ + `addon.ts:666 `__ .. rubric:: RESIZE_NEAREST @@ -34,5 +34,5 @@ Enumeration resizeAlgorithm RESIZE_NEAREST: number - **Defined in:** - `addon.ts:646 `__ + `addon.ts:664 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/CompiledModel.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/CompiledModel.rst index 86c6b41fa91ca6..71e834c1b30cee 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/CompiledModel.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/CompiledModel.rst @@ -15,14 +15,14 @@ Interface CompiledModel output(): Output; output(index): Output; output(name): Output; - setProperty(properties: {[propertyName: string]: string | number | boolean}): void; + setProperty(properties: Record): void; } CompiledModel represents a model that is compiled for a specific device by applying multiple optimization transformations, then mapping to compute kernels. * **Defined in:** - `addon.ts:303 `__ + `addon.ts:317 `__ Properties @@ -40,7 +40,7 @@ Properties It gets all inputs of a compiled model. - **Defined in:** - `addon.ts:305 `__ + `addon.ts:319 `__ .. rubric:: outputs @@ -54,7 +54,7 @@ Properties It gets all outputs of a compiled model. - **Defined in:** - `addon.ts:307 `__ + `addon.ts:321 `__ Methods @@ -68,7 +68,7 @@ Methods .. code-block:: ts - getProperty(propertyName): string | number | boolean + getProperty(propertyName): OVAny It gets the property for the current compiled model. @@ -78,10 +78,10 @@ Methods A string to get the property value. - * **Returns:** string | number | boolean + * **Returns:** :doc:`OVAny <../types/OVAny>` * **Defined in:** - `addon.ts:313 `__ + `addon.ts:327 `__ @@ -99,7 +99,7 @@ Methods * **Returns:** :doc:`InferRequest ` - **Defined in:** - `addon.ts:318 `__ + `addon.ts:332 `__ .. rubric:: exportModelSync @@ -114,7 +114,7 @@ Methods * **Returns:** Buffer - **Defined in:** - `addon.ts:325 `__ + `addon.ts:339 `__ .. rubric:: input @@ -133,7 +133,7 @@ Methods A compiled model input. * **Defined in:** - `addon.ts:349 `__ + `addon.ts:363 `__ .. code-block:: ts @@ -153,7 +153,7 @@ Methods A compiled model input. * **Defined in:** - `addon.ts:355 `__ + `addon.ts:369 `__ .. code-block:: ts @@ -173,7 +173,7 @@ Methods A compiled model input. * **Defined in:** - `addon.ts:361 `__ + `addon.ts:375 `__ .. rubric:: output @@ -191,7 +191,7 @@ Methods A compiled model output. * **Defined in:** - `addon.ts:331 `__ + `addon.ts:345 `__ .. code-block:: ts @@ -215,7 +215,7 @@ Methods A compiled model output. * **Defined in:** - `addon.ts:337 `__ + `addon.ts:351 `__ .. code-block:: ts @@ -239,7 +239,7 @@ Methods A compiled model output. * **Defined in:** - `addon.ts:343 `__ + `addon.ts:357 `__ .. rubric:: setProperty @@ -249,7 +249,7 @@ Methods .. code-block:: ts - setProperty(properties): void + setProperty(properties: Record): void It sets properties for the current compiled model. Properties can be retrieved via :ref:`CompiledModel.getProperty ` @@ -260,14 +260,12 @@ Methods .. code-block:: ts - properties: { - [propertyName: string]: string | number | boolean; - } + properties: Record, An object with the key-value pairs (property name, property value). * **Returns:** void * **Defined in:** - `addon.ts:368 `__ + `addon.ts:382 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/Core.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/Core.rst index eee642e49b3941..87d4068b850f78 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/Core.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/Core.rst @@ -16,8 +16,8 @@ It is recommended to have a single Core instance per application. compileModelSync(model, deviceName, config?): CompiledModel; compileModelSync(modelPath, deviceName, config?): CompiledModel; getAvailableDevices(): string[]; - getProperty(propertyName): string | number | boolean; - getProperty(deviceName, propertyName): string | number | boolean; + getProperty(propertyName): OVAny; + getProperty(deviceName, propertyName): OVAny; getVersions(deviceName): { [deviceName: string]: { buildNumber: string; @@ -26,6 +26,7 @@ It is recommended to have a single Core instance per application. }; importModel(modelStream, device, config?): Promise importModelSync(modelStream, device, config?): CompiledModel; + queryModel(model, deviceName, properties?): string[]; readModel(modelPath, weightsPath?): Promise; readModel(model, weights): Promise; readModel(modelBuffer, weightsBuffer?): Promise; @@ -38,7 +39,7 @@ It is recommended to have a single Core instance per application. * **Defined in:** - `addon.ts:32 `__ + `addon.ts:34 `__ Methods @@ -62,7 +63,7 @@ Methods A path to the library with ov::Extension * **Defined in:** - `addon.ts:37 `__ + `addon.ts:39 `__ .. rubric:: compileModel @@ -95,16 +96,14 @@ Methods .. code-block:: ts - config: { - [propertyName: string]: string; - } + config: Record, - - [propertyName: string]:string + - Record`\> - * **Returns:** Promise<\ :doc:`CompiledModel ` \> + * **Returns:** Promise<\ :doc:`CompiledModel `\> * **Defined in:** - `addon.ts:48 `__ + `addon.ts:50 `__ .. code-block:: ts @@ -122,7 +121,7 @@ Methods - model: :doc:`Model ` - The path to a model.is i + The path to a model. - deviceName: string @@ -132,19 +131,17 @@ Methods .. code-block:: ts - config: { - [propertyName: string]: string; - } + config: Record, An object with the key-value pairs (property name, property value): relevant only for this load operation. - - [propertyName: string]:string + - Record`\> - * **Returns:** Promise<\ :doc:`CompiledModel ` \> + * **Returns:** Promise<\ :doc:`CompiledModel `\> * **Defined in:** - `addon.ts:67 `__ + `addon.ts:69 `__ .. rubric:: compileModelSync @@ -166,16 +163,14 @@ Methods .. code-block:: ts - config: { - [propertyName: string]: string; - } + config: Record, - - [propertyName: string]:string + - Record`\> * **Returns:** :doc:`CompiledModel ` * **Defined in:** - `addon.ts:76 `__ + `addon.ts:78 `__ .. code-block:: ts @@ -193,16 +188,14 @@ Methods .. code-block:: ts - config: { - [propertyName: string]: string; - } + config: Record, - - [propertyName: string]:string + - Record`\> * **Returns:** :doc:`CompiledModel ` * **Defined in:** - `addon.ts:85 `__ + `addon.ts:87 `__ .. rubric:: getAvailableDevices @@ -225,7 +218,7 @@ Methods ``set_property`` and so on. * **Defined in:** - `addon.ts:99 `__ + `addon.ts:101 `__ .. rubric:: getProperty @@ -234,7 +227,7 @@ Methods .. code-block:: ts - getProperty(propertyName): string | number | boolean + getProperty(propertyName): OVAny It gets the properties dedicated to device behavior. @@ -244,16 +237,16 @@ Methods A property name. - * **Returns:** string | number | boolean + * **Returns:** :doc:`OVAny <../types/OVAny>` * **Defined in:** - `addon.ts:104 `__ + `addon.ts:106 `__ * .. code-block:: ts - getProperty(deviceName, propertyName): string | number | boolean + getProperty(deviceName, propertyName): OVAny It gets the properties dedicated to device behavior. @@ -267,10 +260,10 @@ Methods A property name. - * **Returns:** string | number | boolean + * **Returns:** :doc:`OVAny <../types/OVAny>` * **Defined in:** - `addon.ts:111 `__ + `addon.ts:113 `__ .. rubric:: getVersions @@ -309,7 +302,7 @@ Methods * description: string * **Defined in:** - `addon.ts:119 `__ + `addon.ts:121 `__ .. rubric:: importModel @@ -339,18 +332,16 @@ Methods .. code-block:: ts - config: { - [key: string]: string | number | boolean; - } + config: Record, An object with the key-value pairs (property name, property value): relevant only for this load operation. - - [key: string]: string | number | boolean + - Record`\> * **Returns:** Promise<\ :doc:`CompiledModel `\ > * **Defined in:** - `addon.ts:135 `__ + `addon.ts:137 `__ .. rubric:: importModelSync @@ -380,18 +371,54 @@ Methods .. code-block:: ts - config: { - [key: string]: string | number | boolean; - } + config: Record, An object with the key-value pairs (property name, property value): relevant only for this load operation. - - [key: string]: string | number | boolean + - Record`\> * **Returns:** :doc:`CompiledModel ` * **Defined in:** - `addon.ts:144 `__ + `addon.ts:146 `__ + + +.. rubric:: queryModel + +* + + .. code-block:: ts + + queryModel(model, deviceName, properties?): { [key: string]: string } + + It queries the device if it supports specified model with the specified + properties. + + * **Parameters:** + + - model: :doc:`Model ` + + The :doc:`Model ` object acquired from :ref:`Core.readModel ` + + - deviceName: string + + The name of a device. + + - ``Optional`` + + An object with the property name - property value pairs. + (property name, property value). + + .. code-block:: ts + + properties: Record, + + - Record`\> + + * **Returns:** [key: string]: string + + * **Defined in:** + `addon.ts:217 `__ .. rubric:: readModel @@ -429,18 +456,18 @@ Methods * **Returns:** Promise<\ :doc:`Model `\ > * **Defined in:** - `addon.ts:162 `__ + `addon.ts:164 `__ .. code-block:: ts - readModel(modelPath, weights): Promise + readModel(model, weights): Promise It reads models from the IR / ONNX / PDPD / TF and TFLite formats. * **Parameters:** - - modelPath: string + - model: string A string with model in the IR / ONNX / PDPD / TF and TFLite format. @@ -452,7 +479,7 @@ Methods * **Returns:** Promise<\ :doc:`Model `\ > * **Defined in:** - `addon.ts:170 `__ + `addon.ts:172 `__ .. code-block:: ts @@ -478,7 +505,7 @@ Methods * **Returns:** Promise<\ :doc:`Model `\ > * **Defined in:** - `addon.ts:177 `__ + `addon.ts:179 `__ .. rubric:: readModelSync @@ -506,7 +533,7 @@ Methods * **Returns:** Promise<\ :doc:`Model `\ > * **Defined in:** - `addon.ts:183 `__ + `addon.ts:187 `__ .. code-block:: ts @@ -524,7 +551,7 @@ Methods * **Returns:** :doc:`Model ` * **Defined in:** - `addon.ts:188 `__ + `addon.ts:192 `__ .. code-block:: ts @@ -543,7 +570,7 @@ Methods * **Returns:** :doc:`Model ` * **Defined in:** - `addon.ts:193 `__ + `addon.ts:197 `__ .. rubric:: setProperty @@ -552,7 +579,7 @@ Methods .. code-block:: ts - setProperty(properties): void + setProperty(properties: Record): void It sets the properties. @@ -562,23 +589,21 @@ Methods .. code-block:: ts - properties: { - [key: string]: string | number | boolean; - } + properties: Record, An object with the property name - property value pairs. - - [key: string]: string | number | boolean + - Record`\> * **Returns:** void * **Defined in:** - `addon.ts:198 `__ + `addon.ts:202 `__ .. code-block:: ts - setProperty(deviceName, properties): void + setProperty(deviceName, properties: Record): void It sets the properties for a device. @@ -589,13 +614,11 @@ Methods .. code-block:: ts - properties: { - [key: string]: string | number | boolean; - } + properties: Record, - - [key: string]: string | number | boolean + - Record`\> - * **Returns:** string | number | boolean + * **Returns:** :doc:`OVAny <../types/OVAny>` * **Defined in:** `addon.ts:204 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/CoreConstructor.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/CoreConstructor.rst index 398d4aafd5b71f..fd2015b8072812 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/CoreConstructor.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/CoreConstructor.rst @@ -4,11 +4,11 @@ Interface CoreConstructor .. code-block:: ts interface CoreConstructor { - new CoreConstructor(): Core; + new (): Core; } * **Defined in:** - `addon.ts:187 `__ + `addon.ts:223 `__ Constructors @@ -26,5 +26,5 @@ Constructors * **Returns:** :doc:`Core ` * **Defined in:** - `addon.ts:188 `__ + `addon.ts:224 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/InferRequest.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/InferRequest.rst index 1c8677965a8c8d..138842736ce52c 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/InferRequest.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/InferRequest.rst @@ -37,7 +37,7 @@ can be run in asynchronous or synchronous manners. * **Defined in:** - `addon.ts:453 `__ + `addon.ts:468 `__ Methods @@ -57,7 +57,7 @@ Methods * **Returns:** :doc:`CompiledModel ` * **Defined in:** - `addon.ts:490 `__ + `addon.ts:508 `__ .. rubric:: getInputTensor @@ -85,7 +85,7 @@ Methods an exception is thrown. * **Defined in:** - `addon.ts:496 `__ + `addon.ts:514 `__ .. code-block:: ts @@ -110,7 +110,7 @@ Methods idx is not found, an exception is thrown. * **Defined in:** - `addon.ts:503 `__ + `addon.ts:521 `__ .. rubric:: getOutputTensor @@ -129,7 +129,7 @@ Methods idx is not found, an exception is thrown. * **Defined in:** - `addon.ts:509 `__ + `addon.ts:527 `__ .. code-block:: ts @@ -154,7 +154,7 @@ Methods idx is not found, an exception is thrown. * **Defined in:** - `addon.ts:516 `__ + `addon.ts:534 `__ .. rubric:: getTensor @@ -177,7 +177,7 @@ Methods * **Returns:** :doc:`Tensor ` * **Defined in:** - `addon.ts:525 `__ + `addon.ts:543 `__ .. rubric:: infer diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/InputInfo.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/InputInfo.rst index 450ebdeec83084..067298a9ad38ad 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/InputInfo.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/InputInfo.rst @@ -10,7 +10,7 @@ Interface InputInfo } * **Defined in:** - `addon.ts:593 `__ + `addon.ts:611 `__ Methods ##################### @@ -26,7 +26,7 @@ Methods * **Returns:** :doc:`InputModelInfo ` * **Defined in:** - `addon.ts:596 `__ + `addon.ts:614 `__ .. rubric:: preprocess @@ -40,7 +40,7 @@ Methods * **Returns:** :doc:`PreProcessSteps ` * **Defined in:** - `addon.ts:595 `__ + `addon.ts:613 `__ .. rubric:: tensor @@ -54,5 +54,5 @@ Methods * **Returns:** :doc:`InputTensorInfo ` * **Defined in:** - `addon.ts:594 `__ + `addon.ts:612 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/InputModelInfo.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/InputModelInfo.rst index e002f2a567533e..fed97b555fca1c 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/InputModelInfo.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/InputModelInfo.rst @@ -8,7 +8,7 @@ Interface InputModelInfo } * **Defined in:** - `addon.ts:589 `__ + `addon.ts:607 `__ Methods ##################### @@ -28,5 +28,5 @@ Methods * **Returns:** :doc:`InputModelInfo ` * **Defined in:** - `addon.ts:590 `__ + `addon.ts:608 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/InputTensorInfo.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/InputTensorInfo.rst index 4eb9ecb7f9d412..bd476e75aa8c89 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/InputTensorInfo.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/InputTensorInfo.rst @@ -10,7 +10,7 @@ Interface InputTensorInfo } * **Defined in:** - `addon.ts:575 `__ + `addon.ts:593 `__ Methods @@ -32,7 +32,7 @@ Methods * **Returns:** :doc:`InputTensorInfo ` * **Defined in:** - `addon.ts:576 `__ + `addon.ts:594 `__ .. rubric:: setLayout @@ -50,7 +50,7 @@ Methods * **Returns:** :doc:`InputTensorInfo ` * **Defined in:** - `addon.ts:577 `__ + `addon.ts:595 `__ .. rubric:: setShape @@ -68,5 +68,5 @@ Methods * **Returns:** :doc:`InputTensorInfo ` * **Defined in:** - `addon.ts:578 `__ + `addon.ts:596 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/Model.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/Model.rst index bd09b8d903d9fb..ef8bbbdb393f1d 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/Model.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/Model.rst @@ -25,7 +25,7 @@ Interface Model A user-defined model read by :ref:`Core.readModel `. * **Defined in:** - `addon.ts:191 `__ + `addon.ts:230 `__ Properties @@ -41,7 +41,7 @@ Properties inputs: Output[] - **Defined in:** - `addon.ts:193 `__ + `addon.ts:305 `__ .. rubric:: outputs @@ -53,7 +53,7 @@ Properties outputs: Output[] - **Defined in:** - `addon.ts:192 `__ + `addon.ts:309 `__ Methods @@ -73,10 +73,11 @@ Methods * **Returns:** :doc:`Model ` * **Defined in:** - `addon.ts:220 `__ + `addon.ts:234 `__ .. rubric:: getFriendlyName + name: getFriendlyName * @@ -92,7 +93,7 @@ Methods A string with a friendly name of the model. * **Defined in:** - `addon.ts:200 `__ + `addon.ts:240 `__ .. rubric:: getName @@ -110,7 +111,7 @@ Methods A string with the name of the model. * **Defined in:** - `addon.ts:196 `__ + `addon.ts:245 `__ .. rubric:: getOutputShape @@ -126,7 +127,7 @@ Methods * **Returns:** number[] * **Defined in:** - `addon.ts:201 `__ + `addon.ts:250 `__ .. rubric:: getOutputSize @@ -142,7 +143,7 @@ Methods * **Returns:** number[] * **Defined in:** - `addon.ts:198 `__ + `addon.ts:254 `__ .. rubric:: getOutputElementType :name: getOutputElementType @@ -168,7 +169,7 @@ Methods * **Returns:** string * **Defined in:** - `addon.ts:245 `__ + `addon.ts:259 `__ .. rubric:: input @@ -185,7 +186,7 @@ Methods * **Returns:** :doc:`Output ` * **Defined in:** - `addon.ts:219 `__ + `addon.ts:264 `__ .. code-block:: ts @@ -207,7 +208,7 @@ Methods * **Returns:** :doc:`Output ` * **Defined in:** - `addon.ts:224 `__ + `addon.ts:269 `__ .. code-block:: ts @@ -229,7 +230,7 @@ Methods * **Returns:** :doc:`Output ` * **Defined in:** - `addon.ts:229 `__ + `addon.ts:274 `__ .. rubric:: isDynamic @@ -245,7 +246,7 @@ Methods * **Returns:** boolean * **Defined in:** - `addon.ts:234 `__ + `addon.ts:279 `__ .. rubric:: output @@ -254,7 +255,26 @@ Methods .. code-block:: ts - output(nameOrId?): Output + output(): Output + + It gets the output of the model. + If a model has more than one output, this method throws an exception. + + * **Returns:** :doc:`Output ` + + * **Defined in:** + `addon.ts:284 `__ + + +.. rubric:: output + +* + + .. code-block:: ts + + output(name): Output + + It gets the output of the model identified by the tensor name. * **Parameters:** @@ -262,12 +282,32 @@ Methods .. code-block:: ts - nameOrId: string|number + name: string * **Returns:** :doc:`Output ` * **Defined in:** - `addon.ts:194 `__ + `addon.ts:289 `__ + + + .. code-block:: ts + + output(index): Output + + It gets the output of the model identified by the index. + + * **Parameters:** + + - ``Optional`` + + .. code-block:: ts + + index: number + + * **Returns:** :doc:`Output ` + + * **Defined in:** + `addon.ts:294 `__ .. rubric:: setFriendlyName @@ -279,6 +319,10 @@ Methods setFriendlyName(name): void + Sets a friendly name for the model. This does not overwrite the unique + model name and is retrieved via :ref:`Model.getFriendlyName `. + Mainly used for debugging. + * **Parameters:** - name: string @@ -286,4 +330,4 @@ Methods * **Returns:** void * **Defined in:** - `addon.ts:199 `__ \ No newline at end of file + `addon.ts:301 `__ \ No newline at end of file diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/Output.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/Output.rst index b359f27f68cd46..5748e26a706ebc 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/Output.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/Output.rst @@ -14,7 +14,7 @@ Interface Output } * **Defined in:** - `addon.ts:566 `__ + `addon.ts:584 `__ Properties @@ -31,7 +31,7 @@ Properties anyName: string - **Defined in:** - `addon.ts:567 `__ + `addon.ts:585 `__ @@ -44,7 +44,7 @@ Properties shape: number[] - **Defined in:** - `addon.ts:568 `__ + `addon.ts:586 `__ Methods @@ -62,7 +62,7 @@ Methods * **Returns:** string * **Defined in:** - `addon.ts:570 `__ + `addon.ts:588 `__ .. rubric:: getPartialShape @@ -75,7 +75,7 @@ Methods * **Returns:** :doc:`PartialShape ` * **Defined in:** - `addon.ts:572 `__ + `addon.ts:590 `__ .. rubric:: getShape @@ -88,7 +88,7 @@ Methods * **Returns:** number[] * **Defined in:** - `addon.ts:571 `__ + `addon.ts:589 `__ .. rubric:: toString @@ -101,5 +101,5 @@ Methods * **Returns:** string * **Defined in:** - `addon.ts:569 `__ + `addon.ts:587 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/OutputInfo.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/OutputInfo.rst index 46566318300dc9..4739e761778d3c 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/OutputInfo.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/OutputInfo.rst @@ -8,7 +8,7 @@ Interface OutputInfo } * **Defined in:** - `addon.ts:599 `__ + `addon.ts:617 `__ Methods @@ -26,5 +26,5 @@ Methods * **Returns** :doc:`OutputTensorInfo ` * **Defined in:** - `addon.ts:600 `__ + `addon.ts:618 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/OutputTensorInfo.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/OutputTensorInfo.rst index 1139f97208c15f..9b13d3d4328684 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/OutputTensorInfo.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/OutputTensorInfo.rst @@ -9,7 +9,7 @@ Interface OutputTensorInfo } * **Defined in:** - `addon.ts:581 `__ + `addon.ts:599 `__ Methods @@ -31,7 +31,7 @@ Methods * **Returns** :doc:`InputTensorInfo ` * **Defined in:** - `addon.ts:582 `__ + `addon.ts:600 `__ .. rubric:: setLayout @@ -48,5 +48,5 @@ Methods * **Returns:** :doc:`InputTensorInfo ` * **Defined in:** - `addon.ts:583 `__ + `addon.ts:601 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PartialShape.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PartialShape.rst index ac4a1448740008..ee1c0b1300daa1 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PartialShape.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PartialShape.rst @@ -11,7 +11,7 @@ Interface PartialShape } * **Defined in:** - `addon.ts:612 `__ + `addon.ts:630 `__ Methods @@ -29,7 +29,7 @@ Methods * **Returns:** :doc:`Dimension <../types/Dimension>`\[] * **Defined in:** - `addon.ts:616 `__ + `addon.ts:634 `__ .. rubric:: isDynamic @@ -43,7 +43,7 @@ Methods * **Returns:** boolean * **Defined in:** - `addon.ts:614 `__ + `addon.ts:632 `__ .. rubric:: isStatic @@ -57,7 +57,7 @@ Methods * **Returns:** boolean * **Defined in:** - `addon.ts:613 `__ + `addon.ts:631 `__ .. rubric:: toString @@ -71,5 +71,5 @@ Methods * **Returns:** string * **Defined in:** - `addon.ts:615 `__ + `addon.ts:633 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PartialShapeConstructor.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PartialShapeConstructor.rst index d436c989fe5f97..809fd34966dbb0 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PartialShapeConstructor.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PartialShapeConstructor.rst @@ -10,7 +10,7 @@ Interface PartialShapeConstructor This interface contains constructor of the :doc:`PartialShape ` class. * **Defined in:** - `addon.ts:622 `__ + `addon.ts:640 `__ Constructors @@ -41,5 +41,5 @@ Constructors * **Returns:** :doc:`PartialShape ` - **Defined in** - `addon.ts:628 `__ + `addon.ts:646 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PrePostProcessor.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PrePostProcessor.rst index 2a91e356a800b2..a8e8e01b294082 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PrePostProcessor.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PrePostProcessor.rst @@ -10,7 +10,7 @@ Interface PrePostProcessor } * **Defined in:** - `addon.ts:603 `__ + `addon.ts:621 `__ Methods @@ -28,7 +28,7 @@ Methods * **Returns:** :doc:`PrePostProcessor ` * **Defined in:** - `addon.ts:604 `__ + `addon.ts:622 `__ .. rubric:: input @@ -50,7 +50,7 @@ Methods * **Returns:** :doc:`InputInfo ` * **Defined in:** - `addon.ts:605 `__ + `addon.ts:623 `__ .. rubric:: output @@ -71,5 +71,5 @@ Methods * **Returns:** :doc:`OutputInfo ` * **Defined in:** - `addon.ts:606 `__ + `addon.ts:624 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PrePostProcessorConstructor.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PrePostProcessorConstructor.rst index 3f1dfabd4e0e5e..7276505c2f8dc8 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PrePostProcessorConstructor.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PrePostProcessorConstructor.rst @@ -8,7 +8,7 @@ Interface PrePostProcessorConstructor } * **Defined in:** - `addon.ts:608 `__ + `addon.ts:626 `__ Constructors @@ -30,5 +30,5 @@ Constructors * **Returns:** :doc:`PrePostProcessor ` * **Defined in:** - `addon.ts:609 `__ + `addon.ts:627 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PreProcessSteps.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PreProcessSteps.rst index 22aa3807c33f50..2c232a6283ce12 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PreProcessSteps.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/PreProcessSteps.rst @@ -9,7 +9,7 @@ Interface PreProcessSteps } * **Defined in:** - `addon.ts:585 `__ + `addon.ts:603 `__ Methods @@ -31,5 +31,5 @@ Methods * **Returns:** :doc:`PreProcessSteps ` * **Defined in:** - `addon.ts:586 `__ + `addon.ts:604 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/Tensor.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/Tensor.rst index 0965fe40ba07f2..9b0e19b559cdf8 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/Tensor.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/Tensor.rst @@ -5,8 +5,8 @@ Interface Tensor interface Tensor { data: SupportedTypedArray; - getData(): SupportedTypedArray; getElementType(): element; + getData(): SupportedTypedArray; getShape(): number[]; getSize(): number; @@ -17,7 +17,7 @@ inference. There are different ways to create a tensor. You can find them in :doc:`TensorConstructor ` section. * **Defined in:** - `addon.ts:378 `__ + `addon.ts:390 `__ Properties @@ -44,7 +44,7 @@ Properties or type of array does not match the tensor. - **Defined in:** - `addon.ts:391 `__ + `addon.ts:403 `__ Methods @@ -67,7 +67,7 @@ Methods element type, e.g. ``Float32Array`` corresponds to float32. * **Defined in:** - `addon.ts:401 `__ + `addon.ts:413 `__ .. rubric:: getElementType @@ -82,7 +82,7 @@ Methods * **Returns:** :doc:`element <../enums/element>` * **Defined in:** - `addon.ts:395 `__ + `addon.ts:407 `__ .. rubric:: getShape @@ -98,7 +98,7 @@ Methods * **Returns:** number[] * **Defined in:** - `addon.ts:405 `__ + `addon.ts:417 `__ .. rubric:: getSize @@ -114,5 +114,5 @@ Methods * **Returns:** number[] * **Defined in:** - `addon.ts:409 `__ + `addon.ts:421 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/TensorConstructor.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/TensorConstructor.rst index 7de9d1a4670802..f8f054c012465e 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/TensorConstructor.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/interfaces/TensorConstructor.rst @@ -16,7 +16,7 @@ the user. Any action performed on the ``TypedArray`` will be reflected in this tensor memory. * **Defined in:** - `addon.ts:421 `__ + `addon.ts:433 `__ Constructors @@ -47,7 +47,7 @@ Constructors * **Returns:** :doc:`Tensor ` * **Defined in:** - `addon.ts:428 `__ + `addon.ts:440 `__ .. code-block:: ts @@ -74,7 +74,7 @@ Constructors * **Returns:** :doc:`Tensor ` * **Defined in:** - `addon.ts:437 `__ + `addon.ts:449 `__ .. code-block:: ts @@ -88,5 +88,5 @@ Constructors * **Returns:** :doc:`Tensor ` * **Defined in:** - `addon.ts:444 `__ + `addon.ts:459 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/types/Dimension.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/types/Dimension.rst index 5ca2c23085e179..d8993d3e39f86f 100644 --- a/docs/sphinx_setup/api/nodejs_api/openvino-node/types/Dimension.rst +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/types/Dimension.rst @@ -6,5 +6,5 @@ Type alias Dimension Dimension: number|[number,number] * **Defined in:** - `addon.ts:564 `__ + `addon.ts:582 `__ diff --git a/docs/sphinx_setup/api/nodejs_api/openvino-node/types/OVAny.rst b/docs/sphinx_setup/api/nodejs_api/openvino-node/types/OVAny.rst new file mode 100644 index 00000000000000..0c194f9c703b99 --- /dev/null +++ b/docs/sphinx_setup/api/nodejs_api/openvino-node/types/OVAny.rst @@ -0,0 +1,10 @@ +Type alias OVAny +================ + +.. code-block:: ts + + OVAny: string | number | boolean + +* **Defined in:** + `addon.ts:24 `__ +