add parameter enable_mkldnn
This commit is contained in:
parent
5a3ce3b5e8
commit
814dc2fa37
|
@ -117,12 +117,16 @@ def main(args):
|
||||||
image_file_list = get_image_file_list(args.image_dir)
|
image_file_list = get_image_file_list(args.image_dir)
|
||||||
text_sys = TextSystem(args)
|
text_sys = TextSystem(args)
|
||||||
is_visualize = True
|
is_visualize = True
|
||||||
|
tackle_img_num = 0
|
||||||
for image_file in image_file_list:
|
for image_file in image_file_list:
|
||||||
img = cv2.imread(image_file)
|
img = cv2.imread(image_file)
|
||||||
if img is None:
|
if img is None:
|
||||||
logger.info("error in loading image:{}".format(image_file))
|
logger.info("error in loading image:{}".format(image_file))
|
||||||
continue
|
continue
|
||||||
starttime = time.time()
|
starttime = time.time()
|
||||||
|
tackle_img_num += 1
|
||||||
|
if not args.use_gpu and tackle_img_num % 30 == 0:
|
||||||
|
text_sys = TextSystem(args)
|
||||||
dt_boxes, rec_res = text_sys(img)
|
dt_boxes, rec_res = text_sys(img)
|
||||||
elapse = time.time() - starttime
|
elapse = time.time() - starttime
|
||||||
print("Predict time of %s: %.3fs" % (image_file, elapse))
|
print("Predict time of %s: %.3fs" % (image_file, elapse))
|
||||||
|
|
Loading…
Reference in New Issue