PaddleOCR
PaddleOCR copied to clipboard
Update ocr_web_server.py
解决位深度为8的单通道在serving请求时的报错:https://github.com/PaddlePaddle/PaddleOCR/issues/8457
Thanks for your contribution!
这个是图片的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: @.***>
feed[0]["image"]
感谢反馈,2.6分支为稳定分支,后续会先在dygraph分支进行修复,为防止冲突该PR暂时先不合入了