Unverified Commit e139e5bd authored by Xiaomeng Zhao's avatar Xiaomeng Zhao Committed by GitHub
Browse files

Merge pull request #1542 from myhloli/dev

refactor(pre_proc): adjust IOU threshold for character overlap detection
parents 60054feb f37b14bc
...@@ -36,7 +36,7 @@ def remove_overlaps_low_confidence_spans(spans): ...@@ -36,7 +36,7 @@ def remove_overlaps_low_confidence_spans(spans):
def check_chars_is_overlap_in_span(chars): def check_chars_is_overlap_in_span(chars):
for i in range(len(chars)): for i in range(len(chars)):
for j in range(i + 1, len(chars)): for j in range(i + 1, len(chars)):
if calculate_iou(chars[i]['bbox'], chars[j]['bbox']) > 0.9: if calculate_iou(chars[i]['bbox'], chars[j]['bbox']) > 0.35:
return True return True
return False return False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment