GstPbutils.Discoverer effects to the generated bboxes

My platform is GPU and I am using DeepStream 6.1 with 8.2.5 TensorRT. Driver Version: 510.85.02

Basically, I want first to check all the URLs and find the working ones. And in the next stage connect only the working sources. For checking URLs I am using “GstPbutils.Discoverer”


    discoverer = GstPbutils.Discoverer()
    status = []
    for i, path_ in enumerate(Sources):
            info = discoverer.discover_uri(path_)
            if info.get_video_streams():
                print('# Stream OK', path_)
                print('Stream Not OK!')
        except Exception as e:
            print('Error while opening # video removed it from Sources list.', path_, e)

The problem is when I use pre-source checking, my obtained boxes fluctuate. I am adding the sample image. 

![Screenshot from 2023-02-17 14-41-26|287x282](upload://nAHjvnwfEKjOIEtHpOibEweyOzu.png)

For example, for 50 frames it works fine, then suddenly these meaningless boxes pop up.

Screenshot from 2023-02-17 14-41-26

What’s the behavior if you skip the checking (by GstPbutils.Discoverer) and run inference on this source directly? The extra bounding boxes seem to be from your inference of the model but not removed by post processing (such as NMS).

Yes, I have checked without GstPbutils.Discoverer and it works without any unwanted b-boxes.

I think it is not about NMS because every time two cross bboxes appear in the same position.

These unwanted bboxes appear in all detected real bboxes. like a flash, they come for one frame then everything works fine again.

GstPbutils.Discoverer is just a tool to get the uri information. The key is how do you handle the pipeline with the information. Please debug your implementation to find out the impatc to the pipeline.

I guess this is a bug in the system or something. After obtaining whether the source is active or not I handle it as the following way.

    for i in range(number_sources):
        if status[i]:

            print("Creating source_bin ",i," \n ")

            if uri_name.find("rtsp://") == 0 :
                is_live = True

            source_bin=create_uridecode_bin(i, uri_name)
            if not source_bin:
                sys.stderr.write("Unable to create source bin \n")
            g_source_bin_list[i] = source_bin
            padname="sink_%u" %i

            print(f"ALERT ! {Processed_Sources[i]} is not working. Not adding the source to stream at beginning, will work on it after!")

Note: For sake of debugging, I just commented GstPbutils.Discoverer part and fill the status list with fake data (ex : [True, True, False, False]). This time everything works just fine. This proves that the problem is exactly in GstPbutils.Discoverer part.

What is the whole pipeline? Can you dump the pipeline graph? DeepStream SDK FAQ - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums

What is the value you set to nvstreammux batch-size when there are only two sources valid?

nvstreammux batch-size always is set as the initial count of the streams, without looking if it is active or not.

I could not dump the pipeline, but it is simple :

queue1 ->Gst.ElementFactory.make("queue","queue1")
pgie  -> Gst.ElementFactory.make("nvinfer", "primary-inference")
nvvidconv1 ->Gst.ElementFactory.make("nvvideoconvert", "convertor1")
filter1 -> Gst.ElementFactory.make("capsfilter", "filter1")
nvvidconv - >Gst.ElementFactory.make("nvvideoconvert", "convertor")

and there probe attached to the nvvidconv1.

Again let me stress one more time that the problem did not arise when I fakely fill some values to the status list. But it arises when it is filled by actual values gotten from discoverer.discover_uri(path_).

Can you provide a method to reproduce the failure? Which clues make you think it is a DeepStream issue?

I have checked the ‘GstPbutils.Discoverer’ in one of the python sample apps. However, it works perfectly.
I am using custom YOLO implementation of the Deepstream. The same code made meaningless bboxes. The only main difference is the custom implementation of nvdsinfer. How does ‘GstPbutils.Discoverer’ affect the result?

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

Can you provide a method to reproduce the failure?

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