a7medev / react-native-ml-kit

React Native On-Device Machine Learning w/ Google ML Kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

some barcode decoding problems

Productivix opened this issue · comments

What happened?

First : very good, problems free and light to compile package, congrats !

I went far in the barcode decoding and mention some problems :

  • Seems to not take all the codes when mixed on a same picture : ex 128 codes (format 1) and format 16 : the app do not consider the 16 format (Datamatrix)

1D and 2 D codes mixed : depending the 1st the app will find , will not mix : so either he decodes only the 1D or only the 2D

(tools : https://barcode.tec-it.com/en ,
I remains at your disposal for testing improvments !

Version

@react-native-ml-kit/barcode-scanning: V1.2.0
30-codes-feuille.pdf

Which ML Kit packages do you use?

30-codes-feuille.pdf

  • @react-native-ml-kit/barcode-scanning
  • @react-native-ml-kit/face-detection
  • @react-native-ml-kit/identify-languages
  • @react-native-ml-kit/image-labeling
  • @react-native-ml-kit/text-recognition
  • @react-native-ml-kit/translate-text

What platforms are you seeing this issue on?

  • Android
  • iOS

System Information

System:
OS: Windows 10 10.0.19043
CPU: (4) x64 Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
Memory: 1.53 GB / 7.70 GB
Binaries:
Node: 16.14.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.13.1 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
AllowAllTrustedApps: Enabled
IDEs:
Android Studio: Not Found
Visual Studio: Not Found
Languages:
Java: Not Found
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.1 => 0.70.1
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to Reproduce

just select the images given in th example given.

"dependencies": {
"@react-native-ml-kit/barcode-scanning": "^1.2.0",
"react": "18.1.0",
"react-native": "0.70.1",
"react-native-image-crop-picker": "^0.38.0",
"react-native-keyboard-aware-scroll-view": "^0.9.5"
},
yarn
yarn run-android
(no more need to link)

thanks !

I see that in fact it is NOT a bug, it is normal :
in https://developers.google.com/ml-kit/vision/barcode-scanning/android you can read :
"Note: For a Data Matrix code to be recognized, the code must intersect the center point of the input image. Consequently, only one Data Matrix code can be recognized in an image."

Hi @Productivix, thanks for bringing this up. This library uses Google's ML Kit barcode scanning model/package on Android and iOS, meaning that we don't have control over the scanning behavior.