提交 2025ed1d 编写于 作者: T tink2123

update get_img_file_list

上级 250cd37a
...@@ -22,7 +22,7 @@ import string ...@@ -22,7 +22,7 @@ import string
import lmdb import lmdb
from ppocr.utils.utility import initial_logger 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() logger = initial_logger()
from .img_tools import process_image, get_img_data from .img_tools import process_image, get_img_data
...@@ -173,6 +173,7 @@ class SimpleReader(object): ...@@ -173,6 +173,7 @@ class SimpleReader(object):
img = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR) img = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR)
norm_img = process_image(img, self.image_shape) norm_img = process_image(img, self.image_shape)
yield norm_img yield norm_img
else:
with open(self.label_file_path, "rb") as fin: with open(self.label_file_path, "rb") as fin:
label_infor_list = fin.readlines() label_infor_list = fin.readlines()
img_num = len(label_infor_list) img_num = len(label_infor_list)
......
...@@ -46,7 +46,7 @@ from ppocr.data.reader_main import reader_main ...@@ -46,7 +46,7 @@ from ppocr.data.reader_main import reader_main
from ppocr.utils.save_load import init_model from ppocr.utils.save_load import init_model
from ppocr.utils.character import CharacterOps from ppocr.utils.character import CharacterOps
from ppocr.utils.utility import create_module 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() logger = initial_logger()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册