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
f0b66d3a
Unverified
Commit
f0b66d3a
authored
Apr 30, 2025
by
Xiaomeng Zhao
Committed by
GitHub
Apr 30, 2025
Browse files
Merge pull request #2410 from myhloli/dev
feat(model): add logging for batch image processing
parents
5e8656c7
b29b73af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
magic_pdf/model/doc_analyze_by_custom_model.py
magic_pdf/model/doc_analyze_by_custom_model.py
+4
-1
No files found.
magic_pdf/model/doc_analyze_by_custom_model.py
View file @
f0b66d3a
...
@@ -156,7 +156,10 @@ def doc_analyze(
...
@@ -156,7 +156,10 @@ def doc_analyze(
batch_images
=
[
images_with_extra_info
]
batch_images
=
[
images_with_extra_info
]
results
=
[]
results
=
[]
for
batch_image
in
batch_images
:
processed_images_count
=
0
for
index
,
batch_image
in
enumerate
(
batch_images
):
processed_images_count
+=
len
(
batch_image
)
logger
.
info
(
f
'Batch
{
index
+
1
}
/
{
len
(
batch_images
)
}
:
{
processed_images_count
}
pages/
{
len
(
images_with_extra_info
)
}
pages'
)
result
=
may_batch_image_analyze
(
batch_image
,
ocr
,
show_log
,
layout_model
,
formula_enable
,
table_enable
)
result
=
may_batch_image_analyze
(
batch_image
,
ocr
,
show_log
,
layout_model
,
formula_enable
,
table_enable
)
results
.
extend
(
result
)
results
.
extend
(
result
)
...
...
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