Update eval.py

This commit is contained in:
99Franklin
2025-07-05 16:22:17 +08:00
committed by GitHub
parent ef205c23c3
commit 7776efc0dd

View File

@@ -306,7 +306,7 @@ def process_predictions(input_path, output_path):
) / 4 ) / 4
elif data_item["type"] == "full-page OCR en": elif data_item["type"] == "full-page OCR en":
if not data_item["predict"]: if not data_item["predict"]:
data_item["score"] == 0 data_item["score"] = 0
else: else:
ocr_metric = cal_per_metrics(data_item["predict"], data_item["answers"][0]) ocr_metric = cal_per_metrics(data_item["predict"], data_item["answers"][0])
data_item["score"] = ( data_item["score"] = (