Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Runs model with set parameters.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CoreML | 7.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |
Parameter | Description | Example |
---|---|---|
CoreMLRef | The reference number to the model. | $Model |
Returns JSON or error.
Run model:
If [ Length ( $$ML ) = 0 ]
Show Custom Dialog [ "Please load model first." ]
Exit Script [ Text Result: "" ]
End If
Set Variable [ $r ; Value: MBS("CoreML.Clear"; $$ML) ]
# The Resnet50 model we use for testing, needs a specific image size
Set Variable [ $r ; Value: MBS("CoreML.AddImageParameter"; $$ML; "image"; CoreML::Input Picture) ]
Set Variable [ $r ; Value: MBS("CoreML.PredictionFromFeatures"; $$ML) ]
If [ MBS("IsError") ]
Show Custom Dialog [ "Failed to process" ; $r ]
Else
Set Field [ CoreML::Output ; $r ]
Show Custom Dialog [ "Result" ; MBS( "JSON.GetPathItem"; $r; "classLabel";1 ) ]
End If
This function checks for a license.
Created 16th September 2017, last changed 17th October 2019