🧠Diagnosing and Fixing Memory-Related Crashes in an iOS OCR App
Investigation and fixes for a 6.7% crash rate in KotenOCR, an iOS OCR app using ONNX Runtime with 6 models totaling ~230MB on disk.
iosswiftmemoryonnx
Investigation and fixes for a 6.7% crash rate in KotenOCR, an iOS OCR app using ONNX Runtime with 6 models totaling ~230MB on disk.

KotenOCR v1.3.0 adds NDLOCR-Lite support for modern printed text OCR alongside the existing classical text (kuzushiji) mode, with one-tap mode switching and parallelized recognition for up to 6.7x speedup.

Using withThrowingTaskGroup to parallelize OCR recognition in an iOS app, achieving 1.4x to 6.7x speedup depending on the number of detected text regions.

KotenOCR is a free iOS app that runs the NDL Koten OCR-Lite model entirely on-device, enabling offline recognition of kuzushiji (classical Japanese cursive script) from photos.