Classes
Methods
(async, static) initialize()
Initialization of the Ailia WASM module.
This must be called exactly once, before creating any Ailia instance.
(static) version() → {string}
Get the Ailia version.
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.
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") |
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") |
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") |
Returns:
True if no error, or False of any error occurred.
- Type
- boolean