Skip to main content

MachineLearning.ModelState

Enum

Describes the current state of the MLComponent model.

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

Describes the current state of the MLComponent model. For more information, see the MLComponent Scripting guide.

Index

Example

//@input Component.MLComponent mlComponent
if(script.mlComponent.state == MachineLearning.ModelState.Idle) {
script.mlComponent.runScheduled(true, MachineLearning.FrameTiming.Update, MachineLearning.FrameTiming.OnRender);
}

Enumeration Members

Idle

Idle: number

Model is built and ready to run


Loading

Loading: number

Model is loading


LoadingError

LoadingError: number

An error was encountered while loading the model.


NotReady

NotReady: number

Model is not ready to run


Running

Running: number

Model is running