Git Product home page Git Product logo

ocr_back's Introduction

后端部分接口

代码有点乱等待整理

  用户先将图片上传到服务器,服务器返回url,然后使用该url调用识别接口

全局返回参数

  'responseTime': 服务器响应时间 %Y-%m-%d %H:%M:%S"
  'success': 调用是否成功 (True or False) 
  'code': 响应状态码 (见下)
  'status': 响应状态
  'data': 返回的数据
  'message': 相应信息

相应状态码定义

    Success = 200
    NotLogin = 400
    ResourceExist = 401
    ResourceNotPermit = 403
    ServerError = 500
    ParameterError = 501

上传文件

  • Method : Post
  • URL : /upload
  • Request : 名称为 file 的图片文件
  • Response :
{
   image_url : str //图片在服务器上的路径 
}

识别

  • Method : Post
  • URL : /ocr
  • Request :
{
    image_url : str  //图片在服务器上的路径
}
  • Response :
{
    text : str, //识别结果
    res_url : str //识别结果图片路径,访问需要在前面拼接ip端口
}

ocr_back's People

Contributors

starry316 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.