OCR 与 Expo 和 React Native

OCR with Expo and React Native

我正在尝试构建一个执行 OCR 的移动应用程序。我决定使用 React Native,因为它是跨平台的,而且它提供的 SDK 是 Expo。但是,我不太确定执行 OCR 的最佳方法是什么。我找到了 this tesseract ocr library but it seems that I need to eject from expo to use that because it relies on native code. I've also tried using this pure js library but that depends on util from the Node Standard Library which isn't supported by Expo. I've also the anyline library,但似乎使用 Anyline 需要付费,我希望尽可能避免。

使用 tessaract OCR 库并退出 expo 的最佳途径是什么?

似乎没有 expo-native 执行 OCR 的方法:https://expo.canny.io/feature-requests/p/support-optical-character-recognition-ocr

您是否尝试过用于 OCR 的 firebase ml-kit 设备端方法?它就像一个魅力。我在我的 React Native 应用程序 https://scantexttovoice.page.link/Zi7X 中使用了相同的内容(在 android 移动设备中打开此 link)。之前我尝试过 tesseract 但转换率不好所以我决定使用 firebase ml 套件。您也可以通过在 firebase 中创建自定义模型来使用 TensorFlow 功能