mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
[Streamer] Basic framework, YAML parser, ppyoloe demo and video decoder demo (#863)
* support trt installed in sys dir * streamer init * link elements and run * create source bin * add config * restruct dirs * set property * link elements * integrate perf * add bbox parser * parse yaml to string, video decoder * use try pull for decoder and nits * streamer ppyoloe cpp * update readme * video decoder cpp dir * add cn readme * update readme * cmake nits * refactor perf measurement
This commit is contained in:
44
streamer/examples/ppyoloe/cpp/README_CN.md
Normal file
44
streamer/examples/ppyoloe/cpp/README_CN.md
Normal file
@@ -0,0 +1,44 @@
|
||||
简体中文 | [English](README_EN.md)
|
||||
|
||||
# FastDeploy Streamer PP-YOLOE C++ Example
|
||||
|
||||
## 编译和运行
|
||||
|
||||
1. 需要先FastDeploy Streamer, 请参考[README](../../../README.md)
|
||||
|
||||
2. 编译Example
|
||||
```
|
||||
mkdir build && cd build
|
||||
cmake .. -DFASTDEPLOY_INSTALL_DIR=[PATH-OF-FASTDEPLOY-INSTALL-DIR]
|
||||
make -j
|
||||
```
|
||||
|
||||
3. 下载模型
|
||||
```
|
||||
wget https://bj.bcebos.com/paddlehub/fastdeploy/ppyoloe_crn_l_300e_coco_onnx_without_scale_factor.tgz
|
||||
tar xvf ppyoloe_crn_l_300e_coco_onnx_without_scale_factor.tgz
|
||||
mv ppyoloe_crn_l_300e_coco_onnx_without_scale_factor/ model/
|
||||
```
|
||||
|
||||
4. 运行
|
||||
```
|
||||
cp ../nvinfer_config.txt .
|
||||
cp ../streamer_cfg.yml .
|
||||
./streamer_demo
|
||||
```
|
||||
|
||||
## 导出ONNX模型,不包含NMS和scale factor
|
||||
```
|
||||
# 导出Paddle推理模型,exclude_nms=True and trt=True
|
||||
git clone https://github.com/PaddlePaddle/PaddleDetection.git
|
||||
cd PaddleDetection
|
||||
python tools/export_model.py -c configs/ppyoloe/ppyoloe_crn_l_300e_coco.yml -o weights=https://paddledet.bj.bcebos.com/models/ppyoloe_crn_l_300e_coco.pdparams exclude_nms=True trt=True --output_dir inference_model
|
||||
|
||||
# 转换为ONNX
|
||||
paddle2onnx --model_dir inference_model/ppyoloe_crn_l_300e_coco/ --model_filename model.pdmodel --params_filename model.pdiparams --save_file ppyoloe.onnx --deploy_backend tensorrt --enable_dev_version True
|
||||
|
||||
# 裁剪ONNX,删除scale factor
|
||||
git clone https://github.com/PaddlePaddle/Paddle2ONNX.git
|
||||
cd Paddle2ONNX
|
||||
python tools/onnx/prune_onnx_model.py --model ../PaddleDetection/ppyoloe.onnx --output_names concat_14.tmp_0 p2o.Mul.245 --save_file ppyoloe_without_scale_factor.onnx
|
||||
```
|
||||
Reference in New Issue
Block a user