PaddlePaddle / FastDeploy

⚡️An Easy-to-use and Fast Deep Learning Model Deployment Toolkit for ☁️Cloud 📱Mobile and 📹Edge. Including Image, Video, Text and Audio 20+ main stream scenarios and 150+ SOTA models with end-to-end optimization, multi-platform and multi-framework support.
https://www.paddlepaddle.org.cn/fastdeploy
Apache License 2.0
3.01k stars 465 forks source link

编译paddleseg infer.cs,没推理结果 #1853

Open zhinangubei opened 1 year ago

zhinangubei commented 1 year ago

环境

修改了OpenCvSharp版本4.7.0.20230115为4.4.2.0.20200108,以对应net4.0版本,编译成功C# API

编译E:\work\tools\fastdeploy-win-x64-gpu-1.0.4\examples\vision\segmentation\paddleseg\cpu-gpu\csharp中的infer.cs 使用以下方法:

1、vs2019 创建控制台应用.net framework新项目D:\paddleseg_csharp\paddleseg_demo_gpu,选择net4.0版本 将E:\work\tools\fastdeploy-win-x64-gpu-1.0.4\examples\vision\segmentation\paddleseg\cpu-gpu\csharp中的infer.cs代码拷贝到D:\paddleseg_csharp\paddleseg_demo_gpu infer.cs 2、下载opencvsharp4.2.0.20200108版本,和编译fastdeploy_csharp API一致,添加引用,引用编译好的fastdeploy_csharp 3、设置配置管理器:release x64,生成paddle_demo.exe. 4、将所有dll拷贝到可执行程序同目录,fastdeploy_init.bat install %cd% D:\paddleseg_csharp\paddleseg_demo_gpu\bin\x64\Release 5、运行paddleseg_demo_gpu PP_LiteSeg_B_STDC2_cityscapes_without_argmax_infer cityscapes_demo.png 0

执行没报错,但没显示推理结果;改代码为Cv2.ImWrite("result.jpg", res_img);也未保存结果

be6d01a40e7968de0e7f051e882090e

zyz207 commented 1 year ago

我也遇到一样的问题,楼主解决了吗

zhinangubei commented 1 year ago

我也遇到一样的问题,楼主解决了吗

没有,最近没再弄了,你有解决办法吗?可加微信互相学习:要八八要起要二灵二零五