Jetson Nano and DS 5
I am trying to get the confidence of nvinfer but it returns -0.1 everytime. I thought its fixed with DS5.
for (l_frame = batch_meta->frame_meta_list; l_frame != NULL; l_frame = l_frame->next) {
NvDsFrameMeta *frame_meta = (NvDsFrameMeta *) (l_frame->data);
pts = frame_meta->buf_pts;
for (l_obj = frame_meta->obj_meta_list; l_obj != NULL; l_obj = l_obj->next) {
obj_meta = (NvDsObjectMeta *) (l_obj->data);
gint unique_component_id = obj_meta->unique_component_id;
int classId = obj_meta->class_id;
guint64 objectId = obj_meta->object_id;
gfloat confidence = obj_meta->confidence; // always returns -1
float left = obj_meta->rect_params.left;
float top = obj_meta->rect_params.top;
float right = left + obj_meta->rect_params.width;
float bottom = top + obj_meta->rect_params.height;
int width = obj_meta->rect_params.width;
int height = obj_meta->rect_params.height;
cout << "left: " << left << " top: " << top << " right: " << right << " bottom: " << bottom << " width: " << width << " height " << height <<
" unique_component_id " << unique_component_id << " classId: " << classId << " objectId: "<< objectId << " confidence: " << confidence << std::endl;
}
}
Looked at nvinfer is not populating 'confidence' field in NvDsObjectMeta (DS 4.0) - #19 by AastaLLL. But that seems to be addressed to DS 4. Should I apply the patch for DS 5 also.
Can you please advice on how it works os DS 5.
Below is the output I get
left: 191 top: 105.652 right: 272 bottom: 406.957 width: 81 height 301 unique_component_id 1 classId: 2 objectId: 18446744073709551615 confidence: -0.1.
confidence is always -0.1.