"On the latest iOS 18 beta 2, the OCR API,the Translate App and Live Text performs very poorly in recognizing Japanese."
iOS 18 beta 2, Japanese OCR poor perfermance
iOS 18 beta 3 still has this issue.
up
up
Hello @qishengluo, please file a Feedback Assistance report with:
- A few example images with Japanese text that the API was struggling with.
- A sample code to feed the images to the API that recreate the failure.
func visionOCR() {
// IMG_1885.PNG
guard let path = Bundle.main.path(forResource: "IMG_1885", ofType: "PNG") else {
print("Failed to find image")
return
}
guard let image = UIImage(contentsOfFile: path)?.cgImage else {
print("Failed to load image")
return
}
let reqHandler = VNImageRequestHandler(cgImage: image)
let textReq = VNRecognizeTextRequest { req, err in
guard let results = req.results else { return }
for o in results {
let o = o as? VNRecognizedTextObservation
print(o?.topCandidates(1).first?.string ?? "")
}
}
textReq.recognitionLanguages = ["ja-JP"]
textReq.automaticallyDetectsLanguage = true
textReq.usesLanguageCorrection = true
try? reqHandler.perform([textReq])
}
The above code and images work fine on iOS 17, but do not work on iOS 18 beta