7 ms·
Show HN: Turn your iPhone into a local OCR server using Vision Framework
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.
- sgt 1y agoCool - 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 1y agoI also developed a macOS version using the Rust programming language! https://github.com/riddleling/macocr https://github.com/riddleling/macocr
- gumboshoes 1y agoLike 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.
- skyzouwdev 1y agoThat’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 1y agoI 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 1y agoI 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!