fatalError("faild create VMCoreMLModel") } guard let ciImage = CIImage(image: image) else { fatalError("faild convert CIImage") } let request = VNCoreMLRequest(model: coreMLModel) { request, error in guard let results = request.results as? [VNClassificationObservation] else { fatalError("Error faild results") } if let classification = results.first { self.identifierLabel.text = classification.identifier self.confidenceLabel.text = "\(classification.confidence)" } else { print("error") } } let handler = VNImageRequestHandler(ciImage: ciImage, options: [:]) guard (try? handler.perform([request])) != nil else { fatalError("faild handler.perform”) } ݁Ռ͕ϋϯυϥʔͰฦͬͯ͘ΔͨΊ ॲཧ͍ͨ͠༰Λهड़