jonathanpalma / react-native-tesseract-ocr

Tesseract OCR wrapper for React Native
MIT License
558 stars 172 forks source link

Failed to install the app. #146

Closed sparklaunch closed 1 year ago

sparklaunch commented 1 year ago

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

  1. yarn add react-native-tesseract-ocr.
  2. npx pod-install.
  3. yarn android.

Expected behavior Successful build for Android.

Screenshots 스크린샷 2023-01-03 오전 8 46 35

Smartphone (please complete the following information):

Additional context 스크린샷 2023-01-03 오전 8 48 51

DiguinhoLNS commented 1 year ago

Some news about this issue? I got the same bug in my app.

sparklaunch commented 1 year ago

It's been a couple of weeks and nobody seems to even care about it.

esmailbenmoussa commented 1 year ago

@sparklaunch or @DiguinhoLNS, did you manage to find a workaround or have you tried another ocr-lib?

DiguinhoLNS commented 1 year ago

I have tried a new lib, rn-text-detector

Aszurar commented 1 year ago

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

killatsignlife commented 1 year ago

This issue is related to #142.

Aszurar commented 1 year ago

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:

  1. Installing via Firebase: https://github.com/invertase/react-native-firebase/tree/main/packages/ml

  2. 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);
stale[bot] commented 1 year ago

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.