Fork me on GitHub

利用java-springboot和paddleocr进行ocr识别

利用java-springboot和paddleocr进行ocr识别

项目:https://github.com/jiangnanboy/java-springboot-paddleocr

Table of Contents
  1. About
  2. Getting Started
  3. Result
  4. Contact
  5. Reference

About

本项目利用java加载paddle-ocr的C++编译版本,并利用springboot进行web部署访问。

Getting started

paddle-ocr c++编译模型下载,下载后放入resources下

链接:https://pan.baidu.com/s/1Pj2IxSgpdVNeHljAcHiI4Q

提取码:x9m5

项目启动后访问 http://localhost:8080/swagger-ui/ 测试

其中:

1./ocr:返回json结果(包括识别的文字,坐标以及置信度)

2./ocr/image:返回识别后绘制的图片结果

Result

/ocr,返回json结果
[
  {
      "text": "表 1",
      "box": [
        [
          59,
          74
        ],
        [
          121,
          74
        ],
        [
          121,
          106
        ],
        [
          59,
          106
        ]
      ],
      "score": 0.7097494006156921
    },
    {
      "text": "2015年云南白药股份有限公司行业数据比较分析",
      "box": [
        [
          149,
          73
        ],
        [
          886,
          72
        ],
        [
          886,
          101
        ],
        [
          149,
          102
        ]
      ],
      "score": 0.8905224800109863
    },
  ...
]
/ocr/image,返回图片结果

 

posted @ 2022-11-25 23:11  石头木  阅读(3547)  评论(1编辑  收藏  举报