Source number always get value 0 on multistream test app

I want to get multistream source number from ( frame_meta.pad_index ) , but always get value 0 if I use more than one source. I am trying to get it in the nvvidconv sink prob.

  • The example depends on deepstream-imagedata-multistream test python
    vidconvsinkpad = nvvidconv.get_static_pad("sink")
	if not vidconvsinkpad:
		sys.stderr.write(" Unable to get sink pad of nvvidconv \n")
vidconvsinkpad.add_probe(Gst.PadProbeType.BUFFER, sgie_sink_pad_buffer_probe, 0)

Linking elements in the Pipeline

    streammux.link(face_detector) 
	face_detector.link(nvvidconv1)
	# tracker.link(nvvidconv1)
	nvvidconv1.link(filter1)
	filter1.link(tiler)
	tiler.link(face_recogniser)
	face_recogniser.link(nvvidconv)
	nvvidconv.link(nvosd)

• Hardware Platform: NX
• DeepStream Version: 5.0.1
• JetPack Version: 4.5

Nvmultistreamtiler will combine multiple streams into one stream. Gst-nvmultistreamtiler — DeepStream 5.1 Release documentation

You insert sgie_sink_pad_buffer_probe after nvmultistreamtiler, there is only one stream, so the source id is always 0. It is correct.

Thanks.

I have another question
when I enable tracker after face_detector, the predict name will not display on the screen. Why?

What do you mean by “predict name”?

The classification it not use by default. I enable post-processing and the custom class name (predict_name) I display it on the screen

obj_meta.text_params.display_text = predicted_name

Any help @Fiona.Chen

hello,
Any help @Fiona.Chen

Where did you put this line? Can you show the whole script?

WIth your code

  1. nvvidconv1 is of no use, you need to remove it. facenet_multistream/deepstream_imagedata-multistream.py at main · xya22er/facenet_multistream · GitHub
  2. Please move filter1 after nvvidconv facenet_multistream/deepstream_imagedata-multistream.py at main · xya22er/facenet_multistream · GitHub

This is in sgie_sink_pad_buffer_probe while sgie_sink_pad_buffer_probe is attached after nvmultistreamtiler src pad but not your SGIE (face_recogniser). You can not get tensor meta here. Please get tensor meta right after SGIE src pad.
facenet_multistream/deepstream_imagedata-multistream.py at main · xya22er/facenet_multistream · GitHub

Please refer to deepstream_python_apps/deepstream_test_2.py at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub for the usage of tensor meta.

https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvinfer.html#tensor-metadata

Thanks for replay
even If I put the linking like this the problem is the same

      streammux.link(face_detector)
	face_detector.link(tracker)
	tracker.link(nvvidconv1)
	nvvidconv1.link(filter1)
    filter1.link(face_recogniser)
	face_recogniser.link(tiler)
	tiler.link(nvvidconv)
	nvvidconv.link(nvosd)
	if is_aarch64():
		nvosd.link(transform)
		transform.link(sink)
	else:
		nvosd.link(sink)


vidconvsinkpad = face_recogniser.get_static_pad("src")
	if not vidconvsinkpad:
		sys.stderr.write(" Unable to get sink pad of nvvidconv \n")

	vidconvsinkpad.add_probe(Gst.PadProbeType.BUFFER, sgie_sink_pad_buffer_probe, 0)

When I put network-type= 100 in face_reconiser_config, it work fine, but the tracker id not display. Should I put myself with predicted_name?

Can deepstream_python_apps/apps/deepstream-test2 at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub show tracker id on your platform? If it can, please compare your code with this sample.

This is modified deepstream-test2 and the config file. The output-tensor-meta=1 and network-type=100 are set for sgie. I can see track id on the screen.
deepstream_test_2.py (14.1 KB) dstest2_sgie1_config.txt (3.6 KB)