Multiple image inference with python-app

• Hardware Platform - GPU
• DeepStream Version-5.1
• TensorRT Version-7.2
• NVIDIA GPU Driver Version (valid for GPU only)-460

I have create the python app for multiple image inference by referring [sample demonstrating image source: ‘/opt/nvidia/deepstream/deepstream-5.1/sources/apps/sample_apps/deepstream-image-decode-test’ ]

After the detection the app is not exiting properly ,continuously running in loop and the frame number is increasing.

For reference attaching the source file
image_inference.py (14.4 KB)

There is already multiple streams sample in deepstream_python_apps/apps/deepstream-test3 at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub. Please refer to the sample.

yes i refer that this sample is for video/rtsp streams.

I am trying on the multiple images.(i.e .jpg file format)

able to get output like follow:

frame_number 0
Source id is  0
Num object meta  5
Class Id : 0
Detector bbox: Car
Class Id : 0
Detector bbox: Car
Class Id : 0
Detector bbox: Car
Class Id : 2
Detector bbox: Person
Class Id : 2
Detector bbox: Person
frame_number 0
Source id is  1
Num object meta  5
Class Id : 0
Detector bbox: Car
Class Id : 0
Detector bbox: Car
Class Id : 0
Detector bbox: Car
Class Id : 2
Detector bbox: Person
Class Id : 2
Detector bbox: Person
frame_number 1
Source id is  0
Num object meta  5
Class Id : 0
Detector bbox: Car
Class Id : 0
Detector bbox: Car
Class Id : 0
Detector bbox: Car
Class Id : 2
Detector bbox: Person
Class Id : 2
Detector bbox: Person
frame_number 1
Source id is  1
Num object meta  5
Class Id : 0
Detector bbox: Car
Class Id : 0
Detector bbox: Car
Class Id : 0
Detector bbox: Car
Class Id : 2
Detector bbox: Person
Class Id : 2
Detector bbox: Person
frame_number 2
Source id is  0
Num object meta  5
Class Id : 0
Detector bbox: Car
Class Id : 0
Detector bbox: Car
Class Id : 0
Detector bbox: Car
Class Id : 2
Detector bbox: Person
Class Id : 2
Detector bbox: Person

Here code should be exit after the frame 0 output of both sources.
but it continuously running in loop,
Not understood how to exit the code or missing something in the code.

Thanks

Maybe your jpeg image file has some problem. Please check it.

Using the same image file provided in the deepstream samples [./deepstream-5.1/samples/streams/sample_720p.jpg]

Able to solve the issue by keeping ‘filesrc’
i.e source = Gst.ElementFactory.make(“filesrc”, “source”)
instaed of ‘multifilesrc’

thanks