Commit 070139a5 authored by 赵小蒙's avatar 赵小蒙
Browse files

span重叠删除的阈值0.8->0.5

parent 61a0c62c
...@@ -9,7 +9,7 @@ def remove_overlaps_min_spans(spans): ...@@ -9,7 +9,7 @@ def remove_overlaps_min_spans(spans):
for span1 in spans.copy(): for span1 in spans.copy():
for span2 in spans.copy(): for span2 in spans.copy():
if span1 != span2: if span1 != span2:
overlap_box = get_minbox_if_overlap_by_ratio(span1['bbox'], span2['bbox'], 0.8) overlap_box = get_minbox_if_overlap_by_ratio(span1['bbox'], span2['bbox'], 0.5)
if overlap_box is not None: if overlap_box is not None:
bbox_to_remove = next((span for span in spans if span['bbox'] == overlap_box), None) bbox_to_remove = next((span for span in spans if span['bbox'] == overlap_box), None)
if bbox_to_remove is not None: if bbox_to_remove is not None:
......
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