This commit is contained in:
Admin
2025-04-28 11:30:29 +08:00
parent bc0ed5d574
commit 95bc9ce3b3
3 changed files with 87 additions and 60 deletions

View File

@ -32,6 +32,10 @@ namespace DH.Devices.Vision
bool res = false;
try
{
if (!Path.GetExtension(mLInit.ModelFile).Equals(".trt", StringComparison.OrdinalIgnoreCase))
{
throw new Exception("选择的模型不是trt格式");
}
Model = MLGPUEngine.InitModel(mLInit.ModelFile, 1, mLInit.Score_thre, mLInit.GPUId, 3, 8);
//Model = MLEngine.InitModel(mLInit.ModelFile, 1, 0.45f, 0, 3);