From bd2eba459fd8a9397308b2399409a35bc3bd097b Mon Sep 17 00:00:00 2001 From: SWHL Date: Mon, 4 Mar 2024 22:59:40 +0800 Subject: [PATCH] Update use_cuda parameter in config.yaml --- python/demo.py | 2 +- python/rapidocr_onnxruntime/config.yaml | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/python/demo.py b/python/demo.py index 55a84a004..5e5d6f702 100644 --- a/python/demo.py +++ b/python/demo.py @@ -12,7 +12,7 @@ engine = RapidOCR() vis = VisRes() -image_path = "tests/test_files/test_without_det.png" +image_path = "tests/test_files/test_without_det.jpg" with open(image_path, "rb") as f: img = f.read() diff --git a/python/rapidocr_onnxruntime/config.yaml b/python/rapidocr_onnxruntime/config.yaml index a8da9cc5e..3fa09e155 100644 --- a/python/rapidocr_onnxruntime/config.yaml +++ b/python/rapidocr_onnxruntime/config.yaml @@ -7,6 +7,8 @@ Global: min_height: 30 width_height_ratio: 8 + use_cuda: &use_cuda false + intra_op_num_threads: &intra_nums -1 inter_op_num_threads: &inter_nums -1 @@ -14,7 +16,7 @@ Det: intra_op_num_threads: *intra_nums inter_op_num_threads: *inter_nums - use_cuda: false + use_cuda: *use_cuda model_path: models/ch_PP-OCRv4_det_infer.onnx @@ -32,7 +34,7 @@ Cls: intra_op_num_threads: *intra_nums inter_op_num_threads: *inter_nums - use_cuda: false + use_cuda: *use_cuda model_path: models/ch_ppocr_mobile_v2.0_cls_infer.onnx @@ -45,7 +47,7 @@ Rec: intra_op_num_threads: *intra_nums inter_op_num_threads: *inter_nums - use_cuda: false + use_cuda: *use_cuda model_path: models/ch_PP-OCRv4_rec_infer.onnx