How to modify the connectionist Temporal Classification (CTC) layer of the network to also give us a confidence score?
vinayakarannil opened this issue · comments
how to modify the connectionist Temporal Classification (CTC) layer of the network to also give us a confidence score?
See https://github.com/Belval/CRNN/blob/master/CRNN/crnn.py#L167
According to TF's documentation, log_prob
is what you are looking for.
It seems rather trivial to add, you're more than welcome to make a PR if you implement it.
I am using exp(-log_prob) to get the actual probability. But this doesn't seems right. I got many wrongly recognized words with high probability and vice-versa too. I think we need a score, taking into consideration both lstm output and log_prob
The original paper doesn't seem to include such a thing but I'm open to suggestions if you happen to find something that works well.