forked from progrium/darwinkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcore_ml_model.gen.go
111 lines (92 loc) · 3.76 KB
/
core_ml_model.gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// Code generated by DarwinKit. DO NOT EDIT.
package vision
import (
"unsafe"
"github.com/progrium/macdriver/macos/coreml"
"github.com/progrium/macdriver/macos/foundation"
"github.com/progrium/macdriver/objc"
)
// The class instance for the [CoreMLModel] class.
var CoreMLModelClass = _CoreMLModelClass{objc.GetClass("VNCoreMLModel")}
type _CoreMLModelClass struct {
objc.Class
}
// An interface definition for the [CoreMLModel] class.
type ICoreMLModel interface {
objc.IObject
FeatureProvider() coreml.FeatureProviderObject
SetFeatureProvider(value coreml.PFeatureProvider)
SetFeatureProviderObject(valueObject objc.IObject)
InputImageFeatureName() string
SetInputImageFeatureName(value string)
}
// A container for the model to use with Vision requests. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vncoremlmodel?language=objc
type CoreMLModel struct {
objc.Object
}
func CoreMLModelFrom(ptr unsafe.Pointer) CoreMLModel {
return CoreMLModel{
Object: objc.ObjectFrom(ptr),
}
}
func (cc _CoreMLModelClass) ModelForMLModelError(model coreml.IModel, error foundation.IError) CoreMLModel {
rv := objc.Call[CoreMLModel](cc, objc.Sel("modelForMLModel:error:"), objc.Ptr(model), objc.Ptr(error))
return rv
}
// Creates a model container to be used with VNCoreMLRequest. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vncoremlmodel/2890148-modelformlmodel?language=objc
func CoreMLModel_ModelForMLModelError(model coreml.IModel, error foundation.IError) CoreMLModel {
return CoreMLModelClass.ModelForMLModelError(model, error)
}
func (cc _CoreMLModelClass) Alloc() CoreMLModel {
rv := objc.Call[CoreMLModel](cc, objc.Sel("alloc"))
return rv
}
func (cc _CoreMLModelClass) New() CoreMLModel {
rv := objc.Call[CoreMLModel](cc, objc.Sel("new"))
rv.Autorelease()
return rv
}
func NewCoreMLModel() CoreMLModel {
return CoreMLModelClass.New()
}
func (c_ CoreMLModel) Init() CoreMLModel {
rv := objc.Call[CoreMLModel](c_, objc.Sel("init"))
return rv
}
// An optional object to support inputs outside Vision. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vncoremlmodel/3131933-featureprovider?language=objc
func (c_ CoreMLModel) FeatureProvider() coreml.FeatureProviderObject {
rv := objc.Call[coreml.FeatureProviderObject](c_, objc.Sel("featureProvider"))
return rv
}
// An optional object to support inputs outside Vision. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vncoremlmodel/3131933-featureprovider?language=objc
func (c_ CoreMLModel) SetFeatureProvider(value coreml.PFeatureProvider) {
po0 := objc.WrapAsProtocol("MLFeatureProvider", value)
objc.Call[objc.Void](c_, objc.Sel("setFeatureProvider:"), po0)
}
// An optional object to support inputs outside Vision. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vncoremlmodel/3131933-featureprovider?language=objc
func (c_ CoreMLModel) SetFeatureProviderObject(valueObject objc.IObject) {
objc.Call[objc.Void](c_, objc.Sel("setFeatureProvider:"), objc.Ptr(valueObject))
}
// The name of the MLFeatureValue that Vision sets from the request handler. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vncoremlmodel/3131934-inputimagefeaturename?language=objc
func (c_ CoreMLModel) InputImageFeatureName() string {
rv := objc.Call[string](c_, objc.Sel("inputImageFeatureName"))
return rv
}
// The name of the MLFeatureValue that Vision sets from the request handler. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vncoremlmodel/3131934-inputimagefeaturename?language=objc
func (c_ CoreMLModel) SetInputImageFeatureName(value string) {
objc.Call[objc.Void](c_, objc.Sel("setInputImageFeatureName:"), value)
}