How to get value of detectNet.Detection object?


I’m using jetson-inference with custom data using python.

I want to try selectively selecting helipads of different sizes.
For example, when there are 3 helipads of difference sizes, if object detection is performed correctly " detected 3 objects in image" will be displayed.

I think I could run an experiment using this values(ClassID,…,Center).

But, I have some question here.

  1. How is the information coming out of it ordered?
  • I checked it, not Confidence.
  1. And if it is continuously in the same frame camera, does the order not change?
  • I want to know how to sort when there are multiple objects.
  1. Last, if the value to be printed is fixed, can I get and select the value with python?
  • I’ve checked in detectNet.cpp and detectNet.h but, I want all from ClassID to Center.
  • I want to check the script that prints this sentence.

detected 1 objects in image
<detectNet.Detection object>
– ClassID: 1
– Confidence: 0.999809
– Left: 393.828
– Top: 226.277
– Right: 603.603
– Bottom: 413.022
– Width: 209.775
– Height: 186.744
– Area: 39174.3
– Center: (498.716, 319.65)

Thank you:)

Hi @3629701, they are sorted by area:

There isn’t frame-to-frame tracking (unless you are using the dev branch this is a feature currently in development), so there are guarantees about consistent ordering of detections between frames.

You can find the member attributes of the detectNet.Detection objects here:

Detection = <type 'jetson.inference.detectNet.Detection'>
Object Detection Result
Data descriptors defined here:
    Area of bounding box
    Bottom bounding box coordinate
    Center (x,y) coordinate of bounding box
    Class index of the detected object
    Confidence value of the detected object
    Height of bounding box
    Instance index of the detected object
    Left bounding box coordinate
    Right bounding box coordinate
    Top bounding box coordinate
     Width of bounding box
1 Like

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