Skip to content

📄 Awesome OCR multiple programing languages toolkits based on ONNX Runtime, OpenVINO, MNN, PaddlePaddle, TensorRT and PyTorch.

Update docs and update to v1.2.0

SWHLefe8f982308f
diff --git a/docs/doc_whl_rapidocr_ort.md b/docs/doc_whl_rapidocr_ort.md
index 995a588..3b61d3c 100644
--- a/docs/doc_whl_rapidocr_ort.md
+++ b/docs/doc_whl_rapidocr_ort.md
@@ -2,6 +2,7 @@
<p>
<a href=""><img src="https://img.shields.io/badge/Python->=3.7,<=3.10-aff.svg"></a>
<a href=""><img src="https://img.shields.io/badge/OS-Linux%2C%20Win%2C%20Mac-pink.svg"></a>
+ <a href="https://pepy.tech/project/rapidocr_onnxruntime"><img src="https://static.pepy.tech/personalized-badge/rapidocr_onnxruntime?period=total&units=abbreviation&left_color=grey&right_color=blue&left_text=Downloads%20Ort"></a>
</p>
### 1. Install package by pypi.
@@ -46,12 +47,63 @@ $ pip install rapidocr-onnxruntime
- Run by command line.
```bash
$ rapidocr_onnxruntime -h
- usage: rapidocr_onnxruntime [-h] [-img IMG_PATH] [-p]
+ usage: rapidocr_onnxruntime [-h] -img IMG_PATH [-p] [--text_score TEXT_SCORE]
+ [--use_angle_cls USE_ANGLE_CLS]
+ [--use_text_det USE_TEXT_DET]
+ [--print_verbose PRINT_VERBOSE]
+ [--min_height MIN_HEIGHT]
+ [--width_height_ratio WIDTH_HEIGHT_RATIO]
+ [--det_model_path DET_MODEL_PATH]
+ [--det_limit_side_len DET_LIMIT_SIDE_LEN]
+ [--det_limit_type {max,min}]
+ [--det_thresh DET_THRESH]
+ [--det_box_thresh DET_BOX_THRESH]
+ [--det_unclip_ratio DET_UNCLIP_RATIO]
+ [--det_use_dilation DET_USE_DILATION]
+ [--det_score_mode {slow,fast}]
+ [--cls_model_path CLS_MODEL_PATH]
+ [--cls_image_shape CLS_IMAGE_SHAPE]
+ [--cls_label_list CLS_LABEL_LIST]
+ [--cls_batch_num CLS_BATCH_NUM]
+ [--cls_thresh CLS_THRESH]
+ [--rec_model_path REC_MODEL_PATH]
+ [--rec_image_shape REC_IMAGE_SHAPE]
+ [--rec_batch_num REC_BATCH_NUM]
optional arguments:
-h, --help show this help message and exit
- -img IMG_PATH, --img_path IMG_PATH
+ -img IMG_PATH, --img_path IMG_PATH MUST
-p, --print_cost
+ Global:
+ --text_score TEXT_SCORE
+ --use_angle_cls USE_ANGLE_CLS
+ --use_text_det USE_TEXT_DET
+ --print_verbose PRINT_VERBOSE
+ --min_height MIN_HEIGHT
+ --width_height_ratio WIDTH_HEIGHT_RATIO
+
+ Det:
+ --det_model_path DET_MODEL_PATH
+ --det_limit_side_len DET_LIMIT_SIDE_LEN
+ --det_limit_type {max,min}
+ --det_thresh DET_THRESH
+ --det_box_thresh DET_BOX_THRESH
+ --det_unclip_ratio DET_UNCLIP_RATIO
+ --det_use_dilation DET_USE_DILATION
+ --det_score_mode {slow,fast}
+
+ Cls:
+ --cls_model_path CLS_MODEL_PATH
+ --cls_image_shape CLS_IMAGE_SHAPE
+ --cls_label_list CLS_LABEL_LIST
+ --cls_batch_num CLS_BATCH_NUM
+ --cls_thresh CLS_THRESH
+
+ Rec:
+ --rec_model_path REC_MODEL_PATH
+ --rec_image_shape REC_IMAGE_SHAPE
+ --rec_batch_num REC_BATCH_NUM
+
$ rapidocr_onnxruntime -img tests/test_files/ch_en_num.jpg
```
\ No newline at end of file
diff --git a/python/README.md b/python/README.md
index f4ffa2c..865da00 100755
--- a/python/README.md
+++ b/python/README.md
@@ -12,7 +12,6 @@
- [RapidOCR Python](#rapidocr-python)
- [简介和说明](#简介和说明)
- [(推荐)pip安装快速使用](#推荐pip安装快速使用)
- - [源码使用步骤](#源码使用步骤)
- [`config.yaml`中常用参数介绍](#configyaml中常用参数介绍)
- [onnxruntime-gpu版相关说明](#onnxruntime-gpu版相关说明)
- [onnxruntime-gpu版推理配置](#onnxruntime-gpu版推理配置)
@@ -61,6 +60,7 @@
from rapidocr_onnxruntime import RapidOCR
# from rapidocr_openvino import RapidOCR
+ # RapidOCR可传入参数参考下面的命令行部分
rapid_ocr = RapidOCR()
img_path = 'tests/test_files/ch_en_num.jpg'
@@ -87,15 +87,66 @@
# 如果没有有效文本,则result: (None, None)
```
- 命令行使用:
- ```bash
- $ rapidocr_onnxruntime -h / rapidocr_openvino -h
- usage: rapidocr_onnxruntime [-h] [-img IMG_PATH] [-p]
+ ```bash
+ $ rapidocr_onnxruntime -h
+ usage: rapidocr_onnxruntime [-h] -img IMG_PATH [-p] [--text_score TEXT_SCORE]
+ [--use_angle_cls USE_ANGLE_CLS]
+ [--use_text_det USE_TEXT_DET]
+ [--print_verbose PRINT_VERBOSE]
+ [--min_height MIN_HEIGHT]
+ [--width_height_ratio WIDTH_HEIGHT_RATIO]
+ [--det_model_path DET_MODEL_PATH]
+ [--det_limit_side_len DET_LIMIT_SIDE_LEN]
+ [--det_limit_type {max,min}]
+ [--det_thresh DET_THRESH]
+ [--det_box_thresh DET_BOX_THRESH]
+ [--det_unclip_ratio DET_UNCLIP_RATIO]
+ [--det_use_dilation DET_USE_DILATION]
+ [--det_score_mode {slow,fast}]
+ [--cls_model_path CLS_MODEL_PATH]
+ [--cls_image_shape CLS_IMAGE_SHAPE]
+ [--cls_label_list CLS_LABEL_LIST]
+ [--cls_batch_num CLS_BATCH_NUM]
+ [--cls_thresh CLS_THRESH]
+ [--rec_model_path REC_MODEL_PATH]
+ [--rec_image_shape REC_IMAGE_SHAPE]
+ [--rec_batch_num REC_BATCH_NUM]
optional arguments:
-h, --help show this help message and exit
- -img IMG_PATH, --img_path IMG_PATH
+ -img IMG_PATH, --img_path IMG_PATH MUST
-p, --print_cost
+ Global:
+ --text_score TEXT_SCORE
+ --use_angle_cls USE_ANGLE_CLS
+ --use_text_det USE_TEXT_DET
+ --print_verbose PRINT_VERBOSE
+ --min_height MIN_HEIGHT
+ --width_height_ratio WIDTH_HEIGHT_RATIO
+
+ Det:
+ --det_model_path DET_MODEL_PATH
+ --det_limit_side_len DET_LIMIT_SIDE_LEN
+ --det_limit_type {max,min}
+ --det_thresh DET_THRESH
+ --det_box_thresh DET_BOX_THRESH
+ --det_unclip_ratio DET_UNCLIP_RATIO
+ --det_use_dilation DET_USE_DILATION
+ --det_score_mode {slow,fast}
+
+ Cls:
+ --cls_model_path CLS_MODEL_PATH
+ --cls_image_shape CLS_IMAGE_SHAPE
+ --cls_label_list CLS_LABEL_LIST
+ --cls_batch_num CLS_BATCH_NUM
+ --cls_thresh CLS_THRESH
+
+ Rec:
+ --rec_model_path REC_MODEL_PATH
+ --rec_image_shape REC_IMAGE_SHAPE
+ --rec_batch_num REC_BATCH_NUM
+
$ rapidocr_onnxruntime -img tests/test_files/ch_en_num.jpg
```