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
fbf1c4bf
"examples/vscode:/vscode.git/clone" did not exist on "e8c9069d6fd579571536d74594591c048273eb4d"
Commit
fbf1c4bf
authored
Jan 20, 2025
by
陆逊
Browse files
Fix ocr utills
parent
69273e96
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
magic_pdf/model/sub_modules/ocr/paddleocr/ocr_utils.py
magic_pdf/model/sub_modules/ocr/paddleocr/ocr_utils.py
+13
-13
No files found.
magic_pdf/model/sub_modules/ocr/paddleocr/ocr_utils.py
View file @
fbf1c4bf
...
@@ -330,8 +330,7 @@ def onnx_model_init(key):
...
@@ -330,8 +330,7 @@ def onnx_model_init(key):
import
importlib.resources
import
importlib.resources
resource_path
=
importlib
.
resources
.
path
(
'rapidocr_onnxruntime.models'
,
''
)
with
importlib
.
resources
.
path
(
'rapidocr_onnxruntime.models'
,
''
)
as
resource_path
:
onnx_model
=
None
onnx_model
=
None
additional_ocr_params
=
{
additional_ocr_params
=
{
"use_onnx"
:
True
,
"use_onnx"
:
True
,
...
@@ -343,6 +342,7 @@ def onnx_model_init(key):
...
@@ -343,6 +342,7 @@ def onnx_model_init(key):
"det_db_unclip_ratio"
:
key
[
3
],
"det_db_unclip_ratio"
:
key
[
3
],
}
}
# logger.info(f"additional_ocr_params: {additional_ocr_params}")
# logger.info(f"additional_ocr_params: {additional_ocr_params}")
if
key
[
0
]
is
not
None
:
if
key
[
0
]
is
not
None
:
additional_ocr_params
[
"lang"
]
=
key
[
0
]
additional_ocr_params
[
"lang"
]
=
key
[
0
]
...
...
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