We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C# Release代码
opencv4.8版本 opencvsharp4.7 指定版本 cuda 12.1版本
运行时使用Cpu进行推理 RuntimeOption runtimeoption = new RuntimeOption(); runtimeoption.UseCpu(); fastdeploy.vision.detection.PPYOLOE model = new fastdeploy.vision.detection.PPYOLOE(model_file, params_file, config_file, runtimeoption, ModelFormat.PADDLE); if (!model.Initialized()) { Console.WriteLine("Failed to initialize.\n"); } Mat image = Cv2.ImRead(image_path); fastdeploy.vision.DetectionResult res = model.Predict(image); Console.WriteLine(res.ToString()); Mat res_img = fastdeploy.vision.Visualize.VisDetection(image, res, 0, 1, 0.5f); Cv2.ImShow("result.png", res_img); Cv2.WaitKey(0);
正常加载读取模型 运行到Predict推理,就异常闪退。调试后DetectionResult detection_result =ConvertResult.ConvertCResultToDetectionResult(fd_detection_result); 问题,可以检测到目标300个,然后在return后直接异常报错,包括下方的Visualize.VisDetection(image, res, 0, 1, 0.5f);中涉及到的反转换也都是异常,最后运行完结果
C#的exe程序不使用兼容模式的话应该直接到predict就闪退了,使用兼容模式能到最后结果显示,但是程序中的错误肯定还是如上面描述一样存在的,该如何处理
The text was updated successfully, but these errors were encountered:
使用C++或Python正常么
Sorry, something went wrong.
juncaipeng
No branches or pull requests
C# Release代码
opencv4.8版本
opencvsharp4.7 指定版本
cuda 12.1版本
运行时使用Cpu进行推理
RuntimeOption runtimeoption = new RuntimeOption();
runtimeoption.UseCpu();
fastdeploy.vision.detection.PPYOLOE model = new fastdeploy.vision.detection.PPYOLOE(model_file, params_file, config_file, runtimeoption, ModelFormat.PADDLE);
if (!model.Initialized())
{
Console.WriteLine("Failed to initialize.\n");
}
Mat image = Cv2.ImRead(image_path);
fastdeploy.vision.DetectionResult res = model.Predict(image);
Console.WriteLine(res.ToString());
Mat res_img = fastdeploy.vision.Visualize.VisDetection(image, res, 0, 1, 0.5f);
Cv2.ImShow("result.png", res_img);
Cv2.WaitKey(0);
正常加载读取模型
运行到Predict推理,就异常闪退。调试后DetectionResult detection_result =ConvertResult.ConvertCResultToDetectionResult(fd_detection_result); 问题,可以检测到目标300个,然后在return后直接异常报错,包括下方的Visualize.VisDetection(image, res, 0, 1, 0.5f);中涉及到的反转换也都是异常,最后运行完结果
C#的exe程序不使用兼容模式的话应该直接到predict就闪退了,使用兼容模式能到最后结果显示,但是程序中的错误肯定还是如上面描述一样存在的,该如何处理
The text was updated successfully, but these errors were encountered: