Mech-DLK SDK C# API 2.1.0
C# API reference documentation for secondary development with Mech-DLK
|
This class defines the inference engine. More...
Public Member Functions | |
InferEngine () | |
Initializes a new instance of the InferEngine class. | |
StatusCode | Create (string packPath, BackendType backendType=BackendType.GpuDefault, uint deviceId=0) |
Create an inference engine. | |
StatusCode | SetBatchSizeAndFloatPrecision (uint batchSize, FloatPrecisionType floatPrecision, uint moduleIdx) |
Set the batch size and floating-point precision of the inference engine. | |
StatusCode | SetUnsupSegParam (float defectThreshold, float nonDefectThreshold, uint moduleIdx) |
Set the defect threshold and non-defect threshold for the unsupervised segmentation. | |
List< DLAlgoType > | GetModuleTypes () |
Get the list of model types. | |
StatusCode | Infer (List< MMindImage > images) |
Run image inference using the model package inference engine. | |
StatusCode | GetResults (out List< Result > results) |
Get the model inference result. | |
StatusCode | ResultVisualization (List< MMindImage > images) |
Draw all the model results onto the images. | |
StatusCode | ModuleResultVisualization (List< MMindImage > images, uint moduleIndex) |
Draw the model results of the specified index onto the images. | |
void | Release () |
Release the memory of the inference engine. | |
This class defines the inference engine.
MMind.DL.InferEngine.InferEngine | ( | ) |
Initializes a new instance of the InferEngine class.
StatusCode MMind.DL.InferEngine.Create | ( | string | packPath, |
BackendType | backendType = BackendType::GpuDefault , |
||
uint | deviceId = 0 |
||
) |
Create an inference engine.
packPath | The path to the model package exported from Mech-DLK. |
backendType | See BackendType for details. |
deviceId | The index of the specified GPU during model inference. |
List< DLAlgoType > MMind.DL.InferEngine.GetModuleTypes | ( | ) |
Get the list of model types.
StatusCode MMind.DL.InferEngine.GetResults | ( | out List< Result > | results | ) |
Get the model inference result.
results | See Result for details. |
StatusCode MMind.DL.InferEngine.Infer | ( | List< MMindImage > | images | ) |
Run image inference using the model package inference engine.
images | See MMindImage for details. |
StatusCode MMind.DL.InferEngine.ModuleResultVisualization | ( | List< MMindImage > | images, |
uint | moduleIndex | ||
) |
Draw the model results of the specified index onto the images.
images | See MMindImage for details. |
moduleIndex | Specified model index in the model package. |
void MMind.DL.InferEngine.Release | ( | ) |
Release the memory of the inference engine.
StatusCode MMind.DL.InferEngine.ResultVisualization | ( | List< MMindImage > | images | ) |
Draw all the model results onto the images.
images | See MMindImage for details. |
StatusCode MMind.DL.InferEngine.SetBatchSizeAndFloatPrecision | ( | uint | batchSize, |
FloatPrecisionType | floatPrecision, | ||
uint | moduleIdx | ||
) |
Set the batch size and floating-point precision of the inference engine.
batchSize | The batch size of the model package. |
floatPrecision | See FloatPrecisionType for details. |
moduleIdx | Specified model index in the model package. |
StatusCode MMind.DL.InferEngine.SetUnsupSegParam | ( | float | defectThreshold, |
float | nonDefectThreshold, | ||
uint | moduleIdx | ||
) |
Set the defect threshold and non-defect threshold for the unsupervised segmentation.
defectThreshold | The defect threshold. |
nonDefectThreshold | The non-defect threshold. |
moduleIdx | Specified model index in the model package. |