Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#18 from LDOUBLEV/fixocr
Browse files Browse the repository at this point in the history
change the saved path of visualized image
  • Loading branch information
LDOUBLEV authored May 14, 2020
2 parents 8e1f9f1 + 010533b commit f3cf94a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/infer/predict_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,11 @@ def sorted_boxes(dt_boxes):

draw_img = draw_ocr(
image, boxes, txts, scores, draw_txt=True, drop_score=0.5)
draw_img_save = "./doc/imgs_results/"
draw_img_save = "./inference_results/"
if not os.path.exists(draw_img_save):
os.makedirs(draw_img_save)
cv2.imwrite(
os.path.join(draw_img_save, os.path.basename(image_file)),
draw_img)
print("The visualized image saved in {}".format(
os.path.join(draw_img_save, os.path.basename(image_file))))

0 comments on commit f3cf94a

Please sign in to comment.