Files
rapidocr/python/rapidocr_onnxruntime/config.yaml
T
Ning hao 8523a2e453 fix(config): Make ONNX Runtime DirectML an optional configuration for better compatibility (#178)
This commit introduces an optional configuration for using ONNX Runtime DirectML.

DirectML can significantly improve performance on newer devices, but it has stricter requirements and may not be suitable for all users.

By making it an optional configuration, we ensure better compatibility for users with older devices or who are running the CLI version, where the GPU's potential may not be fully utilized due to single inference models.

For more information on DirectML requirements, please refer to: https://github.com/microsoft/DirectML
2024-05-15 21:43:03 +08:00

57 lines
1.1 KiB
YAML

Global:
text_score: 0.5
use_det: true
use_cls: true
use_rec: true
print_verbose: false
min_height: 30
width_height_ratio: 8
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_dml: false
model_path: models/ch_PP-OCRv4_det_infer.onnx
limit_side_len: 736
limit_type: min
thresh: 0.3
box_thresh: 0.5
max_candidates: 1000
unclip_ratio: 1.6
use_dilation: true
score_mode: fast
Cls:
intra_op_num_threads: *intra_nums
inter_op_num_threads: *inter_nums
use_cuda: false
use_dml: false
model_path: models/ch_ppocr_mobile_v2.0_cls_infer.onnx
cls_image_shape: [3, 48, 192]
cls_batch_num: 6
cls_thresh: 0.9
label_list: ['0', '180']
Rec:
intra_op_num_threads: *intra_nums
inter_op_num_threads: *inter_nums
use_cuda: false
use_dml: false
model_path: models/ch_PP-OCRv4_rec_infer.onnx
rec_img_shape: [3, 48, 320]
rec_batch_num: 6