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
2.98k stars 464 forks source link

C#部署FastDeploy的问题 #1993

Open sanyangAZ opened 1 year ago

sanyangAZ commented 1 year ago

环境

MonahovS commented 1 year ago

I'm sorry, i don't undestand Chinese, but i think i have some problem. I'm trying to build and use "fastdeploy_sharp.dll". Build is successful (Release, x64, Win10). But after start at the same code line (as in post above) i got System.DllNotFoundException: Unable to load DLL "fastdeploy.dll"

But fastdeploy.dll is in project working directory. It's build with CSHARP_API and C_API on.

I tried to build fastdeploy_sharp.dll (and other fastdeploy libs) from command line, from VS2019, from VS2022 for framework 4.8. I tried to manualy remake project for Net5 and Net6. But i got DllNotFoundException every time.

Am i doing something wrong? Or may be something changed in fastdeploy.dll project?

zhinangubei commented 1 year ago

fc1a27bfce926c0d6d720af6f7e8f87 我到这步,也是推理没结果,好像模型初始化没问题,到infer就退出,不往下执行了

zhcco commented 1 year ago

image Paddleseg预测结果后在释放c++传回的结果内存时会卡住 把释放方法注释掉 在c#代码中释放内存 正常运行 由于c++不太熟悉 不知道这样释放内存会不会有问题 c++中释放内存代码 image

guoyunqingyue commented 1 year ago

请问有使用c#的TensorRT吗

flytocc commented 1 year ago

@zhinangubei 我也碰到了同样的问题,请问你解决了吗

Aspen0309 commented 8 months ago

fc1a27bfce926c0d6d720af6f7e8f87 我到这步,也是推理没结果,好像模型初始化没问题,到infer就退出,不往下执行了

请问您解决了吗

BigerPatax commented 7 months ago

研究了一下代码,和 @zhcco 描述的差不多,内存释放出问题了,注释掉释放内存的代码,推理有数据返回,但通过接口返回给C#里就没了数据,C#代码里得到的是空对象,这一步没整明白,C++不太熟悉

GentlerMan commented 4 months ago

@zhcco @BigerPatax @zhinangubei 请问下各位前辈,后面这个到infer就退出,不往下执行了的问题解决了吗?

ITCZhuxy commented 4 months ago

@zhcco @BigerPatax @zhinangubei 请问下各位前辈,后面这个到infer就退出,不往下执行了的问题解决了吗?

不清楚,后面用了其他方案

zhouyuxixixi commented 3 weeks ago

我也出现了同样的问题,请问有解决方法了么? DllNotFoundException: 无法加载 DLL“fastdeploy.dll”: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)。