Skip to content

OCR

在算力舱中部署了一个基于 paddleocrocr 服务.

文档

ocr 服务的 api 可以通过 查看。

本地使用

bash
curl -X 'POST' \
    'https://ocr-ai.13gxg.heiyu.space/ocr' \
    -H 'accept: application/json' \
    -H 'Content-Type: multipart/form-data' \
    -F 'file=@ocr-4.png;type=image/png' \
    -F 'request={"max_size":1920,"overlap":100,"memory_limit_mb":1024,"det":true,"rec":true,"cls":true}'

单独部署使用

  1. 将下面内容保存到一个 docker-compose.yml 文件中
yml
services:
  ocr:
    image: registry.lazycat.cloud/x/lzc-aipod-ocr:d81102a
    ports:
      - 3000:3000
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
      interval: 10s
      timeout: 30s
      retries: 100
      start_period: 1s
  1. 在当前目录运行 docker-compose up -d 启动
  2. 启动后访问 http://127.0.0.1:3000/docs