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
paddle_dbnet
Commits
6b12c81a
Commit
6b12c81a
authored
Mar 02, 2021
by
WenmuZhou
Browse files
fix bug of custom rec dict path
parent
b5334047
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
paddleocr.py
paddleocr.py
+5
-3
setup.py
setup.py
+1
-1
No files found.
paddleocr.py
View file @
6b12c81a
...
...
@@ -236,7 +236,9 @@ class PaddleOCR(predict_system.TextSystem):
assert
lang
in
model_urls
[
'rec'
],
'param lang must in {}, but got {}'
.
format
(
model_urls
[
'rec'
].
keys
(),
lang
)
use_inner_dict
=
False
if
postprocess_params
.
rec_char_dict_path
is
None
:
use_inner_dict
=
True
postprocess_params
.
rec_char_dict_path
=
model_urls
[
'rec'
][
lang
][
'dict_path'
]
...
...
@@ -263,7 +265,7 @@ class PaddleOCR(predict_system.TextSystem):
if
postprocess_params
.
rec_algorithm
not
in
SUPPORT_REC_MODEL
:
logger
.
error
(
'rec_algorithm must in {}'
.
format
(
SUPPORT_REC_MODEL
))
sys
.
exit
(
0
)
if
use_inner_dict
:
postprocess_params
.
rec_char_dict_path
=
str
(
Path
(
__file__
).
parent
/
postprocess_params
.
rec_char_dict_path
)
...
...
setup.py
View file @
6b12c81a
...
...
@@ -32,7 +32,7 @@ setup(
package_dir
=
{
'paddleocr'
:
''
},
include_package_data
=
True
,
entry_points
=
{
"console_scripts"
:
[
"paddleocr= paddleocr.paddleocr:main"
]},
version
=
'2.0.
2
'
,
version
=
'2.0.
3
'
,
install_requires
=
requirements
,
license
=
'Apache License 2.0'
,
description
=
'Awesome OCR toolkits based on PaddlePaddle (8.6M ultra-lightweight pre-trained model, support training and deployment among server, mobile, embeded and IoT devices'
,
...
...
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