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

add confidence to OCR result #1

Closed
bertsky opened this issue Mar 1, 2023 · 4 comments
Closed

add confidence to OCR result #1

bertsky opened this issue Mar 1, 2023 · 4 comments

Comments

@bertsky
Copy link
Contributor

bertsky commented Mar 1, 2023

https://github.com/MegaloPat/ocrd_froc/blob/4c207eb708235bf6a7696e6feed62630e08c20b1/ocrd_froc/processor.py#L91

Would that be possible? (I guess we would first have to factor out the sum(torch.max(out, 2)) of run_cocr, run_selocr and run_adaptive, right?)

@GemCarr
Copy link
Collaborator

GemCarr commented Mar 13, 2023

we can add something that would output some kind of confidence on the character level, however on the line level that would leave us with multiple options on how to handle that.
We can have a conservative approach by multiplying the individual character confidence scores but then we would rarely have a good line confidence. We could also have a more 'optimistic' approach by having the mean average of the character confidence scores as line confidence.
What do you think would be best ?

@bertsky
Copy link
Contributor Author

bertsky commented Mar 13, 2023

We can have a conservative approach by multiplying the individual character confidence scores but then we would rarely have a good line confidence.

Yes, it would have little value because you would need to pair the score with the line length.

Also, I have not seen it implemented as a multiplication – anywhere ever.

We could also have a more 'optimistic' approach by having the mean average of the character confidence scores as line confidence.

Yes, that's what everyone seems to use.

As an alternative, one could calculate the perplexity...

@GemCarr
Copy link
Collaborator

GemCarr commented Mar 13, 2023

mean average is a good option imo

@GemCarr GemCarr closed this as completed Mar 14, 2023
@bertsky
Copy link
Contributor Author

bertsky commented Mar 14, 2023

Thanks a lot!

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