Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Segmentation Error when running fast deploy #2630

Unanswered
Ravindrareddygontu asked this question in Q&A
Discussion options

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")

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /