提交 bbeb6fb1 编写于 作者: S stephon

modify imagpath of rpc client

上级 0f908e75
...@@ -19,11 +19,13 @@ import base64 ...@@ -19,11 +19,13 @@ import base64
client = PipelineClient() client = PipelineClient()
client.connect(['127.0.0.1:9994']) client.connect(['127.0.0.1:9994'])
imgpath = "daoxiangcunjinzhubing_6.jpg" imgpath = "../../drink_dataset_v1.0/test_images/001.jpeg"
def cv2_to_base64(image): def cv2_to_base64(image):
return base64.b64encode(image).decode('utf8') return base64.b64encode(image).decode('utf8')
if __name__ == "__main__": if __name__ == "__main__":
with open(imgpath, 'rb') as file: with open(imgpath, 'rb') as file:
image_data = file.read() image_data = file.read()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册