There are many tutorials how to print top detected objects on image with ML, like
let request = VNCoreMLRequest(model: model) { [weak self] request, error in
guard let results = request.results as? [VNClassificationObservation],
let topResult = results.first else {
fatalError("unexpected result type from VNCoreMLRequest")
}
but is there any way to solve the opposite problem: with a given key-word get the probability of that the object with this key is present on the picture ?