ocrs icon indicating copy to clipboard operation
ocrs copied to clipboard

Feature request: Add confidence scores to library output(s)

Open Allypost opened this issue 1 year ago • 1 comments

It would be really nice to have some sort of (maybe even optional) confidence scores for text recognition output.

It seems that information is already present in the lower-level libraries so it would be just a matter of exposing and/or normalizing it for the library user.

Allypost avatar Aug 24 '24 04:08 Allypost

For the default DecodeMethod::Greedy decoding of the neural network outputs there is a score per character that could be exposed. If the beam search decoding method is used, it gets a bit more complex because there is a score per line which is a sum over multiple "paths" through the outputs. The raw scores the network computes are log probabilities (output of a LogSoftmax operation). It might be more user friendly to convert them back to probabilities first.

robertknight avatar Aug 30 '24 17:08 robertknight