Obj_meta.tracker_bbox_info.org_bbox_coords does not match actual coordinates in image

I’m trying to analyze the movement when an object is inside a ROI in the frame. Im getting the bounding box coordinates with the code below:

obj_meta = pyds.NvDsObjectMeta.cast(l_obj.data)
bbox = (obj_meta.tracker_bbox_info.org_bbox_coords.left,
              obj_meta.tracker_bbox_info.org_bbox_coords.top,
              obj_meta.tracker_bbox_info.org_bbox_coords.width, 
              obj_meta.tracker_bbox_info.org_bbox_coords.height)

However the coordinates I got from obj_meta.tracker_bbox_info.org_bbox_coords does not correspond to the actual pixels of the image.

I got the ROI coordinates from the image using GIMP. The bounding box is about (left=667, top= 284, width=347, height=220).

The bounding box I got from obj_meta is (left=1007, top= 424, width=525, height=332), why?

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• 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)

• Hardware Platform (Jetson / GPU)
Jetson

• DeepStream Version
6.0

• JetPack Version (valid for Jetson only)
4.6

• TensorRT Version
8.0.1.6-1+cuda10.2

• Issue Type( questions, new requirements, bugs)
Questions

• 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)

Pipeline has the following elements:

  pipeline.add(pgie)
  pipeline.add(tracker)
  pipeline.add(sgie1)
  pipeline.add(tiler)
  pipeline.add(nvvidconv)
  pipeline.add(nvosd)
  pipeline.add(nvvidconv_postosd)
  pipeline.add(caps)
  pipeline.add(encoder)
  pipeline.add(rtppay)
  pipeline.add(sink)

Configfiles:
pgie_config.txt (709 Bytes)
sgie_config.txt (999 Bytes)
tracker_config.txt (466 Bytes)

Probe is connected in nvvidcon sink pad

Can you display the video on the screen and check if the BBox is abnormal?

The BBox is not abnormal (looks fine in the output stream). I realized that the coordenates I get from obj_meta.tracker_bbox_info.org_bbox_coords is upscaled of the original frame resolution.

(2/3) * (left=1007, top= 424, width=525, height=332) = (left=667, top= 284, width=347, height=220)

I couldn’t find where the frame resolution changes.

nvstreammux and nvmultistreamtiler can change video resolutions.

How can I now the frames resolution after nvstreammux? Is it configurable?

Found it. I configured the resolution in nvstreammux to match the input resolution:

nvstreammux.set_property('width', 1280)
nvstreammux.set_property('height', 720)

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