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
bd2c3d12
Commit
bd2c3d12
authored
Jun 03, 2025
by
myhloli
Browse files
refactor: update OCR handling and adjust root directory path for model loading
parent
38ace5dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
mineru/backend/pipeline/pipeline_analyze.py
mineru/backend/pipeline/pipeline_analyze.py
+1
-1
mineru/model/table/rapid_table.py
mineru/model/table/rapid_table.py
+1
-1
No files found.
mineru/backend/pipeline/pipeline_analyze.py
View file @
bd2c3d12
...
@@ -101,7 +101,7 @@ def doc_analyze(
...
@@ -101,7 +101,7 @@ def doc_analyze(
elif
parse_method
==
'ocr'
:
elif
parse_method
==
'ocr'
:
_ocr
=
True
_ocr
=
True
ocr_enabled_list
[
pdf_idx
]
=
_ocr
ocr_enabled_list
.
append
(
_ocr
)
_lang
=
lang_list
[
pdf_idx
]
_lang
=
lang_list
[
pdf_idx
]
# 收集每个数据集中的页面
# 收集每个数据集中的页面
...
...
mineru/model/table/rapid_table.py
View file @
bd2c3d12
...
@@ -8,7 +8,7 @@ from rapid_table import RapidTable, RapidTableInput
...
@@ -8,7 +8,7 @@ from rapid_table import RapidTable, RapidTableInput
class
RapidTableModel
(
object
):
class
RapidTableModel
(
object
):
def
__init__
(
self
,
ocr_engine
):
def
__init__
(
self
,
ocr_engine
):
root_dir
=
Path
(
__file__
).
absolute
().
parent
.
parent
.
parent
.
parent
.
parent
root_dir
=
Path
(
__file__
).
absolute
().
parent
.
parent
.
parent
slanet_plus_model_path
=
os
.
path
.
join
(
root_dir
,
'resources'
,
'slanet_plus'
,
'slanet-plus.onnx'
)
slanet_plus_model_path
=
os
.
path
.
join
(
root_dir
,
'resources'
,
'slanet_plus'
,
'slanet-plus.onnx'
)
input_args
=
RapidTableInput
(
model_type
=
'slanet_plus'
,
model_path
=
slanet_plus_model_path
)
input_args
=
RapidTableInput
(
model_type
=
'slanet_plus'
,
model_path
=
slanet_plus_model_path
)
self
.
table_model
=
RapidTable
(
input_args
)
self
.
table_model
=
RapidTable
(
input_args
)
...
...
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