Created
March 27, 2018 14:02
-
-
Save codePrincess/2a97c70f5900d1c4bda516cb66bc18cd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func recognizeWithLocalModel(_ image: UIImage) { | |
if let data = generateMultiArrayFrom(image: image) { | |
guard let modelOutput = try? singleNumberModel?.prediction(input: data) else { | |
return | |
} | |
if let result = modelOutput?.classLabel { | |
self.addLabelForOCR(text: "\(result)") | |
} else { | |
print("no result available") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment