Replies: 1 comment
-
Please prove that you have the cuda version of the paddlepaddle framework installed by using the "pip list | grep paddle" command |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
def ocr_det(image_path_list):
ocr_model = PaddleOCR(use_angle_cls=True,lang='en', use_gpu=True, det=True, rec=False, show_log=False,use_tensorrt=True)
print("ocr model done")
num_det_list = []
for image_ind, image_path in enumerate(image_path_list):
if image_ind%100 == 0:
print("ocr: %.8d/%d images"%(image_ind, len(image_path_list)))
try:
det_res = ocr_model.ocr(image_path, cls=True)
num_det_list.append(len(det_res[0]))
except:
num_det_list.append(-1)
return num_det_list
Beta Was this translation helpful? Give feedback.
All reactions