Comments (1)
modify method get_img
in FILE ocr_server.py
def get_img(request, img_type='file', img_name='image'):
if img_type == 'b64': #
try: # json str of multiple images
dic = json.loads(request.get_data())
img_base64 = dic.get(img_name)
if 'base64,' in img_base64:
img_base64 = img_base64.split('base64,')[1]
img = base64.b64decode(img_base64)
except Exception as e: # just base64 of single image
pass
else:
img = request.files.get(img_name).read()
return img
and POST http://127.0.0.1:9898/ocr/b64/json
the body is
{
"image": "data:image/png;base64,iVBxxxxORQrKm"
}
from ocr_api_server.
Related Issues (20)
- api 加个flask_cors包? 解决跨域问题,就可以结合tampermonkey的脚本,在浏览器上识别登录界面的验证码 HOT 3
- 怎么把本地训练好的模型给 线上的ocr_api_server HOT 2
- 请求返回不能识别是什么原因? HOT 2
- windows server2008安装报错
- docker 启动报错 HOT 1
- postman base64 无效 HOT 5
- 能跟随升级一下吗?
- 关于arm32(arm7l)的镜像的构建
- 带数学运算的图形验证码好像识别不准确 HOT 1
- 一大一小滑块识别报错
- module 'PIL.Image' has no attribute 'ANTIALIAS' HOT 2
- 部署成功,请求也正常访问,但是执行oci_api_server里面ocr识别率为0
- cannot identify image file <_io.BytesIO object at 0x7fe7e4a46680> HOT 2
- JS unit8Array,Base64结果和python的base64不一样啊
- docker部署没有返回结果 HOT 2
- 使用docker并反向代理到外部的时候使用api返回405
- m1 pro+docker跑步起来,这个接口是不是不支持m系列处理器?
- 请问docker运行,文档中提到的entrypoint.sh在仓库用找到,请问在那?谢谢
- ubuntu搭建过程出错,请帮忙看看
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ocr_api_server.