pub unsafe trait CICoreMLModel: CIFilterProtocol {
// Provided methods
unsafe fn inputImage(&self) -> Option<Retained<CIImage>>
where Self: Sized + Message { ... }
unsafe fn setInputImage(&self, input_image: Option<&CIImage>)
where Self: Sized + Message { ... }
unsafe fn model(&self) -> Retained<MLModel>
where Self: Sized + Message { ... }
unsafe fn setModel(&self, model: &MLModel)
where Self: Sized + Message { ... }
unsafe fn headIndex(&self) -> c_float
where Self: Sized + Message { ... }
unsafe fn setHeadIndex(&self, head_index: c_float)
where Self: Sized + Message { ... }
unsafe fn softmaxNormalization(&self) -> bool
where Self: Sized + Message { ... }
unsafe fn setSoftmaxNormalization(&self, softmax_normalization: bool)
where Self: Sized + Message { ... }
}Available on crate features
CIFilter and CIFilterBuiltins only.Expand description
The protocol for the CoreML Model Filter filter.
Generates output image by applying input CoreML model to the input image.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn inputImage(&self) -> Option<Retained<CIImage>>
Available on crate feature CIImage only.
unsafe fn inputImage(&self) -> Option<Retained<CIImage>>
CIImage only.The image to use as an input for the effect.
Sourceunsafe fn setInputImage(&self, input_image: Option<&CIImage>)
Available on crate feature CIImage only.
unsafe fn setInputImage(&self, input_image: Option<&CIImage>)
CIImage only.Setter for inputImage.
Sourceunsafe fn model(&self) -> Retained<MLModel>
Available on crate feature objc2-core-ml only.
unsafe fn model(&self) -> Retained<MLModel>
objc2-core-ml only.The CoreML model to be used for applying effect on the image.
Sourceunsafe fn setModel(&self, model: &MLModel)
Available on crate feature objc2-core-ml only.
unsafe fn setModel(&self, model: &MLModel)
objc2-core-ml only.Setter for model.
Sourceunsafe fn headIndex(&self) -> c_float
unsafe fn headIndex(&self) -> c_float
A number to specify which output of a multi-head CoreML model should be used for applying effect on the image.
Sourceunsafe fn setHeadIndex(&self, head_index: c_float)
unsafe fn setHeadIndex(&self, head_index: c_float)
Setter for headIndex.
Sourceunsafe fn softmaxNormalization(&self) -> bool
unsafe fn softmaxNormalization(&self) -> bool
A boolean value to specify that Softmax normalization should be applied to the output of the model.
Sourceunsafe fn setSoftmaxNormalization(&self, softmax_normalization: bool)
unsafe fn setSoftmaxNormalization(&self, softmax_normalization: bool)
Setter for softmaxNormalization.