mateuscardosogs / react-native-firebase-mlkit

MIT License
89 stars 42 forks source link

Weird detection responses #2

Closed tushgup closed 5 years ago

tushgup commented 6 years ago

Hey, thank you for creating this library, I think it'll be at the core of the next app I'm building..

I tried to make this work alongside React-native-camera, the process was pretty straightforward but I ran into errors while logging out the output of the detection.

For any image, the On Device Response is either gibberish or empty. And the cloud response fails with a promise rejection.

Here's what it looks like: image

Would appreciate some help with this. Thanks again!

mateuscardosogs commented 6 years ago

Have you added google-service in the application to have your mlkit authentication? and the cloud method only works if you have the blaze package of the signed firebase in your account.

tushgup commented 6 years ago

Ah! Yes, I do have google-services.json in my android/app folder. Didn't know about the Blaze package... I've compared the on-device text recognition to other RN npm packages which also use Google Vision, and even though this seems "simpler" to implement, I still see gibberish results for the same image. Is this because of a particular on-device model you're using? Would love to know more.

mateuscardosogs commented 5 years ago

I do not use any specific package for text recognition, all information is read directly on the device, I believe the problem is on the device you are using, try using another device and check if the same problem happens.