DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

ParkNetDetector Interface

Detailed Description

Defines ParkNetDetector module.

Defines parking space detector module based on ParkNet.

Data Structures

struct  dwParkDetection
 
struct  dwParkNetDetectorParams
 
struct  dwParkObject
 

Macros

#define DW_PARK_DETECTION_MAX_COUNT   5000
 
#define DW_PARK_DETECTION_N_COORDINATES_2D   8
 
#define DW_PARK_DETECTION_N_COORDINATES_3D   12
 

Typedefs

typedef struct dwParkNetDetectorObject * dwParkNetDetectorHandle_t
 Handle to a ParkNet-based detector object. More...
 

Enumerations

enum  dwParkNetDetectorStage {
  DW_PARKNET_DETECTOR_STAGE_GPU_ASYNC_INFERENCE = 0,
  DW_PARKNET_DETECTOR_STAGE_CPU_POSTPROCESSING = 1,
  DW_PARKNET_DETECTOR_STAGE_COUNT = 2
}
 Defines the processing stages of a parking space detector. More...
 

Functions

DW_API_PUBLIC dwStatus dwParkNetDetector_bindInput (const dwImageCUDA *frame, dwParkNetDetectorHandle_t obj)
 Binds the input image to the detector. More...
 
DW_API_PUBLIC dwStatus dwParkNetDetector_bindOutput (dwParkDetection *parkingSpaces, dwParkNetDetectorHandle_t obj)
 Bind object array that holds parking space boundaries. More...
 
DW_API_PUBLIC dwStatus dwParkNetDetector_getCUDAStream (cudaStream_t *stream, dwParkNetDetectorHandle_t obj)
 Gets the CUDA stream used. More...
 
DW_API_PUBLIC dwStatus dwParkNetDetector_getParkDetections (dwParkDetection *parkingSpaces, dwParkNetDetectorHandle_t obj)
 Return the interpreted output. More...
 
DW_API_PUBLIC dwStatus dwParkNetDetector_inferDeviceAsync (dwParkNetDetectorHandle_t obj)
 Runs inference using the provided DNN model. More...
 
DW_API_PUBLIC dwStatus dwParkNetDetector_initDefaultParams (dwParkNetDetectorParams *detectorParams)
 Initializes ParkNetDetector parameters structure with default values. More...
 
DW_API_PUBLIC dwStatus dwParkNetDetector_initializeFromParkNet (dwParkNetDetectorHandle_t *obj, const dwParkNetDetectorParams *detectorParams, dwParkNetHandle_t parknet, dwContextHandle_t ctx)
 Initializes ParkNetDetector module with a ParkNet module. More...
 
DW_API_PUBLIC dwStatus dwParkNetDetector_interpret (dwParkNetDetectorHandle_t obj)
 Output of the inference (dwObjectDetector_inferDeviceAsync) is interpreted to get the list of object proposals. More...
 
DW_API_PUBLIC dwStatus dwParkNetDetector_process (dwParkNetDetectorStage stage, dwParkNetDetectorHandle_t obj)
 Process the bound input frame array and store the result to where pointed by bound output array. More...
 
DW_API_PUBLIC dwStatus dwParkNetDetector_release (dwParkNetDetectorHandle_t obj)
 Releases the ParkNetDetector module. More...
 
DW_API_PUBLIC dwStatus dwParkNetDetector_reset (dwParkNetDetectorHandle_t obj)
 Resets ParkNetDetector. More...
 
DW_API_PUBLIC dwStatus dwParkNetDetector_setCameraExtrinsics (dwTransformation3f cam2rig, dwParkNetDetectorHandle_t obj)
 Set the transformation from camera to rig. More...
 
DW_API_PUBLIC dwStatus dwParkNetDetector_setCUDAStream (const cudaStream_t stream, dwParkNetDetectorHandle_t obj)
 Sets the CUDA stream used. More...
 

Data Structure Documentation

◆ dwParkDetection

struct dwParkDetection
Data Fields
uint32_t imageHeight
uint32_t imageWidth
uint32_t numDetection
dwParkObject parkSpace[DW_PARK_DETECTION_MAX_COUNT]
dwTime_t timestamp

◆ dwParkNetDetectorParams

struct dwParkNetDetectorParams
Data Fields
dwCameraModelHandle_t cam Calibrated camera handle.
dwTransformation3f cam2Rig Camera to rig transformation matrix.
uint32_t imageHeight
uint32_t imageWidth
uint32_t maxNumImages Maximum number of images (cannot be larger than DW_DETECTOR_MAX_IMAGES). Default is 1.
dwRect ROI to have the right size for DNN. Default ROI is the whole image.
float32_t scaleOriginalToInput Image size ratio.

◆ dwParkObject

struct dwParkObject
Data Fields
float32_t box2D[DW_PARK_DETECTION_N_COORDINATES_2D]
float32_t box3D[DW_PARK_DETECTION_N_COORDINATES_3D]
float32_t boxConfidence
uint32_t entryLine

Macro Definition Documentation

◆ DW_PARK_DETECTION_MAX_COUNT

#define DW_PARK_DETECTION_MAX_COUNT   5000

Definition at line 60 of file ParkNetDetector.h.

◆ DW_PARK_DETECTION_N_COORDINATES_2D

#define DW_PARK_DETECTION_N_COORDINATES_2D   8

Definition at line 61 of file ParkNetDetector.h.

◆ DW_PARK_DETECTION_N_COORDINATES_3D

#define DW_PARK_DETECTION_N_COORDINATES_3D   12

Definition at line 62 of file ParkNetDetector.h.

Typedef Documentation

◆ dwParkNetDetectorHandle_t

typedef struct dwParkNetDetectorObject* dwParkNetDetectorHandle_t

Handle to a ParkNet-based detector object.

Definition at line 67 of file ParkNetDetector.h.

Enumeration Type Documentation

◆ dwParkNetDetectorStage

Defines the processing stages of a parking space detector.

Enumerator
DW_PARKNET_DETECTOR_STAGE_GPU_ASYNC_INFERENCE 
DW_PARKNET_DETECTOR_STAGE_CPU_POSTPROCESSING 
DW_PARKNET_DETECTOR_STAGE_COUNT 

Definition at line 55 of file ParkNetDetector_processPipeline.h.

Function Documentation

◆ dwParkNetDetector_bindInput()

DW_API_PUBLIC dwStatus dwParkNetDetector_bindInput ( const dwImageCUDA frame,
dwParkNetDetectorHandle_t  obj 
)

Binds the input image to the detector.

Parameters
[in]framePointer to a cuda-frame where the detector is to be applied.
[in]objSpecifies the ParkNetDetector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwParkNetDetector_bindOutput()

DW_API_PUBLIC dwStatus dwParkNetDetector_bindOutput ( dwParkDetection parkingSpaces,
dwParkNetDetectorHandle_t  obj 
)

Bind object array that holds parking space boundaries.

Parameters
[in]parkingSpacespointer to the parking space results object.
[in]objSpecifies the ParkNetDetector handle.
Returns
DW_SUCCESS operation completed successful DW_INVALID_ARGUMENT null handle passed as argument

◆ dwParkNetDetector_getCUDAStream()

DW_API_PUBLIC dwStatus dwParkNetDetector_getCUDAStream ( cudaStream_t *  stream,
dwParkNetDetectorHandle_t  obj 
)

Gets the CUDA stream used.

Parameters
[out]streamThe CUDA stream used.
[in]objA pointer to the ParkNetDetector handle.
Returns
DW_INVALID_ARGUMENT, DW_SUCCESS

◆ dwParkNetDetector_getParkDetections()

DW_API_PUBLIC dwStatus dwParkNetDetector_getParkDetections ( dwParkDetection parkingSpaces,
dwParkNetDetectorHandle_t  obj 
)

Return the interpreted output.

Parameters
[in]parkingSpacesPointer to a structure to populate with information about available parking spaces.
[in]objSpecifies the ParkNet-detector handle.
Returns
DW_SUCCESS operation completed successful DW_INVALID_ARGUMENT null handle passed as argument

◆ dwParkNetDetector_inferDeviceAsync()

DW_API_PUBLIC dwStatus dwParkNetDetector_inferDeviceAsync ( dwParkNetDetectorHandle_t  obj)

Runs inference using the provided DNN model.

The inference pipeline is as follows:

  1. DataPreparation: Input images are prepared by scaling, padding and other transformations set in dataConditionerParams at initialization time in order to have the right properties required by the DNN. If the given DNN model expects batched input, the given images are divided into batches, where each batch has the expected batch size.
  2. Inference: Inference is run on the prepared image.
Parameters
[in]objSpecifies the ParkNetDetector handle which already has an input image bound to it.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwParkNetDetector_initDefaultParams()

DW_API_PUBLIC dwStatus dwParkNetDetector_initDefaultParams ( dwParkNetDetectorParams detectorParams)

Initializes ParkNetDetector parameters structure with default values.

Parameters
[out]detectorParamsParkNetDetector parameters.
Returns
DW_SUCCESS, DW_INVALID_ARGUMENT

◆ dwParkNetDetector_initializeFromParkNet()

DW_API_PUBLIC dwStatus dwParkNetDetector_initializeFromParkNet ( dwParkNetDetectorHandle_t obj,
const dwParkNetDetectorParams detectorParams,
dwParkNetHandle_t  parknet,
dwContextHandle_t  ctx 
)

Initializes ParkNetDetector module with a ParkNet module.

Parameters
[out]objA pointer to ParkNetDetector handle that is initialized from parameters.
[in]detectorParamsA pointer to ParkNetDetector parameters.
[in]parknetSpecifies the handle to the ParkNet module.
[in]ctxSpecifies the handle to the context.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwParkNetDetector_interpret()

DW_API_PUBLIC dwStatus dwParkNetDetector_interpret ( dwParkNetDetectorHandle_t  obj)

Output of the inference (dwObjectDetector_inferDeviceAsync) is interpreted to get the list of object proposals.

If fusing is activated, proposals coming from different images is filled into a single list.

Parameters
[in]objSpecifies the ObjectDetector handle.
Returns
DW_SUCCESS operation completed successful DW_INVALID_ARGUMENT null handle passed as argument

◆ dwParkNetDetector_process()

DW_API_PUBLIC dwStatus dwParkNetDetector_process ( dwParkNetDetectorStage  stage,
dwParkNetDetectorHandle_t  obj 
)

Process the bound input frame array and store the result to where pointed by bound output array.

Parameters
[in]stagethe processing stage to be executed.
[in]objA Parknet detector handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST

◆ dwParkNetDetector_release()

DW_API_PUBLIC dwStatus dwParkNetDetector_release ( dwParkNetDetectorHandle_t  obj)

Releases the ParkNetDetector module.

Parameters
[in]objThe object handle to release.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
Note
This method renders the handle unusable.

◆ dwParkNetDetector_reset()

DW_API_PUBLIC dwStatus dwParkNetDetector_reset ( dwParkNetDetectorHandle_t  obj)

Resets ParkNetDetector.

Parameters
[in]objHandle to reset.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST

◆ dwParkNetDetector_setCameraExtrinsics()

DW_API_PUBLIC dwStatus dwParkNetDetector_setCameraExtrinsics ( dwTransformation3f  cam2rig,
dwParkNetDetectorHandle_t  obj 
)

Set the transformation from camera to rig.

Parameters
[in]cam2rigSpecifies the transformation from camera to rig.
[in]objA parknet detector handle.
Returns
DW_INVALID_HANDLE, DW_BAD_CAST, DW_SUCCESS

◆ dwParkNetDetector_setCUDAStream()

DW_API_PUBLIC dwStatus dwParkNetDetector_setCUDAStream ( const cudaStream_t  stream,
dwParkNetDetectorHandle_t  obj 
)

Sets the CUDA stream used.

Parameters
[in]streamThe CUDA stream used.
[in]objA pointer to the ParkNetDetector handle that is updated.
Returns
DW_INVALID_ARGUMENT, DW_SUCCESS