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
bc462325
Unverified
Commit
bc462325
authored
Jun 19, 2020
by
MissPenguin
Committed by
GitHub
Jun 19, 2020
Browse files
Merge pull request #236 from xxxpsyduck/develop
If img is None then .shape method will raise an exception
parents
1816241d
98c80f16
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
ppocr/data/det/dataset_traversal.py
ppocr/data/det/dataset_traversal.py
+1
-4
No files found.
ppocr/data/det/dataset_traversal.py
View file @
bc462325
...
@@ -97,11 +97,8 @@ class EvalTestReader(object):
...
@@ -97,11 +97,8 @@ class EvalTestReader(object):
if
img
is
None
:
if
img
is
None
:
logger
.
info
(
"{} does not exist!"
.
format
(
img_path
))
logger
.
info
(
"{} does not exist!"
.
format
(
img_path
))
continue
continue
if
len
(
list
(
img
.
shape
))
==
2
or
img
.
shape
[
2
]
==
1
:
el
if
len
(
list
(
img
.
shape
))
==
2
or
img
.
shape
[
2
]
==
1
:
img
=
cv2
.
cvtColor
(
img
,
cv2
.
COLOR_GRAY2BGR
)
img
=
cv2
.
cvtColor
(
img
,
cv2
.
COLOR_GRAY2BGR
)
if
img
is
None
:
logger
.
info
(
"load image error:"
+
img_path
)
continue
outs
=
process_function
(
img
)
outs
=
process_function
(
img
)
outs
.
append
(
img_path
)
outs
.
append
(
img_path
)
batch_outs
.
append
(
outs
)
batch_outs
.
append
(
outs
)
...
...
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