intel / inference-engine-node

Bringing the hardware accelerated deep learning inference to Node.js and Electron.js apps.
Apache License 2.0
33 stars 8 forks source link

Compare gaps between Node.js API vs Python IE API #34

Closed lionkunonly closed 3 years ago

lionkunonly commented 3 years ago

The gaps bettwen Node.js API vs Python IE API will be recorded here.

lionkunonly commented 3 years ago

Th investigation on Python API is based on OpenVINO 2020.3.

I investigate the Python APIs by viewing the file at path <openvino_dir>inference engine\ie_bridges\python\src\openvino\ inference_engine\ie_api_impl.hpp. And I ingvestigate the Node.js API by viewing files at path <inference_engine_node_dir>\src\.

Python API (struct IECore) Node.js API (class Core)
getVersions( ) getVersions( )
readNetwork( ) ( From path ) readNetwork( )
readNetwork( ) ( From Data) readNetworkFromData( )
loadNetwork( ) loadNetwork( )
getAvailableDevices( ) getAvailableDevices( )
setConfig( ) setConfig( ) (On the way)
addExtension( ) addExtension( ) (On the way)
importNetwork( ) -
queryNetwork( ) -
registerPlugin( ) -
unregisterPlugin( ) -
registerPlugins( ) -
getMetric( ) -
getConfig( ) -
lionkunonly commented 3 years ago
Python API (struct IENetwork) Node.js API class Network
setBatch( ) -
getBatch( ) -
addOutput( ) -
getLayers( ) -
getInputs( ) getInputsInfo( )
getOutputs( ) getgetOutputsInfo( )
- getName( )
reshape( ) -
serialize( ) -
setStats( ) -
getStats( ) -
load_from_buffer( ) -
lionkunonly commented 3 years ago
Python API (struct IEExecNetwork) Node.js API (class ExecutableNetwork)
createInferRequests( ) createInferRequest( )
GetExecGraphInfo( ) -
infer( ) -
exportNetwork( ) -
getInputs( ) -
getOutputs( ) -
getMetric( ) -
getConfig( ) -
wait( ) -
getIdleRequestId( ) -
lionkunonly commented 3 years ago
Python API (struct InferRequestWrap) Node.js API (class InferRequest)
infer( ) infer( )
infer_async( ) startAsync( )
wait( ) -
setCyCallback( ) -
getBlobPtr( ) getBlob( )
setBatch( ) -
getPerformanceCounts() -
lionkunonly commented 3 years ago
Python API (struct IEPlugin) Node.js API (-)
load( ) -
setConfig( ) -
addCpuExtension( ) -
setInitialAffinity( ) -
queryNetwork( ) -

I do not find corresponding class in Node.js API for the struct IEPlugin.

lionkunonly commented 3 years ago

There are some classes in Node.js API that do not have corresponding API in Python.

The class Blob is used to help user operate the class Blob in OpenVINO. Node.js API (class Blob)
ByteSize( )
Size( )
Rwmap( )
Rmap( )
Wmap( )
Unmap( )
Memmap( )
The class InputInfo and class OutputInfo are used to support operations of the Inputinfo and Outputinfo respectively. Node.js API (class InputInfo) Node.js API (class OutputInfo)
name( ) name( )
getPrecision( ) getPrecision( )
setPrecision( ) setPrecision( )
getLayout( ) getLayout( )
setLayout( ) -
getDims( ) getDims( )
getPreProcess( ) -
The class PreProcessInfo is developing. It is used to support PreProcessInfo in OpenVINO. Node.js API (class PreProcessInfo)
getColorFormat( )
setColorFormat( )
getResizeAlgorithm( )
setResizeAlgorithm( )
getMeanVariant( )
setVariant( )
getPreProcessChannel( ) (On the way)
setPreProcessChannel( ) (On the way)

That is all at this time.

huningxin commented 3 years ago

@artyomtugaryov please help review the comparison table.

huningxin commented 3 years ago

The comparison is done, let's close this issue.