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
90ea9096
"docs/developer_guide/setup_github_runner.md" did not exist on "4f723edd3baf3823eddfb9d6426548daba17c687"
Commit
90ea9096
authored
Mar 21, 2024
by
赵小蒙
Browse files
部分layout最底部的文本圈不全,降低阈值减少底边文本被丢弃的可能性
parent
0dbbf9c3
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 @
90ea9096
...
@@ -66,7 +66,7 @@ def merge_spans_to_line_by_layout(spans, layout_bboxes):
...
@@ -66,7 +66,7 @@ def merge_spans_to_line_by_layout(spans, layout_bboxes):
# 遍历spans,将每个span放入对应的layout中
# 遍历spans,将每个span放入对应的layout中
layout_sapns
=
[]
layout_sapns
=
[]
for
span
in
spans
:
for
span
in
spans
:
if
calculate_overlap_area_in_bbox1_area_ratio
(
span
[
'bbox'
],
layout_bbox
)
>
0.6
5
:
if
calculate_overlap_area_in_bbox1_area_ratio
(
span
[
'bbox'
],
layout_bbox
)
>
0.6
:
layout_sapns
.
append
(
span
)
layout_sapns
.
append
(
span
)
# 如果layout_sapns不为空,则放入new_spans中
# 如果layout_sapns不为空,则放入new_spans中
if
len
(
layout_sapns
)
>
0
:
if
len
(
layout_sapns
)
>
0
:
...
...
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