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.