DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

MapNet Interface

Detailed Description

Defines MapNet module, i.e., MapNet configuration and loading.

Note
SW Release Applicability: These APIs are available in NVIDIA DRIVE Software releases.

Data Structures

struct  dwMapNetParams
 

Typedefs

typedef struct dwMapNetObject * dwMapNetHandle_t
 Handle to a MapNet object. More...
 

Enumerations

enum  dwMapNetModel {
  DW_MAPNET_MODEL_FRONT_MULTI_CLASS = 0,
  DW_MAPNET_MODEL_FRONT_SINGLE_CLASS = 1,
  DW_MAPNET_MODEL_FRONT_REGRESSOR = 2,
  DW_MAPNET_MODEL_FRONT_E2E = 3,
  DW_MAPNET_NUM_MODELS,
  DW_MAPNET_MODEL_CUSTOM = -1
}
 MapNet network models to be loaded by MapNet module. More...
 
enum  dwMapNetType {
  DW_MAPNET_TYPE_SEGMENTATION,
  DW_MAPNET_TYPE_REGRESSOR,
  DW_MAPNET_TYPE_E2E,
  DW_MAPNET_TYPE_COUNT
}
 MapNet type. More...
 

Functions

DW_API_PUBLIC dwStatus dwMapNet_getClassLabel (const char **classLabel, uint32_t classIdx, dwMapNetHandle_t obj)
 Returns the class label for a given class index. More...
 
DW_API_PUBLIC dwStatus dwMapNet_getDNNMetaData (dwDNNMetaData *metaData, dwMapNetHandle_t obj)
 Returns the DNN metadata. More...
 
DW_API_PUBLIC dwStatus dwMapNet_getInputBlobsize (dwBlobSize *inputBlobsize, dwMapNetHandle_t obj)
 Returns input blob size that MapNet expects. More...
 
DW_API_PUBLIC dwStatus dwMapNet_initDefaultParams (dwMapNetParams *params, dwMapNetType mapnetType, dwContextHandle_t ctx)
 Initializes MapNet parameters with default values. More...
 
DW_API_PUBLIC dwStatus dwMapNet_initialize (dwMapNetHandle_t *mapNetHandle, const dwMapNetParams *mapNetParams, dwContextHandle_t ctx)
 Initializes MapNet module. More...
 
DW_API_PUBLIC dwStatus dwMapNet_release (dwMapNetHandle_t obj)
 Releases the MapNet module. More...
 
DW_API_PUBLIC dwStatus dwMapNet_reset (dwMapNetHandle_t obj)
 Resets MapNet. More...
 

Data Structure Documentation

◆ dwMapNetParams

struct dwMapNetParams
Data Fields
dwMapNetType mapNetType MapNet category type(segmentation, regressor)
const void * networkCustomData Custom network data. Must be set if custom model is selected and available.
dwMapNetModel networkModel MapNet network model. Default is DW_MAPNET_MODEL_FRONT_MULTI_CLASS.
dwPrecision networkPrecision MapNet network precision. Default is DW_PRECISION_FP32.
dwProcessorType processorType Processor type. Supported processors: GPU, DLA (only on DDPX)

Typedef Documentation

◆ dwMapNetHandle_t

typedef struct dwMapNetObject* dwMapNetHandle_t

Handle to a MapNet object.

Definition at line 62 of file MapNet.h.

Enumeration Type Documentation

◆ dwMapNetModel

MapNet network models to be loaded by MapNet module.

Enumerator
DW_MAPNET_MODEL_FRONT_MULTI_CLASS 

MapNet model that performs multi-class lane detection on front camera.

Note
Only valid for DW_MAPNET_TYPE_SEGMENTATION
DW_MAPNET_MODEL_FRONT_SINGLE_CLASS 

MapNet model that performs single-class lane detection on front camera.

Note
Only valid for DW_MAPNET_TYPE_SEGMENTATION and DW_PROCESSOR_TYPE_DLA
DW_MAPNET_MODEL_FRONT_REGRESSOR 

MapNet model that performs detection by regression.

Note
Only valid for DW_MAPNET_TYPE_REGRESSOR
DW_MAPNET_MODEL_FRONT_E2E 

MapNet model that performs detection by end to end based approach.

Note
Only valid for DW_MAPNET_TYPE_E2E
DW_MAPNET_NUM_MODELS 
DW_MAPNET_MODEL_CUSTOM 

Loads custom MapNet model if available.

Network name must be provided in networkCustomData field in dwMapNetParams

Definition at line 65 of file MapNet.h.

◆ dwMapNetType

MapNet type.

Enumerator
DW_MAPNET_TYPE_SEGMENTATION 

Segmentation based detection model.

DW_MAPNET_TYPE_REGRESSOR 

Regression based detection model.

DW_MAPNET_TYPE_E2E 

End to end based detection model.

DW_MAPNET_TYPE_COUNT 

Definition at line 85 of file MapNet.h.

Function Documentation

◆ dwMapNet_getClassLabel()

DW_API_PUBLIC dwStatus dwMapNet_getClassLabel ( const char **  classLabel,
uint32_t  classIdx,
dwMapNetHandle_t  obj 
)

Returns the class label for a given class index.

Parameters
[out]classLabelPointer to class label.
[in]classIdxClass index, i.e. number in [0, numObjectClasses)
[in]objThe handle to MapNet.
Returns
DW_SUCCESS
DW_INVALID_HANDLE -If the given handle is invalid,i.e. null or of wrong type
DW_BAD_CAST
DW_INVALID_ARGUMENT

◆ dwMapNet_getDNNMetaData()

DW_API_PUBLIC dwStatus dwMapNet_getDNNMetaData ( dwDNNMetaData metaData,
dwMapNetHandle_t  obj 
)

Returns the DNN metadata.

Parameters
[out]metaDataPointer to metaData struct.
[in]objThe handle to MapNet.
Returns
DW_SUCCESS
DW_INVALID_HANDLE -If the given handle is invalid,i.e. null or of wrong type
DW_BAD_CAST
DW_INVALID_ARGUMENT

◆ dwMapNet_getInputBlobsize()

DW_API_PUBLIC dwStatus dwMapNet_getInputBlobsize ( dwBlobSize inputBlobsize,
dwMapNetHandle_t  obj 
)

Returns input blob size that MapNet expects.

Parameters
[out]inputBlobsizeInput blob size.
[in]objSpecifies the MapNet handle.
Returns
DW_SUCCESS
DW_INVALID_HANDLE -If the given handle is invalid,i.e. null or of wrong type
DW_BAD_CAST
DW_INVALID_ARGUMENT

◆ dwMapNet_initDefaultParams()

DW_API_PUBLIC dwStatus dwMapNet_initDefaultParams ( dwMapNetParams params,
dwMapNetType  mapnetType,
dwContextHandle_t  ctx 
)

Initializes MapNet parameters with default values.

Parameters
[out]paramsMapNet default parameters.
[in]mapnetTypeinput mapnet type to initialize the default for
[in]ctxThe handle to the context.
Returns
DW_SUCCESS, DW_INVALID_ARGUMENT

◆ dwMapNet_initialize()

DW_API_PUBLIC dwStatus dwMapNet_initialize ( dwMapNetHandle_t mapNetHandle,
const dwMapNetParams mapNetParams,
dwContextHandle_t  ctx 
)

Initializes MapNet module.

Parameters
[out]mapNetHandleA pointer to MapNet handle to be initialized.
[in]mapNetParamsMapNet parameters
[in]ctxThe handle to the context.
Returns
DW_SUCCESS
DW_INVALID_HANDLE -If the given handle is invalid,i.e. null or of wrong type
DW_BAD_CAST
DW_INVALID_ARGUMENT

◆ dwMapNet_release()

DW_API_PUBLIC dwStatus dwMapNet_release ( dwMapNetHandle_t  obj)

Releases the MapNet module.

Parameters
[in]objThe handle to MapNet.
Returns
DW_SUCCESS
DW_INVALID_HANDLE -If the given handle is invalid,i.e. null or of wrong type
DW_BAD_CAST
Note
This method renders the handle unusable.

◆ dwMapNet_reset()

DW_API_PUBLIC dwStatus dwMapNet_reset ( dwMapNetHandle_t  obj)

Resets MapNet.

Parameters
[in]objHandle to MapNet.
Returns
DW_SUCCESS
DW_INVALID_HANDLE -If the given handle is invalid,i.e. null or of wrong type
DW_BAD_CAST