Will opencv usage with gstreamer reduce CPU usage?

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

Will opencv usage with gstreamer reduce CPU usage?

jinmc
Hi!
I have a script that would do what I need that uses opencv, about object
detection.
But the problem is that it uses too much CPU (approximately 50%)
I want to use gstreamer with opencv, and on top of that use cuda
gpu-accelerated opencv to reduce CPU usage and use GPU instead.
If cuda usage is not possible would it still reduce CPU usage?
Would this be possible? Please give me some insight!
Also, I want to do everything in python, as the current legacy system is in
python.
Thanks!



--
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
|

Re: Will opencv usage with gstreamer reduce CPU usage?

Michael Gruner
Hello

Yes you should be able to write an OpenCV application that captures with GStreamer and processes using CUDA. I have identified that one of the processing bottlenecks when using GStreamer video capture in OpenCV is that every buffer is copied. I’m working on a patch to remove this copy, it’s currently reviewed by the OpenCV team:


Note how, for a 1080P video example, max framerate increased from 500fps to 1300fps. You’ll need to build OpenCV from source. There’s a link in that same wiki with instructions. And yes, this applies to Python as well.

Please be aware that this is a work in progress and yet subject to fixes/improvements.

Hope it somehow helps!
Michael


On 20 Jan 2021, at 18:53, jinmc <[hidden email]> wrote:

Hi!
I have a script that would do what I need that uses opencv, about object
detection.
But the problem is that it uses too much CPU (approximately 50%)
I want to use gstreamer with opencv, and on top of that use cuda
gpu-accelerated opencv to reduce CPU usage and use GPU instead.
If cuda usage is not possible would it still reduce CPU usage?
Would this be possible? Please give me some insight!
Also, I want to do everything in python, as the current legacy system is in
python.
Thanks!



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel