Deepstream-6.3 How to call or output object bounding box

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Jetson Orin nano
• DeepStream Version Deepstream-6.3
• JetPack Version (valid for Jetson only) JetPack 5.1.2
• TensorRT Version 8.5.2-1 + cuda11.4
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

I am testing using code from deepstream C/C++ tutorial. However, I would like to get output about the detected bounding box, but it is not being output. Please tell me how I can print the bounding box value through the basic deepstream-app -c deepstream_app_config.txt command.

The method I found is that you need to save it through kitti-output-dir to know the bounding box. It is as follows: Please check if it is correct.

Deepstream-Yolo Folder


skip…/apps/sample_apps_deepstream-app Folder

write_kitti_output(AppCtx * appCtx, NvDsBatchMeta * batch_meta){
for (NvDsMetaList * l_frame = batch_meta->frame_meta_list; l_frame != NULL;
      l_frame = l_frame->next) {
    NvDsFrameMeta *frame_meta = (NvDsFrameMeta *) l_frame->data;
    guint stream_id = frame_meta->pad_index;
    g_snprintf (bbox_file, sizeof (bbox_file) - 1,
        "%s/%02u_%03u_%06lu.txt", appCtx->config.bbox_dir_path,
        appCtx->index, stream_id, (gulong) frame_meta->frame_num);
    bbox_params_dump_file = fopen (bbox_file, "w");
    if (!bbox_params_dump_file)

    for (NvDsMetaList * l_obj = frame_meta->obj_meta_list; l_obj != NULL;
        l_obj = l_obj->next) {
      NvDsObjectMeta *obj = (NvDsObjectMeta *) l_obj->data;
      float left = obj->rect_params.left;
      float top = obj->;
      float right = left + obj->rect_params.width;
      float bottom = top + obj->rect_params.height;
      // Here confidence stores detection confidence, since dump gie output
      // is before tracker plugin
      float confidence = obj->confidence;
      fprintf (bbox_params_dump_file,
          "%s 0.0 0 0.0 %f %f %f %f 0.0 0.0 0.0 0.0 0.0 0.0 0.0 %f\n",
          obj->obj_label, left, top, right, bottom, confidence);
    fclose (bbox_params_dump_file);

How can I change the code above to know the bounding box value?
Please give advice to experts.

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

What do you mean it’s not being output? Did you set option gie-kitti-output-dir in your config file?

This is the rect info around the object. You can find the bbox info in the directory you set for option gie-kitti-output-dir.

Something like this?

g_print("bbox: %.4f    %.4f    %.4f    %.4f\n", left, top, right, bottom);

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.