Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Digital Ink Recognizer, candidate score always 0, flutter adnroid #564

Open
homamAboAhmad opened this issue Dec 15, 2023 · 7 comments
Open
Labels
Digital Ink Recognition Issues corresponding to Digital Ink Recognition API stale

Comments

@homamAboAhmad
Copy link

I tried the example, and it has the same problem

Title:
Digital Ink Recognizer, candidate score always 0, flutter adnroid

Discription:
when app check, recognize text, it gives list of candidate,
the candidate has a text - candidate.text - which has no problem, and has a score - candidate.score - which always 0.0 (this is the problem)

To Reproduce:

  • before test edit code in recognizeText function to to show score with text
  • from for (final candidate in candidates) { _recognizedText += '\n${candidate.text}'; } to for (final candidate in candidates) { _recognizedText += '\n${candidate.text}-${candidate.score}'; }
  • in example app, go to Digital ink recognition
  • download the language model
  • after finish draw the letter you want to recognize Like H
  • the press read text so see results
  • you can see letters with 0.0 scores always
  • tested on android device
    Expected behavior: the score should not alway be zero

Platform:
OS: Android
Device: Samsung Note 9
Flutter 3.10.5 • channel stable
Dart 3.0.5
plugin version: google_mlkit_digital_ink_recognition: ^0.10.0

Screenshots
If applicable, add screenshots to help explain your problem.

image

@bensonarafat
Copy link
Collaborator

Hi @homamAboAhmad
Thanks for opening the issue.
Returning 0 will be from the native API.
This package works on that.
I hope it helps you.

@homamAboAhmad
Copy link
Author

@bensonarafat thanks for reply, in logs from native, score is not zero, and works fine

@bensonarafat
Copy link
Collaborator

Okay.. let me check

@homamAboAhmad
Copy link
Author

homamAboAhmad commented Dec 23, 2023 via email

@fbernaly fbernaly added the Digital Ink Recognition Issues corresponding to Digital Ink Recognition API label Apr 17, 2024
@hypercomputer
Copy link

I am having the same issue. When looking at the native logs I get the following output:

I/native  ( 4564): I0520 15:42:39.528931   17827 tf_recognizer.cc:293] best result: '母'  score: -348.23
I/native  ( 4564): I0520 15:42:39.529148   17827 tf_recognizer.cc:344]  1  request  7.39%    1.3ms  overall 16.72%    0.01s  LabeledInkProcessor
I/native  ( 4564):  2  request 52.71%    9.6ms  overall 48.09%    0.04s  RunTfLiteModelRunner
I/native  ( 4564):  3  request 39.90%    7.3ms  overall 35.19%    0.03s  Decoder
I/native  ( 4564):     request          18.2ms  overall           0.08s  Total
I/native  ( 4564): 
I/native  ( 4564): I0520 15:42:39.529193   17827 helper.cc:160] Recognition result: 母 with score: -348.23

Which shows a recognition score of -348.23; however, when I check the recognition candidate's score directly it always responds with 0.

Copy link

github-actions bot commented Oct 7, 2024

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Oct 7, 2024
@lanceadrian21
Copy link

Are there any updates about this? I need to get result in the logcat
Recognition result: あ with score: -183.65

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Digital Ink Recognition Issues corresponding to Digital Ink Recognition API stale
Projects
None yet
Development

No branches or pull requests

5 participants