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
05161c6e
Commit
05161c6e
authored
Mar 23, 2024
by
xu rui
Browse files
feat: backup footnote_bbox_tmp
parent
15c88304
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
magic_pdf/pdf_parse_for_train.py
magic_pdf/pdf_parse_for_train.py
+1
-0
magic_pdf/train_utils/convert_to_train_format.py
magic_pdf/train_utils/convert_to_train_format.py
+1
-1
No files found.
magic_pdf/pdf_parse_for_train.py
View file @
05161c6e
...
...
@@ -531,6 +531,7 @@ def parse_pdf_for_train(
page_info
[
"bak_page_no_bboxes"
]
=
page_no_bboxs
page_info
[
"bak_header_bboxes"
]
=
header_bboxs
page_info
[
"bak_footer_bboxes"
]
=
footer_bboxs
page_info
[
"bak_footer_note_bboxes"
]
=
footnote_bboxes_tmp
pdf_info_dict
[
f
"page_
{
page_id
}
"
]
=
page_info
...
...
magic_pdf/train_utils/convert_to_train_format.py
View file @
05161c6e
...
...
@@ -54,7 +54,7 @@ def convert_to_train_format(jso: dict) -> []:
n_bbox
=
{
"category_id"
:
10
,
"bbox"
:
inter_equation
[
"bbox"
]}
bboxes
.
append
(
n_bbox
)
for
footnote
in
v
[
'footnote_bboxes
_tmp
'
]:
for
footnote
in
v
[
'
bak_
foot
er_
note_bboxes'
]:
n_bbox
=
{
"category_id"
:
5
,
"bbox"
:
footnote
[
"bbox"
]}
bboxes
.
append
(
n_bbox
)
...
...
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