BuLuoPiaoYu

Results 28 comments of BuLuoPiaoYu

不开Opencv是可以Cmake成功的,不过VS这边编译还是会报错的,不知道这个要怎么解决? ![image](https://user-images.githubusercontent.com/54087448/182054122-e50f98d9-6eb6-4702-810a-37e4fc3853a2.png) VS报错信息 ![image](https://user-images.githubusercontent.com/54087448/182053970-5045a3a1-fde8-41b6-ac81-d934d0ba1c1c.png)

![image](https://user-images.githubusercontent.com/54087448/120264010-77459600-c2cf-11eb-98a2-f0424dd6ee16.png) GPU ![image](https://user-images.githubusercontent.com/54087448/120264064-92180a80-c2cf-11eb-858d-c6cdf8aca1e8.png) CPU

dll文件是用你百度云发的那个,不是自己编译的呢 训练模型 ![image](https://user-images.githubusercontent.com/54087448/120264771-10c17780-c2d1-11eb-9937-ed0b4c1afb34.png) 发布模型 ![image](https://user-images.githubusercontent.com/54087448/120264563-a4467880-c2d0-11eb-9dcf-2335829ead6d.png)

> > dll文件是用你百度云发的那个,不是自己编译的呢 > > 模型 > > ![image](https://user-images.githubusercontent.com/54087448/120264563-a4467880-c2d0-11eb-9dcf-2335829ead6d.png) > > 那应该就是CPU、GPU都可以,建议训练和测试都用GPU,修改use GPU参数为True 我用GPU重新训练了,好像没有用。 ![image](https://user-images.githubusercontent.com/54087448/120290975-6ad43400-c2f5-11eb-8bcb-406d012a13de.png)

可以一次加载多个模型对一张图片做预测的吧

> 编译时把tensorrt选项打开,并填写好地址即可。最新代码的分别是: > > 1. WITH_GPU 启用GPU编译, vs的cmake界面勾选上 或 CMakeSettings.json 里的False改为True > 2. WITH_PADDLE_TENSORRT paddle inference推理引擎 是否启用trt。 勾选 或 改为 True > 3. TENSORRT_DIR tensorrt的解压路径, 需要填写上 ![image](https://user-images.githubusercontent.com/54087448/128450025-7a4ecaf8-c4f1-488d-a826-55a1d9d7d76b.png) 我这个应该没错吧,但是我Vs编译出来运行不了啊,如下图: ![image](https://user-images.githubusercontent.com/54087448/128450099-d20f3d09-18cb-41f1-8b60-478f69925666.png) @heliqi

> 1. CUDA_LIBA 路径是否设置正确 ,以及是否配置cuda到环境变量 。 可以用 nvcc --version 指令 和 nvidia-smi 指令 检验下环境变量的设置 > 2. 直接双击 model_infer.exe 看看有没有提示缺少什么dll > > 以上解决完,基本OK。如果还不行: > 3. 你使用的是CMAKE GUI吧,完全按文档用VS自带的cmake重新编译试试 ![image](https://user-images.githubusercontent.com/54087448/128451171-16bf4069-d4b9-466d-b2a8-d118cfb8251b.png) ![image](https://user-images.githubusercontent.com/54087448/128451296-f0d3c16c-ff6f-420f-9128-2c01534a490c.png) 直接双击 model_infer.exe的话就是报那个tensorrt的问题

> 对了,如果你一开始没勾选 WITH_TENSORRT, 后面才勾选。 需要先清空缓存(比如把vs的输出目录out删掉), 然后重新编译一下。 > > 还有一个非常关键的点: > 你下载的paddle inference预测库版本,一定要跟CUDA、CUDNN、TensorRT版本对上。 > 比如: 下载 [cuda11.0_cudnn8.0_avx_mkl_trt7](https://paddle-wheel.bj.bcebos.com/2.1.1/win-infer/mkl/post110/paddle_inference.zip) 预测库 , 那你的cuda一定要是11.0, cuDNN = 8.0、 TensorRT应该是7.2(这个具体看预测库解压后目录中的version.txt文件) 客户端上面需要配置什么环境?跟开发环境一样? @heliqi