fix: resolve float list TypeError by adding safe_float and robust bbox/polyline unpacking

This commit is contained in:
Abhinav Gupta
2026-09-03 09:28:40 +05:30
parent fbf5d3c76b
commit 1e0909a16f
6 changed files with 134 additions and 48 deletions
+2 -1
View File
@@ -33,7 +33,8 @@ fail_count = 0
def check(label, tag, expected_cls):
global pass_count, fail_count
r = by_tag.get(tag.upper())
from src.utils.tag_stitcher import rectify_ocr_typos
r = by_tag.get(tag.upper()) or by_tag.get(rectify_ocr_typos(tag).upper())
cls = r['classification'] if r else 'NOT_FOUND'
if expected_cls == 'NOTE_OR_LINE':
ok = cls in ('NOTE', 'LINE_TAG')