Closed sparklaunch closed 1 year ago
Some news about this issue? I got the same bug in my app.
It's been a couple of weeks and nobody seems to even care about it.
@sparklaunch or @DiguinhoLNS, did you manage to find a workaround or have you tried another ocr-lib?
I have tried a new lib, rn-text-detector
Has anyone managed to resolve the issue? Does this other rn-text-detector lib you tested work? I'm after trying to make this functionality also in an app. I got it using the Google Vision API, but I'm looking for something that doesn't use the internet
This issue is related to #142.
I managed to put text recognition on images in my app.
I was able to do this for the first time using Google's cloud service, the Google Vision API It is a free service with up to 1000 uses per month, after which it becomes paid.
Today I use the Google ML Kit installed directly on the device, it works offline and is completely free. The Google Vision API today turns out to be the most accurate cloud version of the Google ML kit.
For those who want to know how to use Google Vision, it's very simple, just make an API call sending your image via base64 and it returns an object with various information about the text in it, including an attribute with all the text at once You need to create a service on Google Cloud Platform and add a payment method. https://blog.logrocket.com/build-text-detector-react-native/ remember, you need to add a payment method, this is not in the tutorial above, otherwise, everything is the same.
I'm using Google ML Kit with Text Recognizer module. https://developers.google.com/ml-kit/guides https://developers.google.com/ml-kit/vision/text-recognition
For those unfamiliar, it's a mobile SDK that brings Google's machine learning expertise to Android and iOS apps. Use our easy-to-use Vision and Natural Language APIs to solve common app challenges or create new user experiences. All use Google's best ML models and are offered at no financial cost.
All ML Kit APIs run on the device, enabling real-time use cases where you want to process a live camera feed, for example. It also means the functionality is available offline.
There are 2 ways to use it:
Installing via Firebase: https://github.com/invertase/react-native-firebase/tree/main/packages/ml
Installing by some lib that implements the settings automatically: There are several that try to do this, but many are deprecated, I'm using this one: react-native-ml-kit https://github.com/a7medev/react-native-ml-kit/tree/main/text-recognition
As I said above, I didn't install it via firebase, in this case I used this react-native-ml-kit. Because I found it very simple to use, I didn't get to test it by installing it via firebase.
import TextRecognition from '@react-native-ml-kit/text-recognition';
const result = await TextRecognition.recognize(imageURL);
console.log('Recognized text:', result.text);
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
After the installation, I tried "yarn android" to build the app and it failed with the message saying, "Plugin with id 'maven' not found".
To Reproduce
Expected behavior Successful build for Android.
Screenshots
Smartphone (please complete the following information):
Additional context