Skip to content

Commit

Permalink
deploy: 0862bc6
Browse files Browse the repository at this point in the history
  • Loading branch information
SWHL committed Sep 21, 2023
1 parent d0e3872 commit 1f23b1e
Show file tree
Hide file tree
Showing 44 changed files with 343 additions and 173 deletions.
4 changes: 2 additions & 2 deletions docs/about_model/convert_model/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1394,8 +1394,8 @@ <h3 id="离线转换httpsgithubcomrapidaipaddleocrmodelconverter"><a href="https
id: 28 ,
href: "\/RapidOCRDocs\/docs\/install_usage\/rapidocr_onnxruntime\/usage\/",
title: "使用说明",
description: "安装 link pip install rapidocr-onnxruntime 初始化 link类RapidOCR是主类,其初始化函数如下:\nclass RapidOCR: def __init__(self, config_path: Optional[str] = None, **kwargs): pass 支持两种自定义传参数的方案,下面分别详细说明:\n以config.yaml方式 找到rapidocr_onnxruntime安装目录下的config.yaml文件,可以通过pip show rapidocr_onnxruntime找到其安装路径。 将config.yaml拷贝出来,放到当前运行目录下 按需自定义参数修改即可,具体参数解释,参见config.yaml engine = RapidOCR(config_path=\"your.yaml\") (推荐) 以具体参数传入,参数基本和config.yaml中对应,只是个别名称有所区别。 class RapidOCR: def __init__( self, text_score: float = 0.5, print_verbose: bool = False, min_height: int = 30, width_height_ratio: float = 8, det_use_cuda: bool = False, det_model_path: Optional[str] = None, det_limit_side_len: float = 736, det_limit_type: str = \"min\", det_thresh: float = 0.",
content: " 安装 link pip install rapidocr-onnxruntime 初始化 link类RapidOCR是主类,其初始化函数如下:\nclass RapidOCR: def __init__(self, config_path: Optional[str] = None, **kwargs): pass 支持两种自定义传参数的方案,下面分别详细说明:\n以config.yaml方式 找到rapidocr_onnxruntime安装目录下的config.yaml文件,可以通过pip show rapidocr_onnxruntime找到其安装路径。 将config.yaml拷贝出来,放到当前运行目录下 按需自定义参数修改即可,具体参数解释,参见config.yaml engine = RapidOCR(config_path=\"your.yaml\") (推荐) 以具体参数传入,参数基本和config.yaml中对应,只是个别名称有所区别。 class RapidOCR: def __init__( self, text_score: float = 0.5, print_verbose: bool = False, min_height: int = 30, width_height_ratio: float = 8, det_use_cuda: bool = False, det_model_path: Optional[str] = None, det_limit_side_len: float = 736, det_limit_type: str = \"min\", det_thresh: float = 0.3, det_box_thresh: float = 0.5, det_unclip_ratio: float = 1.6, det_donot_use_dilation: bool = False, det_score_mode: str = \"fast\", cls_use_cuda: bool = False, cls_model_path: Optional[str] = None, cls_image_shape: List[int] = [3, 48, 192], cls_label_list: List[str] = [\"0\", \"180\"], cls_batch_num: int = 6, cls_thresh: float = 0.9, rec_use_cuda: bool = False, rec_model_path: Optional[str] = None, rec_img_shape: List[int] = [3, 48, 320], rec_batch_num: int = 6, ): pass engine = RapidOCR() res, elapse = engine(img, use_det=True, use_cls=True, use_rec=True) 输入和输出 link 输入:Union[str, np.ndarray, bytes, Path] 输出: 有值:([[文本框坐标], 文本内容, 置信度], 推理时间),示例如下: [[左上, 右上, 右下, 左下], '小明', '0.99'], [0.02, 0.02, 0.85] 无值:(None, None) 不同传入方式使用示例 link str np.ndarray Bytes Path from pathlib import Path import cv2 from rapidocr_onnxruntime import RapidOCR engine = RapidOCR() img_path = 'tests/test_files/ch_en_num.jpg' result, elapse = engine(img_path) print(result) print(elapse) from pathlib import Path import cv2 from rapidocr_onnxruntime import RapidOCR engine = RapidOCR() img = cv2.imread('tests/test_files/ch_en_num.jpg') result, elapse = engine(img) print(result) print(elapse) from pathlib import Path import cv2 from rapidocr_onnxruntime import RapidOCR engine = RapidOCR() img_path = 'tests/test_files/ch_en_num.jpg' with open(img_path, 'rb') as f: img = f.read() result, elapse = engine(img) print(result) print(elapse) from pathlib import Path import cv2 from rapidocr_onnxruntime import RapidOCR engine = RapidOCR() img_path = Path('tests/test_files/ch_en_num.jpg') result, elapse = engine(img_path) print(result) print(elapse) "
description: "初始化 link类RapidOCR是主类,其初始化函数如下:\nclass RapidOCR: def __init__(self, config_path: Optional[str] = None, **kwargs): pass 支持两种自定义传参数的方案,下面分别详细说明:\n以config.yaml方式\n找到rapidocr_onnxruntime安装目录下的config.yaml文件,可以通过pip show rapidocr_onnxruntime找到其安装路径。 将config.yaml拷贝出来,放到当前运行目录下 按需自定义参数修改即可,具体参数解释,参见config.yaml engine = RapidOCR(config_path=\"your.yaml\") (推荐) 以具体参数传入,参数基本和config.yaml中对应,只是个别名称有所区别。\ninfo 以下参数均有默认值,可以不传入任何参数,直接初始化使用即可。 class RapidOCR: def __init__( self, text_score: float = 0.5, print_verbose: bool = False, min_height: int = 30, width_height_ratio: float = 8, det_use_cuda: bool = False, det_model_path: Optional[str] = None, det_limit_side_len: float = 736, det_limit_type: str = \"min\", det_thresh: float = 0.3, det_box_thresh: float = 0.",
content: " 初始化 link类RapidOCR是主类,其初始化函数如下:\nclass RapidOCR: def __init__(self, config_path: Optional[str] = None, **kwargs): pass 支持两种自定义传参数的方案,下面分别详细说明:\n以config.yaml方式\n找到rapidocr_onnxruntime安装目录下的config.yaml文件,可以通过pip show rapidocr_onnxruntime找到其安装路径。 将config.yaml拷贝出来,放到当前运行目录下 按需自定义参数修改即可,具体参数解释,参见"
}
);
index.add(
Expand Down
4 changes: 2 additions & 2 deletions docs/about_model/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1324,8 +1324,8 @@ <h1 class="content-title mb-0">
id: 28 ,
href: "\/RapidOCRDocs\/docs\/install_usage\/rapidocr_onnxruntime\/usage\/",
title: "使用说明",
description: "安装 link pip install rapidocr-onnxruntime 初始化 link类RapidOCR是主类,其初始化函数如下:\nclass RapidOCR: def __init__(self, config_path: Optional[str] = None, **kwargs): pass 支持两种自定义传参数的方案,下面分别详细说明:\n以config.yaml方式 找到rapidocr_onnxruntime安装目录下的config.yaml文件,可以通过pip show rapidocr_onnxruntime找到其安装路径。 将config.yaml拷贝出来,放到当前运行目录下 按需自定义参数修改即可,具体参数解释,参见config.yaml engine = RapidOCR(config_path=\"your.yaml\") (推荐) 以具体参数传入,参数基本和config.yaml中对应,只是个别名称有所区别。 class RapidOCR: def __init__( self, text_score: float = 0.5, print_verbose: bool = False, min_height: int = 30, width_height_ratio: float = 8, det_use_cuda: bool = False, det_model_path: Optional[str] = None, det_limit_side_len: float = 736, det_limit_type: str = \"min\", det_thresh: float = 0.",
content: " 安装 link pip install rapidocr-onnxruntime 初始化 link类RapidOCR是主类,其初始化函数如下:\nclass RapidOCR: def __init__(self, config_path: Optional[str] = None, **kwargs): pass 支持两种自定义传参数的方案,下面分别详细说明:\n以config.yaml方式 找到rapidocr_onnxruntime安装目录下的config.yaml文件,可以通过pip show rapidocr_onnxruntime找到其安装路径。 将config.yaml拷贝出来,放到当前运行目录下 按需自定义参数修改即可,具体参数解释,参见config.yaml engine = RapidOCR(config_path=\"your.yaml\") (推荐) 以具体参数传入,参数基本和config.yaml中对应,只是个别名称有所区别。 class RapidOCR: def __init__( self, text_score: float = 0.5, print_verbose: bool = False, min_height: int = 30, width_height_ratio: float = 8, det_use_cuda: bool = False, det_model_path: Optional[str] = None, det_limit_side_len: float = 736, det_limit_type: str = \"min\", det_thresh: float = 0.3, det_box_thresh: float = 0.5, det_unclip_ratio: float = 1.6, det_donot_use_dilation: bool = False, det_score_mode: str = \"fast\", cls_use_cuda: bool = False, cls_model_path: Optional[str] = None, cls_image_shape: List[int] = [3, 48, 192], cls_label_list: List[str] = [\"0\", \"180\"], cls_batch_num: int = 6, cls_thresh: float = 0.9, rec_use_cuda: bool = False, rec_model_path: Optional[str] = None, rec_img_shape: List[int] = [3, 48, 320], rec_batch_num: int = 6, ): pass engine = RapidOCR() res, elapse = engine(img, use_det=True, use_cls=True, use_rec=True) 输入和输出 link 输入:Union[str, np.ndarray, bytes, Path] 输出: 有值:([[文本框坐标], 文本内容, 置信度], 推理时间),示例如下: [[左上, 右上, 右下, 左下], '小明', '0.99'], [0.02, 0.02, 0.85] 无值:(None, None) 不同传入方式使用示例 link str np.ndarray Bytes Path from pathlib import Path import cv2 from rapidocr_onnxruntime import RapidOCR engine = RapidOCR() img_path = 'tests/test_files/ch_en_num.jpg' result, elapse = engine(img_path) print(result) print(elapse) from pathlib import Path import cv2 from rapidocr_onnxruntime import RapidOCR engine = RapidOCR() img = cv2.imread('tests/test_files/ch_en_num.jpg') result, elapse = engine(img) print(result) print(elapse) from pathlib import Path import cv2 from rapidocr_onnxruntime import RapidOCR engine = RapidOCR() img_path = 'tests/test_files/ch_en_num.jpg' with open(img_path, 'rb') as f: img = f.read() result, elapse = engine(img) print(result) print(elapse) from pathlib import Path import cv2 from rapidocr_onnxruntime import RapidOCR engine = RapidOCR() img_path = Path('tests/test_files/ch_en_num.jpg') result, elapse = engine(img_path) print(result) print(elapse) "
description: "初始化 link类RapidOCR是主类,其初始化函数如下:\nclass RapidOCR: def __init__(self, config_path: Optional[str] = None, **kwargs): pass 支持两种自定义传参数的方案,下面分别详细说明:\n以config.yaml方式\n找到rapidocr_onnxruntime安装目录下的config.yaml文件,可以通过pip show rapidocr_onnxruntime找到其安装路径。 将config.yaml拷贝出来,放到当前运行目录下 按需自定义参数修改即可,具体参数解释,参见config.yaml engine = RapidOCR(config_path=\"your.yaml\") (推荐) 以具体参数传入,参数基本和config.yaml中对应,只是个别名称有所区别。\ninfo 以下参数均有默认值,可以不传入任何参数,直接初始化使用即可。 class RapidOCR: def __init__( self, text_score: float = 0.5, print_verbose: bool = False, min_height: int = 30, width_height_ratio: float = 8, det_use_cuda: bool = False, det_model_path: Optional[str] = None, det_limit_side_len: float = 736, det_limit_type: str = \"min\", det_thresh: float = 0.3, det_box_thresh: float = 0.",
content: " 初始化 link类RapidOCR是主类,其初始化函数如下:\nclass RapidOCR: def __init__(self, config_path: Optional[str] = None, **kwargs): pass 支持两种自定义传参数的方案,下面分别详细说明:\n以config.yaml方式\n找到rapidocr_onnxruntime安装目录下的config.yaml文件,可以通过pip show rapidocr_onnxruntime找到其安装路径。 将config.yaml拷贝出来,放到当前运行目录下 按需自定义参数修改即可,具体参数解释,参见"
}
);
index.add(
Expand Down
4 changes: 2 additions & 2 deletions docs/about_model/model_summary/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1665,8 +1665,8 @@ <h4 id="score两者综合">Score(两者综合): <a href="#score%e4%b8%a4%e8%80%8
id: 28 ,
href: "\/RapidOCRDocs\/docs\/install_usage\/rapidocr_onnxruntime\/usage\/",
title: "使用说明",
description: "安装 link pip install rapidocr-onnxruntime 初始化 link类RapidOCR是主类,其初始化函数如下:\nclass RapidOCR: def __init__(self, config_path: Optional[str] = None, **kwargs): pass 支持两种自定义传参数的方案,下面分别详细说明:\n以config.yaml方式 找到rapidocr_onnxruntime安装目录下的config.yaml文件,可以通过pip show rapidocr_onnxruntime找到其安装路径。 将config.yaml拷贝出来,放到当前运行目录下 按需自定义参数修改即可,具体参数解释,参见config.yaml engine = RapidOCR(config_path=\"your.yaml\") (推荐) 以具体参数传入,参数基本和config.yaml中对应,只是个别名称有所区别。 class RapidOCR: def __init__( self, text_score: float = 0.5, print_verbose: bool = False, min_height: int = 30, width_height_ratio: float = 8, det_use_cuda: bool = False, det_model_path: Optional[str] = None, det_limit_side_len: float = 736, det_limit_type: str = \"min\", det_thresh: float = 0.",
content: " 安装 link pip install rapidocr-onnxruntime 初始化 link类RapidOCR是主类,其初始化函数如下:\nclass RapidOCR: def __init__(self, config_path: Optional[str] = None, **kwargs): pass 支持两种自定义传参数的方案,下面分别详细说明:\n以config.yaml方式 找到rapidocr_onnxruntime安装目录下的config.yaml文件,可以通过pip show rapidocr_onnxruntime找到其安装路径。 将config.yaml拷贝出来,放到当前运行目录下 按需自定义参数修改即可,具体参数解释,参见config.yaml engine = RapidOCR(config_path=\"your.yaml\") (推荐) 以具体参数传入,参数基本和config.yaml中对应,只是个别名称有所区别。 class RapidOCR: def __init__( self, text_score: float = 0.5, print_verbose: bool = False, min_height: int = 30, width_height_ratio: float = 8, det_use_cuda: bool = False, det_model_path: Optional[str] = None, det_limit_side_len: float = 736, det_limit_type: str = \"min\", det_thresh: float = 0.3, det_box_thresh: float = 0.5, det_unclip_ratio: float = 1.6, det_donot_use_dilation: bool = False, det_score_mode: str = \"fast\", cls_use_cuda: bool = False, cls_model_path: Optional[str] = None, cls_image_shape: List[int] = [3, 48, 192], cls_label_list: List[str] = [\"0\", \"180\"], cls_batch_num: int = 6, cls_thresh: float = 0.9, rec_use_cuda: bool = False, rec_model_path: Optional[str] = None, rec_img_shape: List[int] = [3, 48, 320], rec_batch_num: int = 6, ): pass engine = RapidOCR() res, elapse = engine(img, use_det=True, use_cls=True, use_rec=True) 输入和输出 link 输入:Union[str, np.ndarray, bytes, Path] 输出: 有值:([[文本框坐标], 文本内容, 置信度], 推理时间),示例如下: [[左上, 右上, 右下, 左下], '小明', '0.99'], [0.02, 0.02, 0.85] 无值:(None, None) 不同传入方式使用示例 link str np.ndarray Bytes Path from pathlib import Path import cv2 from rapidocr_onnxruntime import RapidOCR engine = RapidOCR() img_path = 'tests/test_files/ch_en_num.jpg' result, elapse = engine(img_path) print(result) print(elapse) from pathlib import Path import cv2 from rapidocr_onnxruntime import RapidOCR engine = RapidOCR() img = cv2.imread('tests/test_files/ch_en_num.jpg') result, elapse = engine(img) print(result) print(elapse) from pathlib import Path import cv2 from rapidocr_onnxruntime import RapidOCR engine = RapidOCR() img_path = 'tests/test_files/ch_en_num.jpg' with open(img_path, 'rb') as f: img = f.read() result, elapse = engine(img) print(result) print(elapse) from pathlib import Path import cv2 from rapidocr_onnxruntime import RapidOCR engine = RapidOCR() img_path = Path('tests/test_files/ch_en_num.jpg') result, elapse = engine(img_path) print(result) print(elapse) "
description: "初始化 link类RapidOCR是主类,其初始化函数如下:\nclass RapidOCR: def __init__(self, config_path: Optional[str] = None, **kwargs): pass 支持两种自定义传参数的方案,下面分别详细说明:\n以config.yaml方式\n找到rapidocr_onnxruntime安装目录下的config.yaml文件,可以通过pip show rapidocr_onnxruntime找到其安装路径。 将config.yaml拷贝出来,放到当前运行目录下 按需自定义参数修改即可,具体参数解释,参见config.yaml engine = RapidOCR(config_path=\"your.yaml\") (推荐) 以具体参数传入,参数基本和config.yaml中对应,只是个别名称有所区别。\ninfo 以下参数均有默认值,可以不传入任何参数,直接初始化使用即可。 class RapidOCR: def __init__( self, text_score: float = 0.5, print_verbose: bool = False, min_height: int = 30, width_height_ratio: float = 8, det_use_cuda: bool = False, det_model_path: Optional[str] = None, det_limit_side_len: float = 736, det_limit_type: str = \"min\", det_thresh: float = 0.3, det_box_thresh: float = 0.",
content: " 初始化 link类RapidOCR是主类,其初始化函数如下:\nclass RapidOCR: def __init__(self, config_path: Optional[str] = None, **kwargs): pass 支持两种自定义传参数的方案,下面分别详细说明:\n以config.yaml方式\n找到rapidocr_onnxruntime安装目录下的config.yaml文件,可以通过pip show rapidocr_onnxruntime找到其安装路径。 将config.yaml拷贝出来,放到当前运行目录下 按需自定义参数修改即可,具体参数解释,参见"
}
);
index.add(
Expand Down
Loading

0 comments on commit 1f23b1e

Please sign in to comment.