Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pdf-miner
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Qin Kaijie
pdf-miner
Commits
05161c6e
Commit
05161c6e
authored
Mar 23, 2024
by
xu rui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: backup footnote_bbox_tmp
parent
15c88304
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
pdf_parse_for_train.py
magic_pdf/pdf_parse_for_train.py
+1
-0
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(
...
@@ -531,6 +531,7 @@ def parse_pdf_for_train(
page_info
[
"bak_page_no_bboxes"
]
=
page_no_bboxs
page_info
[
"bak_page_no_bboxes"
]
=
page_no_bboxs
page_info
[
"bak_header_bboxes"
]
=
header_bboxs
page_info
[
"bak_header_bboxes"
]
=
header_bboxs
page_info
[
"bak_footer_bboxes"
]
=
footer_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
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) -> []:
...
@@ -54,7 +54,7 @@ def convert_to_train_format(jso: dict) -> []:
n_bbox
=
{
"category_id"
:
10
,
"bbox"
:
inter_equation
[
"bbox"
]}
n_bbox
=
{
"category_id"
:
10
,
"bbox"
:
inter_equation
[
"bbox"
]}
bboxes
.
append
(
n_bbox
)
bboxes
.
append
(
n_bbox
)
for
footnote
in
v
[
'
footnote_bboxes_tmp
'
]:
for
footnote
in
v
[
'
bak_footer_note_bboxes
'
]:
n_bbox
=
{
"category_id"
:
5
,
"bbox"
:
footnote
[
"bbox"
]}
n_bbox
=
{
"category_id"
:
5
,
"bbox"
:
footnote
[
"bbox"
]}
bboxes
.
append
(
n_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