Decoupling branches

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Decoupling branches

c_mac
I'm a gstreamer newbie. I'm working on doing real time object detection
inference on a video stream. My GPU is not powerful enough to process every
frame in real time (30 fps), so I am wondering if it would be possible to
only send every 3rd frame down the inference branch after the tee and then
perhaps introduce some sort of delay in displaying the detection overlay.
I'm using GstInference ( https://github.com/RidgeRun/gst-inference
)- currently reading in from a file because the rest of the video pipeline
is still in development. Would like to read from the file at 30 fps but
process the frames at 10 fps and only display the overlay on every third
frame. Here is my current pipeline: 

gst-launch-1.0 filesrc location=$VIDEO_FILE ! decodebin ! videoconvert ! tee
name=t \ 
t. ! queue ! videoscale ! net.sink_model \ 
t. ! queue ! net.sink_bypass tinyyolov3 name=net
model-location=$MODEL_LOCATION backend=tensorflow
backend::input-layer=$INPUT_LAYER backend::output-layer=$OUTPUT_LAYER \ 
net.src_bypass ! detectionoverlay labels="$(cat $LABELS)" font-scale=2
thickness=2 ! videoconvert ! xvimagesink sync=false 

Is this possible? Any help or alternative approaches would be much
appreciated. Right now the entire video rendering is slowed down to the
speed of the inference. 



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

AW: Decoupling branches

Thornton, Keith
Hi,
You might like to try setting a pad probe on the queue's src pad and then dropping two frames for each frame that you pass.

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel <[hidden email]> Im Auftrag von c_mac
Gesendet: Mittwoch, 28. August 2019 21:29
An: [hidden email]
Betreff: Decoupling branches

I'm a gstreamer newbie. I'm working on doing real time object detection inference on a video stream. My GPU is not powerful enough to process every frame in real time (30 fps), so I am wondering if it would be possible to only send every 3rd frame down the inference branch after the tee and then perhaps introduce some sort of delay in displaying the detection overlay.
I'm using GstInference ( https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FRidgeRun%2Fgst-inference&amp;data=02%7C01%7C%7C625defebca4e494494e108d72f7d0fa1%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637030086482442892&amp;sdata=JIMbb0JwvrMvJqJG4Id1DI5eqsUXzMnJFp2TcKZaU%2FU%3D&amp;reserved=0
)- currently reading in from a file because the rest of the video pipeline is still in development. Would like to read from the file at 30 fps but process the frames at 10 fps and only display the overlay on every third frame. Here is my current pipeline: 

gst-launch-1.0 filesrc location=$VIDEO_FILE ! decodebin ! videoconvert ! tee name=t \ t. ! queue ! videoscale ! net.sink_model \ t. ! queue ! net.sink_bypass tinyyolov3 name=net model-location=$MODEL_LOCATION backend=tensorflow backend::input-layer=$INPUT_LAYER backend::output-layer=$OUTPUT_LAYER \ net.src_bypass ! detectionoverlay labels="$(cat $LABELS)" font-scale=2
thickness=2 ! videoconvert ! xvimagesink sync=false 

Is this possible? Any help or alternative approaches would be much appreciated. Right now the entire video rendering is slowed down to the speed of the inference. 



--
Sent from: https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgstreamer-devel.966125.n4.nabble.com%2F&amp;data=02%7C01%7C%7C625defebca4e494494e108d72f7d0fa1%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637030086482442892&amp;sdata=J%2BPMeSOXpZBLw2bEOkycESGOVbP0VfyKtA009aeM5Sg%3D&amp;reserved=0
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fgstreamer-devel&amp;data=02%7C01%7C%7C625defebca4e494494e108d72f7d0fa1%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637030086482442892&amp;sdata=OogA1SSyDPkSbHUjdNJz%2BhTBp6UU5lh7MY%2BzBWO7D4w%3D&amp;reserved=0
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel