How to know detect object belong which camera/src where nvdsinfer plugin NvDsInferParseCustomYoloV3()

Please provide complete information as applicable to your setup.

**• Hardware Platform (Jetson)
• DeepStream Version 6.0
**• JetPack Version (valid for Jetson only)4.6.1
• 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)

hello,
My pipeline like this, appsrc1/2/3->nvstream->nvdsinfer->nvosd->fakesink. Excute parse model output layer in NvDsInferParseCustomYoloV3, I do some process with different params(because different source), but I do not know current outputLayersInfo result is which appsrc. How I get it or other suggestion?

Blockquote
extern “C” bool NvDsInferParseCustomYoloV3(
std::vector const& outputLayersInfo,
NvDsInferNetworkInfo const& networkInfo,
NvDsInferParseDetectionParams const& detectionParams,
std::vector& objectList)
{
static const std::vector kANCHORS = {
10.0, 13.0, 16.0, 30.0, 33.0, 23.0, 30.0, 61.0, 62.0,
45.0, 59.0, 119.0, 116.0, 90.0, 156.0, 198.0, 373.0, 326.0};
static const std::vector<std::vector> kMASKS = {
{6, 7, 8},
{3, 4, 5},
{0, 1, 2}};
return NvDsInferParseYoloV3 (
outputLayersInfo, networkInfo, detectionParams, objectList,
kANCHORS, kMASKS);
}

Are you using your own demo or the demo we provided?

My own demo,is there nvidia demo? deepstream-appsrc already studied。

---- Replied Message ----

From | Yuweiw via NVIDIA Developer Forumsnotifications@nvidia.discoursemail.com |

  • | - |
    Date | 04/12/2024 17:51 |
    To | tanchao7217tanchao7217@163.com |
    Subject | [NVIDIA Developer Forums] [Intelligent Video Analytics/DeepStream SDK] How to know detect object belong which camera/src where nvdsinfer plugin NvDsInferParseCustomYoloV3() |

| yuweiw Moderator
April 12 |

  • | - |

Are you using your own demo or the demo we provided?

Deepstream YOLO v5 outputs the detection results of the corresponding camera I find this link is similar to my need. Cunrrent I can parse layer output for one appsrc and get final result in nvosd src pad probe. At nvosd pad probe function, I get detect object and which belong appsrc, but if I want to know object when parse model output is which apprsc because do some process and filter with different source params, is there way?

You can refer to our deepstream_tao_apps. It’s just that this demo doesn’t use appsrc, but the process is similar.

You can not get that from the src pad of nvdsosd because it cannot support batched stream. You can add that at the src pad of pgie.

Thank you for reply, I read this repo deepstream_det_app.c and nvdsinfer_custombboxparser_tao.cpp, multistream pipeline work well for me, you refer demo is same with my application, at file nvdsinfer_custombboxparser_tao.cpp, parse model output is also same. My need is in parse function like NvDsInferParseCustomBatchedYoloV5NMSTLT(), it success parse layer, but I still can not get current frame belong which stream or source.
For nvdsosd plugin, I can get source id such as:
GstPad *osdSinkPad = gst_element_get_static_pad(nvdsosd_, "sink"); gst_pad_add_probe(osdSinkPad, GST_PAD_PROBE_TYPE_BUFFER, osdSinkPadBufferProbe, this, NULL);


  for (frameMetaList = batchMeta->frame_meta_list; frameMetaList != NULL; frameMetaList = frameMetaList->next)
    {

        NvDsFrameMeta *frameMeta = (NvDsFrameMeta *)(frameMetaList->data);
        uint16_t srcId = frameMeta->source_id;// get source id
      //do logic process for ervery source with different params
}

I can get source id at nvdsosd sink probe, if I want to get source id in NvDsInferParseCustomBatchedYoloV5NMSTLT function,how do I it?

There is no source information in this API. Could you describe your needs in detail? Let’s see if there’s another way to do it.

Function NvDsInferParseCustomResnet()at file /opt/nvidia/deepstream/deepstream-6.3/sources/libs/nvdsinfer_customparser/nvdsinfer_custombboxparser.cpp, it will be called to parse layer ouput. My need is how to get current frame result source id when multistreams input in NvDsInferParseCustomResnet();

OK. There is no source information in this part because the batch is split here. If you want to add related features, you can only add them in the gstnvinfer.cpp source code.

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