Mech-DLK SDK C++ API 2.0.2
C++ API reference documentation for secondary development with Mech-DLK
All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Classes | Enumerations | Functions
mmind::dl Namespace Reference

Classes

struct  MMindBbox
 Defines the information on the bounding box. More...
 
struct  MMIndClassificationResult
 Defines the classification result. More...
 
struct  MMindContour
 Defines the information on the mask contour. More...
 
struct  MMIndDefectAndEdgeResult
 Defines the defect segmentation and edge detection results. More...
 
struct  MMindFastPositioningResult
 Defines the fast positioning result. More...
 
struct  MMindImage
 
class  MMindInferEngine
 Defines the infer engine. More...
 
struct  MMindKeyPoints
 Defines the information on fast positioning keypoints. More...
 
struct  MMindObjectAndInsResult
 Defines the object detection and instance segmentation result. More...
 
struct  MMindPoint
 Defines the information on contour points. More...
 
struct  MMindResult
 Defines storing inference results. More...
 

Enumerations

enum class  FloatPrecisionType { FP16 , FP32 }
 Defines the floating-point format. More...
 
enum class  InferDeviceType { GpuDefault , GpuOptimization , CPU }
 Defines the infer device type. More...
 
enum class  DeepLearningAlgoType {
  Unknown = 0 , Classification , ObjectDetection , InstanceSegmentation ,
  DefectSegmentation , FastLocating , EdgeDetection
}
 Defines the deep learning algorithm type. More...
 
enum class  StatusCode {
  SUCCESS = 0 , E_UNKNOWN , E_INIT_FAILED , E_INVALID_MODEL_PATH ,
  E_INVALID_MODEL_PACK , E_INVALID_MODEL_VERSION , I_CONVERTING , E_CONVERT_FAILED ,
  E_CONVERT_WITHOUT_INIT , E_UNSUPPORTED_BACKEND , I_LOADING , E_LOAD_FAILED ,
  E_LOAD_WITHOUT_CONVERT , E_LOAD_WITHOUT_INIT , E_INFER_WITHOUT_LOAD , E_OUT_OF_HOST_MEMORY ,
  E_OUT_OF_DEVICE_MEMORY , E_INFER_FAILED , E_INVALID_IMAGE_PATH , E_UNZIP_ERROR ,
  E_INVALID_IMAGE_NULLPTR , E_MODEL_REGISTEXCEEDLIMIT , E_MODULE_INDEX_ERROR , E_MODULE_TYPE_ERROR ,
  E_SET_GPUID_ERROR , E_INVALID_ENGINE , E_INVALID_BACKEND_TYPE
}
 Defines the status codes. More...
 

Functions

MMIND_DL_SDK_EXPORT std::string statusCodeToString (const StatusCode statusCode)
 Converts the status code to the corresponding string.
 

Enumeration Type Documentation

◆ DeepLearningAlgoType

Defines the deep learning algorithm type.

Enumerator
Unknown 
Classification 
ObjectDetection 

<Classification

InstanceSegmentation 

<ObjectDetection

DefectSegmentation 

<InstanceSegmentation

FastLocating 

<DefectSegmentation

EdgeDetection 

<FastLocating

◆ FloatPrecisionType

enum class mmind::dl::FloatPrecisionType
strong

Defines the floating-point format.

Enumerator
FP16 

Half-precision floating-point format.

FP32 

Single-precision floating-point format.

◆ InferDeviceType

enum class mmind::dl::InferDeviceType
strong

Defines the infer device type.

Enumerator
GpuDefault 

GPU default mode.

GpuOptimization 

GPU optimization mode. In this mode, it takes 1-5 minutes to optimize the model.

CPU 

CPU mode. It is used when a GPU is not available.

◆ StatusCode

enum class mmind::dl::StatusCode
strong

Defines the status codes.

Enumerator
SUCCESS 

Success status.

E_UNKNOWN 

Unknown status.

E_INIT_FAILED 

Error: engine initialization failed.

E_INVALID_MODEL_PATH 

Error: invalid model package path.

E_INVALID_MODEL_PACK 

Error: invalid model package.

E_INVALID_MODEL_VERSION 

Error: invalid model package version.

I_CONVERTING 

Status: model is being converted.

E_CONVERT_FAILED 

Error: model conversion failed.

E_CONVERT_WITHOUT_INIT 

Error: model uninitialized before conversion.

E_UNSUPPORTED_BACKEND 

Error: unsupported inference backend.

I_LOADING 

Status: model is being loaded.

E_LOAD_FAILED 

Error: model loading failed.

E_LOAD_WITHOUT_CONVERT 

Error: model unconverted before loading.

E_LOAD_WITHOUT_INIT 

Error: uninitialized before loading.

E_INFER_WITHOUT_LOAD 

Error: model unloaded before inference.

E_OUT_OF_HOST_MEMORY 

Error: out of memory.

E_OUT_OF_DEVICE_MEMORY 

Error: out of video memory.

E_INFER_FAILED 

Error: inference failed.

E_INVALID_IMAGE_PATH 

Error: invalid image path.

E_UNZIP_ERROR 

Error: unable to unzip the model package.

E_INVALID_IMAGE_NULLPTR 

Error: invalid image pointer.

E_MODEL_REGISTEXCEEDLIMIT 

Error: model loading failed as the number of models loaded has reached the upper limit.

E_MODULE_INDEX_ERROR 

Error: module index out of range.

E_MODULE_TYPE_ERROR 

Error: the function of an incorrect model type was called.

E_SET_GPUID_ERROR 

Error: incorrect GPU ID setting.

E_INVALID_ENGINE 

Error: engine creation failed.

E_INVALID_BACKEND_TYPE 

Error: invalid backend type.

Function Documentation

◆ statusCodeToString()

MMIND_DL_SDK_EXPORT std::string mmind::dl::statusCodeToString ( const StatusCode  statusCode)

Converts the status code to the corresponding string.

Parameters
[in]SeeStatusCode for details.
Returns
The character string corresponding to the status code.