Skip to content

πŸ“„ Awesome OCR multiple programing languages toolkits based on ONNX Runtime, OpenVINO, MNN, PaddlePaddle, TensorRT and PyTorch.

Update use_cuda parameter in config.yaml

SWHLbd2eba459fd8
diff --git a/python/demo.py b/python/demo.py
index 55a84a0..5e5d6f7 100644
--- a/python/demo.py
+++ b/python/demo.py
@@ -12,7 +12,7 @@ from rapidocr_onnxruntime import RapidOCR, VisRes
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 a8da9cc..3fa09e1 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