README.md 1.0 KB
Newer Older
J
Jiawei Wang 已提交
1
## Image Classification
M
MRXLT 已提交
2

J
Jiawei Wang 已提交
3
([简体中文](./README_CN.md)|English)
M
MRXLT 已提交
4

J
Jiawei Wang 已提交
5 6 7
The example uses the ResNet50_vd model to perform the imagenet 1000 classification task.

### Get model config and sample dataset
M
MRXLT 已提交
8
```
M
MRXLT 已提交
9
sh get_model.sh
M
MRXLT 已提交
10
```
J
Jiawei Wang 已提交
11
### HTTP Infer
M
MRXLT 已提交
12

J
Jiawei Wang 已提交
13
launch server side
M
MRXLT 已提交
14
```
J
Jiawei Wang 已提交
15
python image_classification_service.py ResNet50_vd_model workdir 9393 #cpu inference service
M
MRXLT 已提交
16
```
M
MRXLT 已提交
17
```
J
Jiawei Wang 已提交
18
python image_classification_service_gpu.py ResNet50_vd_model workdir 9393 #gpu inference service
M
MRXLT 已提交
19 20
```

M
MRXLT 已提交
21

J
Jiawei Wang 已提交
22
client send inference request
M
MRXLT 已提交
23 24 25
```
python image_http_client.py
```
J
Jiawei Wang 已提交
26
### RPC Infer
M
MRXLT 已提交
27

J
Jiawei Wang 已提交
28
launch server side
M
MRXLT 已提交
29
```
J
Jiawei Wang 已提交
30
python -m paddle_serving_server.serve --model ResNet50_vd_model --port 9393 #cpu inference service
M
MRXLT 已提交
31 32 33
```

```
J
Jiawei Wang 已提交
34
python -m paddle_serving_server_gpu.serve --model ResNet50_vd_model --port 9393 --gpu_ids 0 #gpu inference service
M
MRXLT 已提交
35 36
```

J
Jiawei Wang 已提交
37
client send inference request
M
MRXLT 已提交
38
```
M
fix doc  
MRXLT 已提交
39
python image_rpc_client.py ResNet50_vd_client_config/serving_client_conf.prototxt
M
MRXLT 已提交
40
```
J
Jiawei Wang 已提交
41
*the port of server side in this example is 9393, the sample data used by client side is in the folder ./data. These parameter can be modified in practice*