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
4949408c
Commit
4949408c
authored
Oct 28, 2024
by
liukaiwen
Browse files
perf: table model update with PP OCRv4
parent
7d2dfc80
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
905 deletions
+0
-905
magic_pdf/model/mfr_cudagraph.py
magic_pdf/model/mfr_cudagraph.py
+0
-899
magic_pdf/model/pdf_extract_kit.py
magic_pdf/model/pdf_extract_kit.py
+0
-6
No files found.
magic_pdf/model/mfr_cudagraph.py
deleted
100644 → 0
View file @
7d2dfc80
This diff is collapsed.
Click to expand it.
magic_pdf/model/pdf_extract_kit.py
View file @
4949408c
...
...
@@ -6,7 +6,6 @@ import shutil
from
magic_pdf.libs.Constants
import
*
from
magic_pdf.libs.clean_memory
import
clean_memory
from
magic_pdf.model.model_list
import
AtomicModel
from
.mfr_cudagraph
import
GraphRunner
os
.
environ
[
'NO_ALBUMENTATIONS_UPDATE'
]
=
'1'
# 禁止albumentations检查更新
os
.
environ
[
'YOLO_VERBOSE'
]
=
'False'
# disable yolo logger
...
...
@@ -70,11 +69,6 @@ def mfr_model_init(weight_dir, cfg_path, _device_='cpu'):
model
=
task
.
build_model
(
cfg
)
model
.
to
(
_device_
)
model
.
eval
()
model
=
model
.
to
(
_device_
)
if
'cuda'
in
_device_
:
decoder_runner
=
GraphRunner
(
model
.
model
.
model
.
decoder
.
model
.
decoder
,
max_batchs
=
128
,
max_kvlens
=
256
,
device
=
_device_
)
model
.
model
.
model
.
decoder
.
model
.
decoder
=
decoder_runner
vis_processor
=
load_processor
(
'formula_image_eval'
,
cfg
.
config
.
datasets
.
formula_rec_eval
.
vis_processor
.
eval
)
mfr_transform
=
transforms
.
Compose
([
vis_processor
,
])
return
[
model
,
mfr_transform
]
...
...
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