Merge pull request from LDOUBLEV/fixocr

change the saved path of visualized image
pull/26/head
Double_V 2020-05-14 14:27:23 +08:00 committed by GitHub
commit f3cf94a296
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -132,9 +132,11 @@ if __name__ == "__main__":
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))))