Please use. NET 5,. NET 6, NET 7,. NET 8, NET Framework 4.6, NET Framework 4.61, NET Framework 4.7, NET Framework 4.72, NET Framework 4.8, NET Framework 4.81, and. NET Core 3.1 versions

Pipeline(ModelType, String, InferenceBackend, DeviceType) 构造函数

Initializes pipeline with model path and configuration 使用模型路径和配置初始化流水线

Definition

命名空间: DeploySharp
程序集:  DeploySharp.ImageSharp (在 DeploySharp.ImageSharp.dll 中) 版本:0.0.4+6e8a2e904469617cd59619d666c0e272985c0e33
  DeploySharp.OpenCvSharp (在 DeploySharp.OpenCvSharp.dll 中) 版本:0.0.4+6e8a2e904469617cd59619d666c0e272985c0e33
C#
public Pipeline(
	ModelType modelType,
	string modelPath,
	InferenceBackend inferenceBackend = InferenceBackend.OpenVINO,
	DeviceType deviceType = DeviceType.CPU
)

参数

modelType  ModelType
Type of YOLO model/YOLO模型类型
modelPath  String
Path to model file/模型文件路径
inferenceBackend  InferenceBackend  (Optional)
Inference backend (default: OpenVINO)/推理后端(默认:OpenVINO)
deviceType  DeviceType  (Optional)
Device type (default: CPU)/设备类型(默认:CPU)

异常

DeploySharpException Thrown when model type is not supported 当模型类型不受支持时抛出
Exception Thrown when initialization fails 当初始化失败时抛出

参见