PaddleOCR icon indicating copy to clipboard operation
PaddleOCR copied to clipboard

Update ocr_web_server.py

Open jingsongliujing opened this issue 2 years ago • 3 comments

解决位深度为8的单通道在serving请求时的报错:https://github.com/PaddlePaddle/PaddleOCR/issues/8457

jingsongliujing avatar Dec 02 '22 07:12 jingsongliujing

Thanks for your contribution!

paddle-bot[bot] avatar Dec 02 '22 07:12 paddle-bot[bot]

这个是图片的base6464

---Original--- From: @.> Date: Tue, Dec 6, 2022 15:26 PM To: @.>; Cc: @.@.>; Subject: Re: [PaddlePaddle/PaddleOCR] Update ocr_web_server.py (PR #8518)

@andyjpaddle commented on this pull request.

In deploy/pdserving/win/ocr_web_server.py: > @@ -52,6 +53,19 @@ def preprocess(self, feed=[], fetch=[]): data = base64.b64decode(feed[0]["image"].encode('utf8')) data = np.fromstring(data, np.uint8) im = cv2.imdecode(data, cv2.IMREAD_COLOR) + if(im is None): + buf = BytesIO() + image_decode = base64.b64decode(data["img"].encode())
这里的data["img"]是什么?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

jingsongliujing avatar Dec 06 '22 07:12 jingsongliujing

feed[0]["image"]

感谢反馈,2.6分支为稳定分支,后续会先在dygraph分支进行修复,为防止冲突该PR暂时先不合入了

andyjiang1116 avatar Dec 06 '22 12:12 andyjiang1116