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
8df65cd9
Commit
8df65cd9
authored
Apr 17, 2024
by
kernel.h@qq.com
Browse files
update
parent
1f45e0ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
13 deletions
+3
-13
magic_pdf/model/magic_model.py
magic_pdf/model/magic_model.py
+3
-13
No files found.
magic_pdf/model/magic_model.py
View file @
8df65cd9
...
...
@@ -16,23 +16,13 @@ class MagicModel():
def
get_imgs
(
self
,
page_no
:
int
):
# @许瑞
return_lst
=
[]
image_block
=
{
}
img
=
{
"bbox"
:[
x0
,
y0
,
x1
,
y1
]
}
img_caption
=
{
"bbox"
:[
x0
,
y0
,
x1
,
y1
],
"text"
:
""
,
}
image_block
[
'bbox'
]
=
[
x0
,
y0
,
x1
,
y1
]
# 计算出来
image_block
[
'img_body'
]
=
img
image_blcok
[
'img_caption'
]
=
img_caption
image_block
[
'img_body_bbox'
]
=
[
x0
,
y0
,
x1
,
y1
]
image_blcok
[
'img_caption_bbox'
]
=
[
x0
,
y0
,
x1
,
y1
]
# 如果没有就是None,但是保证key存在
image_blcok
[
'img_caption_text'
]
=
[
x0
,
y0
,
x1
,
y1
]
# 如果没有就是空字符串,但是保证key存在
return
[
image_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