Ask Your Question
0

How to configure opencv 3 with GPU Support, Cuda 9.0, Ubuntu 16.04?

asked 2018-02-13 20:32:00 -0600

RSSharma gravatar image

updated 2018-02-13 23:26:08 -0600

I am working with this large data set of around 70,000 images. I find that reading the images in OpenCV takes too much time. I have access to an NVidia GTX 1080, and would prefer to run the imread on the GPU instead as I believe it would be faster. I have installed CUDA 9.0, CuDNN 8.0, and libcupti, which is necessary for Tensorflow-GPU, and also want a means to use GPU with OpenCV commands like imread. I noticed that some Github links offer instructions for OpenCV-GPU with CUDA 8.0, and since I have CUDA 9.0, I don't believe those will suit my case.

Any help/advice would be greatly appreciated.

edit retag flag offensive close merge delete

Comments

3
  • "would prefer to run the imread on the GPU instead" -- imread() is just a shallow wrapper around various 3rdparty libs, like libpng, and there is no cuda optimization for this at all in opencv.

  • "Tensorflow-GPU" -- this probably means, you're using python, again -- no cuda support for any of opencv's python wrappers atm.

berak gravatar imageberak ( 2018-02-14 01:22:42 -0600 )edit

Okay. Thanks

RSSharma gravatar imageRSSharma ( 2018-02-14 01:50:57 -0600 )edit
2

Furthermore, let me add, that the bottleneck of pushing all your data from the CPU to the GPU, before reading the actual image in OpenCV is simply not possible. You have to allocate data on the GPU and push it there, which means that this solution will only run slower than your current situation. You simply cannot surpass CPU memory for this.

StevenPuttemans gravatar imageStevenPuttemans ( 2018-02-14 03:17:44 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-02-14 01:36:01 -0600

sweetsmile365 gravatar image
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-02-13 20:32:00 -0600

Seen: 6,029 times

Last updated: Feb 14 '18