安装及使用
Note
OCR API的输出结果为最原始结果,大家可按需进一步扩展。
简介¶
- 该包是将rapidocr_onnxruntime库做了API封装,采用FastAPI + uvicorn实现。
- 定位是一个快速调用
rapidocr_onnxruntime
的API接口,没有考虑多进程处理并发请求,如果有这需求的小伙伴,可以看看gunicorn等。
安装¶
启动服务端¶
-
用法:
-
启动:
调用¶
Info
调用本质就是发送一个POST请求,以下给出Curl和Python的调用示例,其他编程语言同理。
Curl调用¶
Python调用¶
API输出¶
-
输出结果说明:
-
如果图像中存在文字,则会输出字典格式,具体介绍如下:
-
如果没有检测到文字,则会输出空字典(
{}
)。 - 示例结果:
-