Readit News logoReadit News
Posted by u/riddleling 18 days ago
Show HN: Turn your iPhone into a local OCR server using Vision Frameworkgithub.com/riddleling/iOS...
Built an iOS app that runs a local OCR server using Apple's Vision Framework.

Creates a REST API endpoint accessible from any device on your network. No cloud services needed - everything processes locally on the phone.

Available on App Store (searching "OCR Server").

Would appreciate feedback on the architecture or similar mobile-as-server projects you've seen.

gumboshoes · 18 days ago
Like many OCR solutions, this unfortunately is incomplete. For serious work the final output should be something like a PDF of the original image with the OCRed text embedded. Why? Ground truth. OCR is not reliable enough to isolate its output from the source. The original needs to be available for checking.
sgt · 18 days ago
Cool - although I can't help to think that running a macOS VM and run the Vision Framework tool on it will be less clunky in the long run. Phones don't like to run with screens on 24/7 etc.
riddleling · 18 days ago
I also developed a macOS version using the Rust programming language! https://github.com/riddleling/macocr
skyzouwdev · 17 days ago
That’s a cool approach. Running OCR locally avoids the usual privacy and latency trade-offs, and turning the phone into a network-accessible endpoint is clever.

Curious about performance — how fast is the Vision Framework on-device compared to something like Tesseract or cloud OCR APIs? And does the app stay responsive if the phone is handling multiple requests at once?

riddleling · 17 days ago
I tested it on my iPhone SE 2, and the performance was not great. I’ll run new tests after I get a new iPhone.
riddleling · 7 days ago
I just switched the HTTP server from Swifter to Vapor, and changed the text recognition API from VNRecognizeTextRequest to RecognizeTextRequest. The OCR speed is faster now—feel free to try it out!