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
8216aa9e
"...git@developer.sourcefind.cn:chenpangpang/diffusers.git" did not exist on "08b453e3828f80027d881bb460716af95e192bcd"
Unverified
Commit
8216aa9e
authored
Jan 22, 2021
by
fushall
Committed by
GitHub
Jan 22, 2021
Browse files
fix ocr func for Chinese path issus (#1755)
parent
811712ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
paddleocr.py
paddleocr.py
+3
-1
No files found.
paddleocr.py
View file @
8216aa9e
...
@@ -290,7 +290,9 @@ class PaddleOCR(predict_system.TextSystem):
...
@@ -290,7 +290,9 @@ class PaddleOCR(predict_system.TextSystem):
image_file
=
img
image_file
=
img
img
,
flag
=
check_and_read_gif
(
image_file
)
img
,
flag
=
check_and_read_gif
(
image_file
)
if
not
flag
:
if
not
flag
:
img
=
cv2
.
imread
(
image_file
)
with
open
(
image_file
,
'rb'
)
as
f
:
np_arr
=
np
.
frombuffer
(
f
.
read
(),
dtype
=
np
.
uint8
)
img
=
cv2
.
imdecode
(
np_arr
,
cv2
.
IMREAD_COLOR
)
if
img
is
None
:
if
img
is
None
:
logger
.
error
(
"error in loading image:{}"
.
format
(
image_file
))
logger
.
error
(
"error in loading image:{}"
.
format
(
image_file
))
return
None
return
None
...
...
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