提交 13df8ea4 编写于 作者: M MRXLT

Merge remote-tracking branch 'origin/0.3.0-bug-fix' into 0.3.0-bug-fix

sync
([简体中文](./README_CN.md)|English)
<p align="center">
<br>
<img src='doc/serving_logo.png' width = "600" height = "130">
<br>
<p>
<p align="center">
<br>
<a href="https://travis-ci.com/PaddlePaddle/Serving">
......
(简体中文|[English](./README.md))
<p align="center">
<br>
<img src='https://paddle-serving.bj.bcebos.com/imdb-demo%2FLogoMakr-3Bd2NM-300dpi.png' width = "600" height = "130">
<br>
<p>
<p align="center">
<br>
<a href="https://travis-ci.com/PaddlePaddle/Serving">
......
......@@ -19,10 +19,10 @@ pip install paddle_serving_app
启动server端
```
python image_classification_service.py ResNet50_vd_model cpu 9696 #cpu预测服务
python resnet50_web_service.py ResNet50_vd_model cpu 9696 #cpu预测服务
```
```
python image_classification_service.py ResNet50_vd_model gpu 9696 #gpu预测服务
python resnet50_web_service.py ResNet50_vd_model gpu 9696 #gpu预测服务
```
......
......@@ -296,7 +296,10 @@ class File2Image(object):
pass
def __call__(self, img_path):
fin = open(img_path)
if py_version == 2:
fin = open(img_path)
else:
fin = open(img_path, "rb")
sample = fin.read()
data = np.fromstring(sample, np.uint8)
img = cv2.imdecode(data, cv2.IMREAD_COLOR)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册