Skip to content

Commit

Permalink
Update use_cuda parameter in config.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
SWHL committed Mar 4, 2024
1 parent 2f66907 commit bd2eba4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
8 changes: 5 additions & 3 deletions python/rapidocr_onnxruntime/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ 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

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

Expand All @@ -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

Expand All @@ -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

Expand Down

0 comments on commit bd2eba4

Please sign in to comment.