Feed OpenCV GPUMat as Tensor into PyTorch network

Viewed 184

Is it possible to put an OpenCV GPUMat into a PyTorch network as a "tensor" in Python (not C++) to avoid a bottle neck`with CPU and GPU communication? Sure I could download the image again into the host and put it into the network but that would create a bottleneck. I would like to have the pre processing with OpenCV and the inference done all on the GPU in Python.

0 Answers
Related