Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
MinerU
Commits
070139a5
Commit
070139a5
authored
Mar 12, 2024
by
赵小蒙
Browse files
span重叠删除的阈值0.8->0.5
parent
61a0c62c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
magic_pdf/pre_proc/ocr_dict_merge.py
magic_pdf/pre_proc/ocr_dict_merge.py
+1
-1
No files found.
magic_pdf/pre_proc/ocr_dict_merge.py
View file @
070139a5
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment