Skip to content

fjwupeng/continew-ocr-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

进入 OCR 引擎目录

cd .\continew-ocr-engine\

设置 PowerShell 执行策略(允许运行本地脚本)

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

创建 Python 虚拟环境

python -m venv venv

激活 Python 虚拟环境

.\venv\Scripts\activate.bat

安装 PaddleX 核心库

pip install paddlex

安装 PaddleX 服务化部署插件

paddlex --install serving

导出 PaddleX 产线配置文件

from paddleocr import PaddleOCR

pipeline = PaddleOCR()
pipeline.export_paddlex_config_to_yaml("ocr_config.yaml")

打开 ocr_config.yaml 文件,添加以下内容:

Serving:
  visualize: False  # 添加这行,不返回 ocrImage 等图像字段
  extra:
    max_num_input_imgs: null # 默认对于超过10页的PDF文件,只有前10页的内容会被处理,设置为null,则不限制

启动 OCR 服务(基于 ocr_config.yaml 配置文件)

paddlex --serve --pipeline ocr_config.yaml

About

基于PaddleOCR的可插拔OCR引擎实现

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors