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
2c60172b
Commit
2c60172b
authored
Oct 25, 2024
by
icecraft
Browse files
feat: update return result
parent
92579040
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
magic_pdf/model/magic_model.py
magic_pdf/model/magic_model.py
+1
-4
No files found.
magic_pdf/model/magic_model.py
View file @
2c60172b
...
...
@@ -782,8 +782,7 @@ class MagicModel:
for
i
in
sub_obj_map_h
.
keys
():
ret
.
append
(
{
'sub_bbox'
:
subjects
[
i
][
'bbox'
],
'score'
:
subjects
[
i
][
'score'
],
'sub_bbox'
:
{
'bbox'
:
subjects
[
i
][
'bbox'
],
'score'
:
subjects
[
i
][
'score'
]},
'obj_bboxes'
:
[
{
'score'
:
objects
[
j
][
'score'
],
'bbox'
:
objects
[
j
][
'bbox'
]}
for
j
in
sub_obj_map_h
[
i
]
...
...
@@ -803,7 +802,6 @@ class MagicModel:
record
=
{
'image_body'
:
v
[
'sub_bbox'
],
'image_caption_list'
:
v
[
'obj_bboxes'
],
'score'
:
v
[
'score'
],
}
filter_idx
=
v
[
'sub_idx'
]
d
=
next
(
filter
(
lambda
x
:
x
[
'sub_idx'
]
==
filter_idx
,
with_footnotes
))
...
...
@@ -819,7 +817,6 @@ class MagicModel:
record
=
{
'table_body'
:
v
[
'sub_bbox'
],
'table_caption_list'
:
v
[
'obj_bboxes'
],
'score'
:
v
[
'score'
]
}
filter_idx
=
v
[
'sub_idx'
]
d
=
next
(
filter
(
lambda
x
:
x
[
'sub_idx'
]
==
filter_idx
,
with_footnotes
))
...
...
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