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
2025ed1d
Commit
2025ed1d
authored
May 12, 2020
by
tink2123
Browse files
update get_img_file_list
parent
250cd37a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
22 deletions
+23
-22
ppocr/data/rec/dataset_traversal.py
ppocr/data/rec/dataset_traversal.py
+22
-21
tools/infer_rec.py
tools/infer_rec.py
+1
-1
No files found.
ppocr/data/rec/dataset_traversal.py
View file @
2025ed1d
...
...
@@ -22,7 +22,7 @@ import string
import
lmdb
from
ppocr.utils.utility
import
initial_logger
from
tools.infer
.utility
import
get_image_file_list
from
ppocr.utils
.utility
import
get_image_file_list
logger
=
initial_logger
()
from
.img_tools
import
process_image
,
get_img_data
...
...
@@ -173,6 +173,7 @@ class SimpleReader(object):
img
=
cv2
.
cvtColor
(
img
,
cv2
.
COLOR_GRAY2BGR
)
norm_img
=
process_image
(
img
,
self
.
image_shape
)
yield
norm_img
else
:
with
open
(
self
.
label_file_path
,
"rb"
)
as
fin
:
label_infor_list
=
fin
.
readlines
()
img_num
=
len
(
label_infor_list
)
...
...
tools/infer_rec.py
View file @
2025ed1d
...
...
@@ -46,7 +46,7 @@ from ppocr.data.reader_main import reader_main
from
ppocr.utils.save_load
import
init_model
from
ppocr.utils.character
import
CharacterOps
from
ppocr.utils.utility
import
create_module
from
tools.infer
.utility
import
get_image_file_list
from
ppocr.utils
.utility
import
get_image_file_list
logger
=
initial_logger
()
...
...
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