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
ce212da1
Unverified
Commit
ce212da1
authored
Apr 09, 2025
by
Xiaomeng Zhao
Committed by
GitHub
Apr 09, 2025
Browse files
Merge pull request #2174 from myhloli/dev
refactor(ocr): comment out det_count update and update OCR models
parents
e5b74ae7
f8323ae0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
magic_pdf/model/batch_analyze.py
magic_pdf/model/batch_analyze.py
+2
-1
magic_pdf/model/sub_modules/ocr/paddleocr2pytorch/pytorchocr/utils/resources/models_config.yml
...eocr2pytorch/pytorchocr/utils/resources/models_config.yml
+5
-1
No files found.
magic_pdf/model/batch_analyze.py
View file @
ce212da1
...
@@ -143,7 +143,8 @@ class BatchAnalyze:
...
@@ -143,7 +143,8 @@ class BatchAnalyze:
if
ocr_res
:
if
ocr_res
:
ocr_result_list
=
get_ocr_result_list
(
ocr_res
,
useful_list
,
ocr_res_list_dict
[
'ocr_enable'
],
new_image
,
_lang
)
ocr_result_list
=
get_ocr_result_list
(
ocr_res
,
useful_list
,
ocr_res_list_dict
[
'ocr_enable'
],
new_image
,
_lang
)
ocr_res_list_dict
[
'layout_res'
].
extend
(
ocr_result_list
)
ocr_res_list_dict
[
'layout_res'
].
extend
(
ocr_result_list
)
det_count
+=
len
(
ocr_res_list_dict
[
'ocr_res_list'
])
# det_count += len(ocr_res_list_dict['ocr_res_list'])
# logger.info(f'ocr-det time: {round(time.time()-det_start, 2)}, image num: {det_count}')
# logger.info(f'ocr-det time: {round(time.time()-det_start, 2)}, image num: {det_count}')
...
...
magic_pdf/model/sub_modules/ocr/paddleocr2pytorch/pytorchocr/utils/resources/models_config.yml
View file @
ce212da1
lang
:
lang
:
ch
:
ch
_lite
:
det
:
ch_PP-OCRv3_det_infer.pth
det
:
ch_PP-OCRv3_det_infer.pth
rec
:
ch_PP-OCRv4_rec_infer.pth
rec
:
ch_PP-OCRv4_rec_infer.pth
dict
:
ppocr_keys_v1.txt
dict
:
ppocr_keys_v1.txt
ch
:
det
:
ch_PP-OCRv3_det_infer.pth
rec
:
ch_PP-OCRv4_rec_server_infer.pth
dict
:
ppocr_keys_v1.txt
en
:
en
:
det
:
en_PP-OCRv3_det_infer.pth
det
:
en_PP-OCRv3_det_infer.pth
rec
:
en_PP-OCRv4_rec_infer.pth
rec
:
en_PP-OCRv4_rec_infer.pth
...
...
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