i.mx 8m plus gpu acceleration for cv::BackgroundSubtractorMOG2 Class

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.mx 8m plus gpu acceleration for cv::BackgroundSubtractorMOG2 Class

480件の閲覧回数
mf_
Contributor II

Hi everyone,
I am rather new at developing for the GPU (especially in Python), so I might make some inaccurate statements.

We are using the iMX 8M Plus board, running yocto with OpenCL enabled.

We wanted to run the MOG2 algorithm  (coded in Python>=3.10) on the GPU, however, this does not seem to be supported like how it is supported on cuda (I can just run the cv::cuda::BackgroundSubtractorMOG2 Class , and it will run on the GPU).
I thought that maybe converting the images to cv::UMat, such that I could make use of the acceleration of the OpenCL libraries, however, this makes everything slower.
Is there another way to run the cv::BackgroundSubtractorMOG2 Class on the GPU using the delegated of the NXP eIQ toolkit? Would I have to create an OpenCL kernel to run this code? 

ラベル(2)
0 件の賞賛
返信
2 返答(返信)

434件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

For more understanding of this issue please read the machine learning user guide document, you are talking about cuda the i,MX family support OpenCL, in the document there are various examples on how to use OpenCV and OpenCL.

https://www.nxp.com/docs/en/user-guide/IMX-MACHINE-LEARNING-UG.pdf

 

Regards

0 件の賞賛
返信

432件の閲覧回数
mf_
Contributor II
Thanks for pointing me to the user guide, I have already checked this one out. I brought up CUDA to highlight how OpenCV directly supports GPU acceleration for the MOG algorithm in CUDA-abled systems, and I'm trying to find a similar straightforward path with OpenCL on our iMX 8M Plus board.

The guide mainly covers neural networks and basic GPU functions for image processing, but doesn't dive into GPU-accelerated background subtraction like MOG without neural nets.
If this straightforward path does not exist, I think there are only two options where my main question(s) reside in:
- Do we and can we write a custom OpenCL kernel for the cv2 MOG2 class? If yes, any tips or resources to start with would be great.
- If not, what is the alternative? It seems rather redundant to write the functions that make up the cv2 MOG class again but for GPU accelerated functions.
Appreciate your help!

0 件の賞賛
返信