Hi,
Please use the OpenCV with CUDA support for this. You can find a script in the below topic:
Thanks.