Modifying the struct NvDsInferObjectDetectionInfo in nvdsinfer.h

Hi All,
I am looking to modify this structure to add in a a new variable would it be possible and what would be the best way to go about it.

typedef struct
{
  /** ID of the class to which the object belongs. */
  unsigned int classId;

  /** Horizontal offset of the bounding box shape for the object. */
  unsigned int left;
  /** Vertical offset of the bounding box shape for the object. */
  unsigned int top;
  /** Width of the bounding box shape for the object. */
  unsigned int width;
  /** Height of the bounding box shape for the object. */
  unsigned int height;
  /** Object detection confidence. Should be a float value in the range [0,1] */
  float detectionConfidence;
} NvDsInferObjectDetectionInfo;

The documentation and examples include ways to attach custom metadata.

https://github.com/mdegans/deepstream-4.0/tree/master/apps/sample_apps/deepstream-user-metadata-test

Thanks for the reply.
In my case i am using the mask rcnn custom app provided by IOT to generate the segment metadata though i am able to dump the segments but i am unable to access it in the deepstream app where we write metadata in text files.

You can add additional fields to the mentioned structure - needs to compile nvdsinfer library and gstnvinfer plugin again

1 Like

Thanks it helped solving the issue.