Assign value in GstNvInferObjectInfo

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Jetson
• DeepStream Version 6.2
• JetPack Version (valid for Jetson only) 5.0.1
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs) question
• 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)

Hello, when using detector in the deepstream pipeline, we assign the parsed data into NvDsInferParseObjectInfo.
When we look into attach_metadata_classifier, in gstnvinfer_meta_utils.cpp, the parsed data is assigned into object_meta using GstNvInferObjectInfo.

In which part does the NvDsInferParseObjectInfo turns into GstNvInferObjectInfo?
I added some new field and wanna assign it to the misc_obj_info field in the _NvDsObjectMeta.

Thanks :)

GstNvInferObjectInfo comes from the NvDsInferClassificationOutput.

sources\gst-plugins\gst-nvinfer\gstnvinfer.cpp
        NvDsInferClassificationOutput &classification_output = frame_output.classificationOutput;
        GstNvInferObjectInfo new_info;
        new_info.attributes.assign(classification_output.attributes,
            classification_output.attributes + classification_output.numAttributes);
        new_info.label.assign(classification_output.label);
        for (guint i = 0; i < classification_output.numAttributes; i++) {
          classification_output.attributes[i].attributeLabel = nullptr;
        }

I mean in detection.
in the gstnvinfer.cpp, seems like NvDsInferDetectionOutput contains NvDsInferObject.
Where is NvDsInferDetectionOutput created and set data from NvDsInferParseObjectInfo?

It gets it from the following struct NvDsInferFrameOutput in the sources\includes\nvdsinfer_context.h file.
sources\gst-plugins\gst-nvinfer\gstnvinfer.cpp

        attach_metadata_detector (nvinfer, GST_MINI_OBJECT (tensor_out_object.get()),
                frame, frame_output.detectionOutput, init_params->segmentationThreshold);

And the batch_output is from the OutputBatch queue.

    batch_output = &tensor_out_object->batch_output;
    /* Dequeue inferencing output from NvDsInferContext */
    status = nvdsinfer_ctx->dequeueOutputBatch (*batch_output);

Since it’s open source, you can add some log yourself to check the process.

1 Like

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