Closed bertsky closed 2 years ago
The percentage there is calculated as count * max(len(gt), len(pred))
for the confusion in question divided by sum(max(len(gt_str), len(pred_str)))
for all the confusions in the dataset. The label "PERCENT" does not really mirror this complexity, I guess... Just calculating the percentage of the count against total_count might be a bit more consistent. On the other hand, the current implementation shows how much of the total CER is actually caused by a particular confusion. Would the label PERCENT_CER be more appropriate?
Ah, got it! I agree this figure is actually more relevant than simple relative count.
Would the label PERCENT_CER be more appropriate?
Yes, absolutely! That would make it clear immediately.
completed in Calamari-OCR/calamari@5a46ca1
many thanks!
Using Calamari 2.2.2 I sometimes get strange reports from
calamari-eval
:Here, it seems that all the entries with more than 1 character have wrong figures in the
PERCENT
column.(I do seem to have wrong segmentation in my data, causing such long confusions. But the point is that absolute to relative conversion should not depend on the length of the alignment.)