Closed shrinidt closed 4 years ago
Could you please elaborate on what you are trying to do?
Hi, I actually want to have a score which tells me with what confidence can i claim that my prediction for a handwritten text is correct?.
Hi jonomon,
Thanks for the reply. I understand what you mean. But my problem is this. I do not have ground truth(actual text) with me. So whenever I predict a handwritten text,can i log a confidence score along with it, telling how confident I am about the prediction. Something like this-
Thanks
Because of how the CTC collapsing work, any confidence score would be quite hard to compute and rely on, because of repetitions, multiple possible paths, etc. However i you want a score that might be helpful to you, you could softmax normalize the prediction of each time step, and use the average probability for the characters of the final path as an indication of confidence.
For example, with [a,b,c,{}] as a dictionary, sequence length of 6.
a 0.1 0.0 1.0 0.1 0.0 0.0
b 0.2 0.1 0.0 0.7 1.0 0.0
c 0.7 0.8 0.0 0.1 0.0 0.0
{} 0.0 0.1 0.0 0.1 0.0 0.9
"ccabb{}" => cab" after CTC collapsing
(0.7+0.8+1.0+0.7+1.0+0.9) / 6 = 0.85
The average confidence score is 85%
Thanks Thomas. I tried this with our model maximum sequence length being 100. I seem to get maximum score as 0.85 and nothing beyond. Am I doing something wrong?
no it seems like a reasonable score
Hi,
Thanks a lot for this wonderful piece of work.
I am trying to calculate CTC loss to compute labeling probability after prediction. Please guide if it is possible
Thanks