Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MBS FileMaker Plugin Example Databases

CoreML

All examples are included with download of MBS FileMaker Plugin.

CoreML.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts2
Value Lists0
Custom Functions0
Custom Menus0
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenOff
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
CoreML
4 fields defined, 1 record
CoreML

Fields

Table Name: CoreML - 4 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
Model PathNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      Model DescriptionNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          Input PictureNormal, BinaryAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
              OutputNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German

                  Layout Objects: CoreML

                  Regular Fields

                  Field Name: CoreML::Model Path
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 52 pt
                  • Left: 138 pt
                  • Bottom: 73 pt
                  • Right: 541 pt
                  • Anchoring: Left, Top
                  Field Format:
                  • Edit Box
                  Field Behavior:
                  • Allow field to be entered: In Find mode, In Browse mode
                  • Touch keyboard type: Default for Data Type
                  • Go to next field using: Tab key
                  Yes

                  Field Name: CoreML::Model Description
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 119 pt
                  • Left: 138 pt
                  • Bottom: 521 pt
                  • Right: 541 pt
                  • Anchoring: Left, Top
                  Field Format:
                  • Edit Box
                  Field Behavior:
                  • Allow field to be entered: In Find mode, In Browse mode
                  • Touch keyboard type: Default for Data Type
                  • Go to next field using: Tab key
                  Yes

                  Field Name: CoreML::Input Picture
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 52 pt
                  • Left: 694 pt
                  • Bottom: 177 pt
                  • Right: 1008 pt
                  • Anchoring: Left, Top
                  Field Format:
                  • Edit Box
                  Field Behavior:
                  • Allow field to be entered: In Find mode, In Browse mode
                  • Touch keyboard type: Default for Data Type
                  • Go to next field using: Tab key
                  No

                  Field Name: CoreML::Output
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 183 pt
                  • Left: 694 pt
                  • Bottom: 521 pt
                  • Right: 1008 pt
                  • Anchoring: Left, Top
                  Field Format:
                  • Edit Box
                  Field Behavior:
                  • Allow field to be entered: In Find mode, In Browse mode
                  • Touch keyboard type: Default for Data Type
                  • Go to next field using: Tab key
                  Yes

                  Buttons

                  Button PropertiesCoordinatesScript/Script Step
                    Type:
                  • Text: Load Model
                  • Top: 79 pt
                  • Left: 139 pt
                  • Bottom: 109 pt
                  • Right: 277 pt
                  • Anchoring: Left, Top
                  Perform Script [ “Load Model” ]

                  Scripts:


                  Button PropertiesCoordinatesScript/Script Step
                    Type:
                  • Text: Run
                  • Top: 81 pt
                  • Left: 403 pt
                  • Bottom: 111 pt
                  • Right: 541 pt
                  • Anchoring: Left, Top
                  Perform Script [ “Run” ]

                  Scripts:


                  Script Hierarchy

                  Load Model
                  Run

                  Next Script: [Run]
                  Script NameLoad Model
                  Run script with full access privilegesOff
                  Include In MenuYes
                  Layouts that use this script
                  Scripts that use this script
                    Script Definition
                    Script Steps
                    • If [ $$ML > 0 ]
                    • Set Variable [ $r; Value:MBS("CoreML.Release"; $$ML) ]
                    • Set Variable [ $$ML; Value:"" ]
                    • End If
                    • If [ MBS("CoreML.Available") ≠ 1 ]
                    • Show Custom Dialog [ Title: "Core ML not available"; Message: "Please run on macOS 10.13 High Sierra"; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                    • Exit Script [ Result: "" ]
                    • End If
                    • Set Variable [ $path; Value:CoreML::Model Path ]
                    • #If model needs compilation, we compile it
                    • If [ Right ( CoreML::Model Path; 8 ) = ".mlmodel" ]
                    • Set Variable [ $r; Value:MBS("CoreML.CompileModel"; CoreML::Model Path) ]
                    • If [ MBS("IsError") ]
                    • Show Custom Dialog [ Title: "Failed to compile"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                    • Set Variable [ $$ML; Value:"" ]
                    • Else
                    • Set Variable [ $path; Value:$r ]
                    • // Set Field [ CoreML::Model Path; $r ]
                    • End If
                    • End If
                    • #Now load compiled model
                    • Set Variable [ $$ML; Value:MBS("CoreML.OpenModel"; $path) ]
                    • If [ MBS("IsError") ]
                    • Show Custom Dialog [ Title: "Failed to load"; Message: $$ML; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                    • Set Variable [ $$ML; Value:"" ]
                    • Else
                    • Set Field [ CoreML::Model Description; MBS("CoreML.Description"; $$ML) ]
                    • End If
                    Fields used in this script
                    Scripts used in this script
                      Layouts used in this script
                        Tables used in this script
                        Table occurrences used by this script
                        Custom Functions used by this script
                          Custom menu set used by this script

                            Previous Script: [Load Model]
                            Script NameRun
                            Run script with full access privilegesOff
                            Include In MenuYes
                            Layouts that use this script
                            Scripts that use this script
                              Script Definition
                              Script Steps
                              • If [ Length ( $$ML ) = 0 ]
                              • Show Custom Dialog [ Message: "Please load model first."; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                              • Exit Script [ 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; "data"; CoreML::Input Picture) ]
                              • Set Variable [ $r; Value:MBS("CoreML.PredictionFromFeatures"; $$ML) ]
                              • If [ MBS("IsError") ]
                              • Show Custom Dialog [ Title: "Failed to process"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                              • Else
                              • Set Field [ CoreML::Output; $r ]
                              • Show Custom Dialog [ Title: "Result"; Message: MBS( "JSON.GetPathItem"; $r; "classLabel";1 ); Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                              • End If
                              Fields used in this script
                              Scripts used in this script
                                Layouts used in this script
                                  Tables used in this script
                                  Table occurrences used by this script
                                  Custom Functions used by this script
                                    Custom menu set used by this script

                                      Download example: CoreML

                                      Used functions: