-
Notifications
You must be signed in to change notification settings - Fork 0
MachineLearning
init(_ model: MLModel)
func detect(in image: UIImage, maxResult: Int? = nil, completion: @escaping ([(String, Float)]?, GenericError?) -> Void)
func detectModel(in image: UIImage, model: MLModel, maxResult: Int? = nil, completion: @escaping ([(String, Float)]?, GenericError?) -> Void)func detectObject(in image: UIImage, maxResult: Int? = nil, completion: @escaping ([(String, Float)]?, GenericError?) -> Void)func detectPlaces(in image: UIImage, maxResult: Int? = nil, completion: @escaping ([(String, Float)]?, GenericError?) -> Void)
-
init(_ model: MLModel): Create a ImageVision object with a model. Any further call todetect(in:maxResult:completion)will reuse this model. -
func detect(in image: UIImage, maxResult: Int? = nil, completion: @escaping ([(String, Float)]?, GenericError?) -> Void): Start a detection on image using model provided atinit(model:). You can specify the maximum number of result found with maxResult. When detection is done, an array of result (String, Float) is returned, containing the label of object recognized and the accuracy of the prediction in percentage. An error can also be returned as a GenericError type. See GenericError -
static func detectModel(in image: UIImage, model: MLModel, maxResult: Int? = nil, completion: @escaping ([(String, Float)]?, GenericError?) -> Void): Start a detection on image using model. You can specify the maximum number of result found with maxResult. When detection is done, an array of result (String, Float) is returned, containing the label of object recognized and the accuracy of the prediction in percentage. An error can also be returned as a GenericError type. See GenericError -
static func detectObject(in image: UIImage, maxResult: Int? = nil, completion: @escaping ([(String, Float)]?, GenericError?) -> Void): Start a detection on image using an internal model that detects different objects (It is using a MobileNet model). You can specify the maximum number of result found with maxResult. When detection is done, an array of result (String, Float) is returned, containing the label of object recognized and the accuracy of the prediction in percentage. An error can also be returned as a GenericError type. See GenericError -
static func detectPlaces(in image: UIImage, maxResult: Int? = nil, completion: @escaping ([(String, Float)]?, GenericError?) -> Void): Start a detection on image using an internal model that detects type of places (It is using a GoogLeNetPlaces model). You can specify the maximum number of result found with maxResult. When detection is done, an array of result (String, Float) is returned, containing the label of object recognized and the accuracy of the prediction in percentage. An error can also be returned as a GenericError type. See GenericError