init(trainingData:parameters:annotationType:)
Creates an object detector with a data source.
Declaration
init(trainingData: MLObjectDetector.DataSource, parameters: MLObjectDetector.ModelParameters = .init(), annotationType: MLObjectDetector.AnnotationType) throwsParameters
- trainingData:
A data source that contains the annotated images the task uses to train the object detector.
- parameters:
An Modelparameters Swift.struct instance you use to set the model configuration settings for the training session.
- annotationType:
The format your data source uses for its image annotations.
Discussion
Use this initializer to create an object detector with an MLObjectDetector.DataSource.