README_CN.md 1.1 KB
Newer Older
Sugon_ldc's avatar
Sugon_ldc committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
简体中文 | [English](README.md)

## 使用Paddle Inference C++部署PaddleSeg模型

### 1、安装

- Paddle Inference C++

- OpenCV

- Yaml

 更多的安装信息,请参考[教程](../../../../docs/deployment/inference/cpp_inference_cn.md)

### 2、模型和图片

 - 下载模型

 进入`LaneSeg/`目录下,执行如下命令:
```shell
   mkdir output # if not exists
   wget -P output https://paddleseg.bj.bcebos.com/lane_seg/bisenet/model.pdparams
```
 - 导出模型
```shell
   python export.py \
    --config configs/bisenetV2_tusimple_640x368_300k.yml \
    --model_path output/model.pdparams \
    --save_dir output/export
```  

 - 图片使用 `data/test_images/3.jpg`

### 3、编译、执行

进入目录`LaneSeg/deploy/cpp`

执行`sh run_seg_cpu.sh`,会进行编译,然后在X86 CPU上执行预测。

执行`sh run_seg_gpu.sh`,会进行编译,然后在Nvidia GPU上执行预测。

结果会保存在当前目录的`out_img_seg.jpg``out_image_points.jpg`图片。

- 注意:对于模型和图片的路径,可以按需要对文件`run_seg_cpu.sh``run_seg_gpu.sh`进行修改。