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

Print out alternate predicted results string and probabilities #1019

Open
rdavis22 opened this issue May 16, 2023 · 2 comments
Open

Print out alternate predicted results string and probabilities #1019

rdavis22 opened this issue May 16, 2023 · 2 comments

Comments

@rdavis22
Copy link

Hi,

Is there a method to print out the alternate results from the "Reader" class? For instance, here is an example of my code:

###Example code###
reader = easyocr.Reader(['en'], gpu = True)
results = reader.readtext('example_labeltif')

for result in results:
bbox, text, score = result
print(f"Text: {text}")
print(f"Confidence Score: {score}")
print()

(Returns):

Text: 5023-00013 A-3
Confidence Score: 0.7890631529022496

Text: BEAKER,
Confidence Score: 0.9955028038505163

Text: ERIKA
Confidence Score: 0.6211073188069697

I would like to see what the alternate predictions were for "5023-00013 A-3".

An example alternative predicition for "5023-00013 A-3" would be something like this (e.g. S823-88813 A-3", Confidence score: 0.200234)

Is there a way to do this? Possibly altering "recognition.py" "get_recoginizer" method? I don't want to alter any source code if I have to but if someone has a solution, I am all ears.

@cottrell
Copy link

cottrell commented Oct 1, 2024

#784

@cottrell
Copy link

cottrell commented Oct 2, 2024

now see #1311

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants