Type Method

modelForMLModel:error:

Creates a model container to be used with VNCoreMLRequest.

Declaration

+ (instancetype)modelForMLModel:(MLModel *)model error:(NSError * _Nullable *)error;

Discussion

This method may fail if Vision does not support the created CoreML model. For example, a model that does not accept an image as any of its inputs will yield an VNErrorInvalidModel error.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software