Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A simple way to deploy PaddleOCR based on FastAPI. (PaddleOCR 的 FastAPI 快速部署方案)

License

Notifications You must be signed in to change notification settings

velviagris/PaddleOCRFastAPI

 
 

Repository files navigation

SimplePaddleOCRApi

一个可 Docker (Compose) 部署的, 基于 FastAPI 的简易版 Paddle OCR Web API.

接口功能

  • 局域网范围内路径图片 OCR 识别
  • Base64 数据识别
  • 上传文件识别

部署方式

Centos7, Windows 10, Windows 11 中测试成功, 需要先安装好 Docker.

  1. 复制项目至部署路径

    git clone https://github.com/cgcel/SimplePaddleOCRApi.git
  2. 制作 Docker 镜像

    docker build -t paddleocrapi:<your_tag> .
  3. 编辑 docker-compose.yml

    version: "3"
    
    services:
    
      PaddleOCR:
        container_name: paddle_ocr_api # 自定义容器名
        image: paddleocrapi:latest # 第2步自定义的镜像名与标签
        environment:
          - TZ=Asia/Hong_Kong
        ports:
         - 8000:8000 # 自定义服务暴露端口, 8000为FastAPI默认端口, 不做修改
        restart: unless-stopped
  4. 生成 Docker 容器并运行

    docker-compose up -d
  5. Swagger 页面请访问 localhost:<port>/docs

运行截图

Swagger

About

A simple way to deploy PaddleOCR based on FastAPI. (PaddleOCR 的 FastAPI 快速部署方案)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published