Mech-DLK SDK C API 2.0.2
C API reference documentation for secondary development with Mech-DLK
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Pages
Data Structures | Typedefs | Enumerations
dl_definition.h File Reference

Go to the source code of this file.

Data Structures

struct  MMindImage
 This struct defines Image. More...
 
struct  Engine
 This struct defines Engine. More...
 

Typedefs

typedef enum StatusCode StatusCode
 This enumeration defines the codes of status.
 
typedef enum BackendType BackendType
 This enumeration defines the backend type.
 
typedef enum FloatPrecisionType FloatPrecisionType
 This enumeration defines the floating-point format.
 
typedef enum DLAlgoType DLAlgoType
 
typedef struct MMindImage MMindImage
 This struct defines Image.
 
typedef struct Engine Engine
 This struct defines Engine.
 

Enumerations

enum  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
}
 This enumeration defines the codes of status. More...
 
enum  BackendType { GpuDefault , GpuOptimization , CPU }
 This enumeration defines the backend type. More...
 
enum  FloatPrecisionType { FP16 , FP32 }
 This enumeration defines the floating-point format. More...
 
enum  DLAlgoType {
  Unknown = 0 , Classification , ObjectDetection , InstanceSegmentation ,
  DefectSegmentation , FastLocating , EdgeDetection
}
 

Typedef Documentation

◆ BackendType

typedef enum BackendType BackendType

This enumeration defines the backend type.

◆ DLAlgoType

typedef enum DLAlgoType DLAlgoType

◆ Engine

typedef struct Engine Engine

This struct defines Engine.

◆ FloatPrecisionType

This enumeration defines the floating-point format.

◆ MMindImage

typedef struct MMindImage MMindImage

This struct defines Image.

◆ StatusCode

typedef enum StatusCode StatusCode

This enumeration defines the codes of status.

Enumeration Type Documentation

◆ BackendType

This enumeration defines the backend 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. Used when a GPU is not available.

◆ DLAlgoType

enum DLAlgoType
Enumerator
Unknown 
Classification 
ObjectDetection 

<Classification

ObjectDetection

InstanceSegmentation 
DefectSegmentation 
FastLocating 
EdgeDetection 

◆ FloatPrecisionType

This enumeration defines the floating-point format.

Enumerator
FP16 

Half-precision floating-point format.

FP32 

Single-precision floating-point format.

◆ StatusCode

enum StatusCode

This enumeration defines the codes of status.

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.