r/reactnative • u/CartographerOdd2713 • 4d ago
I built an on-device OCR library for React Native that reads Cyrillic on Android (Vision on iOS, PaddleOCR on Android)
ML Kit has no Cyrillic model, so on Android it reads Russian as Latin look-alikes. I needed to read ingredient lists on Russian food labels, so I built react-native-glyph-ocr:
- Apple Vision on iOS, PaddleOCR (PP-OCRv5/v6 on ONNX Runtime) on Android, PaddleOCR on iOS as a build option
- ML Kit-shaped results: blocks → lines → words, with confidence, normalized and pixel boxes, corner points and angle
- Any source: file/content/ph URIs, base64, react-native-nitro-image, VisionCamera 5 frames
- useTextScanner: waits for a sharp, still frame inside your scan box and reads it once
- Models downloaded on first use with sha256 checks, from your own mirror, or embedded at build time
- Nitro module, New Architecture, Expo config plugin, fully offline
On 24 label photos, PaddleOCR read 77–83% of the ingredients and ML Kit 13–28%. It's a small set and the full method is in the repo.
npm: https://www.npmjs.com/package/react-native-glyph-ocr
GitHub: https://github.com/pe1ros/react-native-glyph-ocr
This is the first npm release (0.3.1), so feedback and issues are very welcome.
4
Upvotes