Class: Ailia

Ailia()

Class representing an Ailia instance.

Constructor

new Ailia()

Create an instance of Ailia.
Source:

Classes

Ailia

Methods

(async, static) initialize()

Initialization of the Ailia WASM module. This must be called exactly once, before creating any Ailia instance.
Source:

(static) version() → {string}

Get the Ailia version.
Source:
Returns:
A string identifying the current version.
Type
string

destroy()

Destructor of an Ailia instance. Needs to be called to deallocate all WASM memory, once finished to use the Ailia model.
Source:

loadModel(Model) → {boolean}

Loads an ONNX model file for the Ailia instance.
Parameters:
Name Type Description
Model File file (often named with an extension ".onnx.prototxt")
Source:
Returns:
True if no error, or False of any error occurred.
Type
boolean

loadModelAndWeights(model, weights)

Loads both an ONNX model file and the associated weights file, for the Ailia instance.
Parameters:
Name Type Description
model File The model file (often named with an extension ".onnx.prototxt")
weights File The weights file (often named with an extention ".onnx")
Source:

loadWeights(Weights) → {boolean}

Loads an ONNX weights file for the Ailia instance.
Parameters:
Name Type Description
Weights File file (often named with an extension ".onnx")
Source:
Returns:
True if no error, or False of any error occurred.
Type
boolean