mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2026-09-19 10:02:28 +08:00
删除无用函数
This commit is contained in:
@@ -81,11 +81,6 @@ class CNTMetric(object):
|
||||
self.eps = 1e-5
|
||||
self.reset()
|
||||
|
||||
def _normalize_text(self, text):
|
||||
text = ''.join(
|
||||
filter(lambda x: x in (string.digits + string.ascii_letters), text))
|
||||
return text.lower()
|
||||
|
||||
def __call__(self, pred_label, *args, **kwargs):
|
||||
preds, labels = pred_label
|
||||
correct_num = 0
|
||||
@@ -102,7 +97,6 @@ class CNTMetric(object):
|
||||
"""
|
||||
return metrics {
|
||||
'acc': 0,
|
||||
'norm_edit_dis': 0,
|
||||
}
|
||||
"""
|
||||
acc = 1.0 * self.correct_num / (self.all_num + self.eps)
|
||||
|
||||
Reference in New Issue
Block a user