README.md 958 字节
Newer Older
B
barriery 已提交
1
# OCR Pipeline WebService 
B
barriery 已提交
2 3 4

(English|[简体中文](./README_CN.md))

B
barriery 已提交
5
This document will take OCR as an example to show how to use Pipeline WebService to start multi-model tandem services.
B
barriery 已提交
6

7 8
This OCR example only supports Process OP.

B
barriery 已提交
9 10
## Get Model
```
11
python3 -m paddle_serving_app.package --get_model ocr_rec
B
barriery 已提交
12
tar -xzvf ocr_rec.tar.gz
13
python3 -m paddle_serving_app.package --get_model ocr_det
B
barriery 已提交
14 15 16 17 18 19 20 21 22
tar -xzvf ocr_det.tar.gz
```

## Get Dataset (Optional)
```
wget --no-check-certificate https://paddle-serving.bj.bcebos.com/ocr/test_imgs.tar
tar xf test_imgs.tar
```

23 24 25
## Run services

### 1.Start a single server and client.
B
barriery 已提交
26
```
27
python3 web_service.py &>log.txt &
B
barriery 已提交
28 29
```

30
Test
B
barriery 已提交
31
```
32
python3 pipeline_http_client.py
B
barriery 已提交
33 34 35 36
```

<!--
## More (PipelineServing)
B
barriery 已提交
37 38

## Client Prediction
B
barriery 已提交
39 40 41

### RPC
```
42
python3 pipeline_rpc_client.py
B
barriery 已提交
43 44 45
```

### HTTP
B
barriery 已提交
46
```
47
python3 pipeline_http_client.py
B
barriery 已提交
48
```
B
barriery 已提交
49
-->
50 51 52 53 54 55 56 57 58 59 60


### 2.Run benchmark
```
python3 web_service.py &>log.txt &
```

Test
```
sh benchmark.sh
```