Break The Stone
September 25, 2020

Installing Tensorflow 2.0 GPU in Windows & Setting Up Your Nvidia GPU for OpenCV DNN

This is a multipurpose tutorial because not only we will install TensorFlow 2.0 with GPU but we will also set up our Nvidia GPU for OpenCV source installation so that we can use our GPU with the OpenCV DNN module. The Blog post for source installation of OpenCV in windows can be accessed here

Note:For this tutorial you must have an Nvidia Cuda compatible GPUI’m also assuming that you already have python installed in your system, if not then you can go ahead and install anaconda distribution for python 3.7.

Alright Let’s Get Started

Step 0: Uninstall any program that says NVIDIA:

First of all to avoid any headaches down the road, you should uninstall any NVIDIA related programs or drivers, don’t worry I’ll show you how to install the latest drivers. In case you are pretty sure that you have the correct drivers installed then you don’t need to perform this step.

Step 1 (a): Download Visual Studio 2019:


Click here to download the Microsoft Visual Studio 2019 Community version

After Downloading you will get a .exe file.


Step 1 (b): Install Visual Studio 2019 

In order to begin the installation process click on thevs installer fileand continue with default settings. After that downloading will begin and after downloading the installation process will start.



Step 1 (c): Select The Workloads in Visual Studio 2019

Finally, after completing the installation, you will be required to select workloads


As you can see above that we have SelectedPython DevelopmentandDesktop Development C++

Make sure to selectDesktop development with c++otherwise at the time of CMake compilation during OpenCV source installation you will get errors.

After Selecting the workloadsClicktheInstallButton and your Packages will start downloading and then installing.

Step 2 (a): Check your Graphics Card.

Go to the device manager and under display adapters note down the name of your Nvidia Graphics card.


Step 2 (b): Download Install the driver:

Now go to the Nvidia homepage here, and put your graphics card Operating system info as shown, I’m putting this information according to my card, for your card it will be different.

No comments:

Post a Comment