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
11462061
"csrc/cuda/spmm.cpp" did not exist on "36d045fd2e737728f8f67dd89fd6d3bf5934b004"
Commit
11462061
authored
Apr 23, 2024
by
赵小蒙
Browse files
fix annotation
parent
3f062ad7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
magic_pdf/pre_proc/ocr_dict_merge.py
magic_pdf/pre_proc/ocr_dict_merge.py
+2
-2
No files found.
magic_pdf/pre_proc/ocr_dict_merge.py
View file @
11462061
...
...
@@ -120,14 +120,14 @@ def sort_blocks_by_layout(all_bboxes, layout_bboxes):
# 如果是footnote则跳过
if
block
[
7
]
==
BlockType
.
Footnote
:
continue
block_bbox
=
[
block
[
0
],
block
[
1
],
block
[
2
],
block
[
3
]
]
block_bbox
=
block
[
:
4
]
if
calculate_overlap_area_in_bbox1_area_ratio
(
block_bbox
,
layout_bbox
)
>
0.8
:
layout_blocks
.
append
(
block
)
# 如果layout_blocks不为空,则放入new_blocks中
if
len
(
layout_blocks
)
>
0
:
new_blocks
.
append
(
layout_blocks
)
# 从
span
s删除已经放入layout_
sapns中的span
# 从
all_bboxe
s删除已经放入layout_
blocks中的block
for
layout_block
in
layout_blocks
:
all_bboxes
.
remove
(
layout_block
)
...
...
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