Segmentation Error when running fast deploy #2630
Unanswered
Ravindrareddygontu
asked this question in
Q&A
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I am getting segmentation exception while running the fast deploy predict method in aws lamdba but not in my local machine, the exception message is:
Runtime exited with error: signal: segmentation fault.
it is coming exactly when i am calling the predict function like below:
def initialize_ocr():
folder = os.path.join(folder_path, "inference/")
det_model = f'{folder}det_onnx/model.onnx'
rec_model = f'{folder}rec_onnx/model.onnx'
rec_dict = f'{folder}rec_onnx/dict.txt'
opt = fd.RuntimeOption()
opt.set_cpu_thread_num(1)
# opt.paddle_infer_option.enable_mkldnn = True
det = fd.vision.ocr.DBDetector(det_model, '', runtime_option=opt, model_format=fd.ModelFormat.ONNX)
rec = fd.vision.ocr.Recognizer(rec_model, '', rec_dict, runtime_option=opt, model_format=fd.ModelFormat.ONNX)
return fd.vision.ocr.PPOCRv4(det, None, rec)
ocr = initialize_ocr()
out = ocr.predict("captcha.png")
Beta Was this translation helpful? Give feedback.
All reactions