mirror of
https://github.com/RapidAI/RapidOCR.git
synced 2026-11-11 13:30:51 +08:00
72 lines
1.8 KiB
YAML
72 lines
1.8 KiB
YAML
Global:
|
|
text_score: 0.5
|
|
use_angle_cls: true
|
|
print_verbose: false
|
|
min_height: 30
|
|
width_height_ratio: 8
|
|
|
|
Det:
|
|
module_name: ch_ppocr_v3_det
|
|
class_name: TextDetector
|
|
model_path: models/ch_PP-OCRv3_det_infer.onnx
|
|
|
|
use_cuda: true
|
|
# Details of the params: https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html
|
|
CUDAExecutionProvider:
|
|
device_id: 0
|
|
arena_extend_strategy: kNextPowerOfTwo
|
|
cudnn_conv_algo_search: EXHAUSTIVE
|
|
do_copy_in_default_stream: true
|
|
|
|
pre_process:
|
|
DetResizeForTest:
|
|
limit_side_len: 736
|
|
limit_type: min
|
|
NormalizeImage:
|
|
std: [0.229, 0.224, 0.225]
|
|
mean: [0.485, 0.456, 0.406]
|
|
scale: 1./255.
|
|
order: hwc
|
|
ToCHWImage:
|
|
KeepKeys:
|
|
keep_keys: ['image', 'shape']
|
|
|
|
post_process:
|
|
thresh: 0.3
|
|
box_thresh: 0.5
|
|
max_candidates: 1000
|
|
unclip_ratio: 1.6
|
|
use_dilation: true
|
|
|
|
Cls:
|
|
module_name: ch_ppocr_v2_cls
|
|
class_name: TextClassifier
|
|
model_path: models/ch_ppocr_mobile_v2.0_cls_infer.onnx
|
|
|
|
use_cuda: true
|
|
CUDAExecutionProvider:
|
|
device_id: 0
|
|
arena_extend_strategy: kNextPowerOfTwo
|
|
cudnn_conv_algo_search: EXHAUSTIVE
|
|
do_copy_in_default_stream: true
|
|
|
|
cls_image_shape: [3, 48, 192]
|
|
cls_batch_num: 6
|
|
cls_thresh: 0.9
|
|
label_list: ['0', '180']
|
|
|
|
Rec:
|
|
module_name: ch_ppocr_v3_rec
|
|
class_name: TextRecognizer
|
|
model_path: models/ch_PP-OCRv3_rec_infer.onnx
|
|
|
|
use_cuda: true
|
|
CUDAExecutionProvider:
|
|
device_id: 0
|
|
arena_extend_strategy: kNextPowerOfTwo
|
|
cudnn_conv_algo_search: EXHAUSTIVE
|
|
do_copy_in_default_stream: true
|
|
|
|
rec_img_shape: [3, 48, 320]
|
|
rec_batch_num: 6
|