CICoreMLModel

Trait CICoreMLModel 

Source
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§

Source

unsafe fn inputImage(&self) -> Option<Retained<CIImage>>
where Self: Sized + Message,

Available on crate feature CIImage only.

The image to use as an input for the effect.

Source

unsafe fn setInputImage(&self, input_image: Option<&CIImage>)
where Self: Sized + Message,

Available on crate feature CIImage only.

Setter for inputImage.

Source

unsafe fn model(&self) -> Retained<MLModel>
where Self: Sized + Message,

Available on crate feature objc2-core-ml only.

The CoreML model to be used for applying effect on the image.

Source

unsafe fn setModel(&self, model: &MLModel)
where Self: Sized + Message,

Available on crate feature objc2-core-ml only.

Setter for model.

Source

unsafe fn headIndex(&self) -> c_float
where Self: Sized + Message,

A number to specify which output of a multi-head CoreML model should be used for applying effect on the image.

Source

unsafe fn setHeadIndex(&self, head_index: c_float)
where Self: Sized + Message,

Setter for headIndex.

Source

unsafe fn softmaxNormalization(&self) -> bool
where Self: Sized + Message,

A boolean value to specify that Softmax normalization should be applied to the output of the model.

Source

unsafe fn setSoftmaxNormalization(&self, softmax_normalization: bool)
where Self: Sized + Message,

Trait Implementations§

Source§

impl ProtocolType for dyn CICoreMLModel

Source§

const NAME: &'static str = "CICoreMLModel"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn CICoreMLModel
where T: ?Sized + Message + CICoreMLModel,

Implementations on Foreign Types§

Source§

impl<T> CICoreMLModel for ProtocolObject<T>
where T: ?Sized + CICoreMLModel,

Implementors§