flutter-ml / google_ml_kit_flutter

A flutter plugin that implements Google's standalone ML Kit
MIT License
994 stars 750 forks source link

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

Open homamAboAhmad opened 11 months ago

homamAboAhmad commented 11 months ago

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:

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 commented 11 months ago

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 commented 11 months ago

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

bensonarafat commented 11 months ago

Okay.. let me check

homamAboAhmad commented 11 months ago

Any new updates?

في السبت، 16 ديسمبر 2023, 3:59 م Benson Arafat @.***> كتب:

Okay.. let me check

— Reply to this email directly, view it on GitHub https://github.com/flutter-ml/google_ml_kit_flutter/issues/564#issuecomment-1858812885, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ7CFSJP7FUK6OVFGNFUQI3YJWLLJAVCNFSM6AAAAABAWXTV7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJYHAYTEOBYGU . You are receiving this because you were mentioned.Message ID: @.***>

hypercomputer commented 6 months ago

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.

github-actions[bot] commented 1 month ago

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

lanceadrian21 commented 1 month ago

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