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