opencv_dart icon indicating copy to clipboard operation
opencv_dart copied to clipboard

Can we please have GPU support?

Open xonaman opened this issue 1 year ago • 10 comments

Is your feature request related to a problem? Please describe. Not a problem, but GPU utilization would make a good performance boost.

Describe the solution you'd like OpenCV offers types like cv::GpuMat via the CUDA module, which bindings could be implemented to.

Describe alternatives you've considered GPU is THE alternative to CPU image processing.

Additional context The following graphic from here should say all you need to know. perf

xonaman avatar Aug 22 '24 22:08 xonaman

Yes, it's in consideration. But it's just not easy and lots of works todo, and i have no much time, will work on in the future.

rainyl avatar Aug 23 '24 02:08 rainyl

what needs to be implemented to make it work? maybe i can help in it when i get time too

abdelaziz-mahdy avatar Aug 25 '24 20:08 abdelaziz-mahdy

@abdelaziz-mahdy basically something like https://github.com/hybridgroup/gocv/tree/release/cuda

and of course, a nvidia GPU is required to test it🤣

rainyl avatar Aug 26 '24 00:08 rainyl

@abdelaziz-mahdy basically something like https://github.com/hybridgroup/gocv/tree/release/cuda

and of course, a nvidia GPU is required to test it🤣

Mission failed for me then 😂

abdelaziz-mahdy avatar Aug 26 '24 00:08 abdelaziz-mahdy

me too. I am developing on a laptop without a NVIDIA GPU equipped, so not active on this.

If any one want to work on this, refer to https://github.com/hybridgroup/gocv/tree/release/cuda

rainyl avatar Aug 26 '24 01:08 rainyl

Why do you recall CUDA if mobile devices have their own GPUs, not related to CUDA?

@abdelaziz-mahdy basically something like https://github.com/hybridgroup/gocv/tree/release/cuda

and of course, a nvidia GPU is required to test it🤣

frg-x avatar Oct 28 '24 11:10 frg-x

Why do you recall CUDA if mobile devices have their own GPUs, not related to CUDA?

@abdelaziz-mahdy basically something like https://github.com/hybridgroup/gocv/tree/release/cuda

and of course, a nvidia GPU is required to test it🤣

I think he wants it for windows and Linux,

Mobile gpu support can be achieved using vulkan, but it's performance is still not that good I think and I don't know if matgpu supports it or not

abdelaziz-mahdy avatar Oct 28 '24 11:10 abdelaziz-mahdy

Well, GPU backends such as OpenCL and Vulkan on mobile devices have been supported.

rainyl avatar Oct 28 '24 12:10 rainyl

How to enable GPU processing? Is GPU-processing support implemented in opencv_dart API?

Well, GPU backends such as OpenCL and Vulkan on mobile devices have been supported.

frg-x avatar Oct 28 '24 12:10 frg-x

How to enable GPU processing? Is GPU-processing support implemented in opencv_dart API?

Well, GPU backends such as OpenCL and Vulkan on mobile devices have been supported.

What processing? if you mean the methods like "cv::cuda::threshold", they are not supported by opencv on mobile devices.

GPU backends like OpenCL are used for dnn-related inferences, they are supported both in opencv_core and opencv_dart for now. If you want to enable them, please refer to the document of opencv.

rainyl avatar Oct 28 '24 12:10 rainyl