TI Deep Learning Product User Guide
|
This structure contains the header information of Objection detection layer.
Application writer(user) should use this structure as below for visualization or any other action +----------—+------------------------—+-----------------------—+ | Header | payload0 (variable size) | payload1 (variable size) | ..... +----------—+------------------------—+-----------------------—+ TIDL_ODLayerHeaderInfo headerPtr = (TIDL_ODLayerHeaderInfo) outputPtr; if(TIDL_GetObjDetectionFormat(headerPtr->odObjectType, TIDL_Detect2DBox)) { TIDL_ODLayerObjInfo detect2DBoxPtr = (TIDL_ODLayerObjInfo) ((uint8_t*)headerPtr + headerPtr->objInfoOffset) ; TIDL_ODLayerObjInfo keyPointPtr = NULL; TIDL_ODLayerObjectPose *objPosePtr = NULL; for(objId = 0 ; objId < headerPtr->numDetObjects ; objId++) { consume 2D box with detect2DBoxPtr keyPointPtr = (TIDL_ODLayerKeyPoint) detect2DBoxPtr->keyPoints ; if(TIDL_GetObjDetectionFormat(odObjectType, TIDL_DetectKeyPoints){ for(keyPoint = 0; keyPoint < headerPtr->odNumKeyPoints; keyPoint++){ consume keyPoints using keyPointPtr keyPointPtr++; } } if(TIDL_GetObjDetectionFormat(odObjectType, TIDL_DetectObjectPose){ objPosePtr = (TIDL_ODLayerObjectPose*) (keyPointPtr + headerPtr->odNumKeyPoints); consume keyPoints using objPosePtr } detect2DBoxPtr = (TIDL_ODLayerObjInfo*)((uint8_t*)detect2DBoxPtr + objInfoSize); } else if(TIDL_GetObjDetectionFormat(headerPtr->odObjectType, TIDL_Detect3DBox)){ Same as 2D except the payload style is as below: TIDL_3DODLayerObjInfo detect3DBoxPtr = (TIDL_3DODLayerObjInfo) ((uint8_t*)(headerPtr) + headerPtr->objInfoOffset); }
Data Fields | |
float32_tidl | numDetObjects |
float32_tidl | objInfoSize |
float32_tidl | odNumKeyPoints |
float32_tidl | objInfoOffset |
int32_t | odObjectType |
float32_tidl TIDL_ODLayerHeaderInfo::numDetObjects |
Total Number of objects detected in the current process
float32_tidl TIDL_ODLayerHeaderInfo::objInfoSize |
Size of objInfo in bytes
float32_tidl TIDL_ODLayerHeaderInfo::odNumKeyPoints |
Number of key points per Obj
float32_tidl TIDL_ODLayerHeaderInfo::objInfoOffset |
Start Offset of first Object info in bytes
int32_t TIDL_ODLayerHeaderInfo::odObjectType |
Indicates type of the object, refer eTIDL_DetectionOutputFormat for all possible combinations