How do I run a image processing pipeline fast for multiple images processing (concurrently)?

Hi,

I’m running a pipeline for processing multiple jpeg images with yolo object detection as below, the pipeline is:

pipeline = “appsrc ! jpegdec ! videoconvert ! nvvideoconvert ! nvv4l2h264enc ! h264parse ! nvv4l2decoder ! nvinfer config-file-path=yolo.txt ! nvvideoconvert ! nvdsosd ! nvvideoconvert ! videoconvert ! jpegenc ! fakesink”

BTW, I’m running this pipeline in python.

The thing is that it works fine sequentially but I had to reset by pipeline.set_state(Gst.State.READY) and pipeline.set_state(Gst.State.PLAYING) once each image processing is done. This takes too much time to handle 60 images in this sequential fashion (each processing takes 0.25 second).

I’ve tried to apply threading.Thread(target=run_pipeline) but it seems like each thread should wait until the previous image processing is done – then Gst.State.READY again…

I could create a function to create pipeline in each thread, but it also takes too much time to create pipeline (0.3 second).

I want to create a pipeline only one time (0.3 second), and
run the pipeline multiple times concurrently (?) or without any delay for processing 60 images in less than 1 second.

Should I set a hardware to do this? or can I set “Gst.State.READY” for multiple images at the same time?

Any solutions / suggestions / comments will be appreciated.
Thanks in advance.
– Sean.

My environments are:

  • Jetson AGX Orin
  • JetPack 5.0.2 (L4T R35.1.0)
  • Deepstream6.1
  • Python 3.8

If all the pictures are in the same format, E.G. they are all JPEG images. You may consider to use multifilesrc.

Hi,

Actually, I need to give the bytes of image to “appsrc” cause I’m using webservice to receive the image bytes and process this bytes of image in the Deepstream pipeline (as above).

I was looking for “multiappsrc”, similar to “multifilesrc” as you suggested, but “multiappsrc” does not exist.

Is there a way to use “multifilesrc” for the REST protocol to receive the image in bytes?
Or any other suggestions?

Thanks1
-Sean

Since you are using appsrc, so you can implement the continuous receiving images with appsrc only.

That means your appsrc implementation has something wrong. Please debugging your appsrc implementation.

Got it. Thanks!

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