Skip to content Skip to footer

Setting Up Computer Vision with AI Support on Windows 10

To work effectively with Computer Vision and AI on Windows 10, you need to ensure you have the right software and libraries installed. Here is a step-by-step guide to setting up your environment:

Step-by-Step Guide

1. Extend Path Length

Ensure you are running Windows 10 Version 1607 (Anniversary Update) or later to handle extended path lengths.

2. Install Visual Studio 2017 Desktop Express

Download and install Visual Studio 2017 Desktop Express from Microsoft’s website.

3. Install NVIDIA CUDA Toolkit

You need the CUDA Toolkit to leverage the power of NVIDIA GPUs for accelerating AI computations. Visit NVIDIA’s website to download CUDA Toolkit 10.0 for Windows and follow the installation instructions provided on NVIDIA’s documentation page.

4. Install NVIDIA cuDNN

cuDNN is a library for optimizing neural network computations on NVIDIA GPUs. Download cuDNN from NVIDIA’s website. Make sure to download version 7.6.5 for CUDA 10.0. After downloading, extract the files and copy them to the appropriate locations as instructed on the NVIDIA website:

  • Copy cudnn64_7.dll to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin.
  • Copy cudnn.h to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include.
  • Copy cudnn.lib to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\lib\x64.

5. Install Anaconda

Anaconda is a popular distribution of Python that comes with many pre-installed packages and tools for data analysis and machine learning. Download and install Anaconda from their website. Choose the appropriate version for Windows and follow the installation instructions.

6. Update Anaconda

After installation, open a command prompt and run the following commands to update Anaconda and its packages:

conda update conda
conda update anaconda

7. Check Versions of Installed Packages

Create a Python script file, for example versions.py, with the following code to check the versions of important libraries like scipy, numpy, matplotlib, pandas, statsmodels, and scikit-learn:

import scipy
import numpy
import matplotlib
import pandas
import statsmodels
import sklearn

print("scipy version:", scipy.__version__)
print("numpy version:", numpy.__version__)
print("matplotlib version:", matplotlib.__version__)
print("pandas version:", pandas.__version__)
print("statsmodels version:", statsmodels.__version__)
print("scikit-learn version:", sklearn.__version__)

Run the script with the command:

python versions.py

8. Install Deep Learning Libraries

Use Anaconda to install popular deep learning libraries. Run the following commands in the command prompt:

conda install theano
pip install cmake
pip install dlib
pip install tensorflow-gpu==1.14.0
pip install tensorflow-hub
pip install keras==2.3.1
pip install opencv-contrib-python
pip install --user gast==0.2.2

9. Update All Packages

Run the following command to update all installed packages to their latest versions:

conda update --all

10. Check Versions of Deep Learning Libraries

Create a Python script file, for example deep_versions.py, with the following code to check the versions of theano, tensorflow, and keras:

import theano
import tensorflow as tf
import keras

print("Theano version:", theano.__version__)
print("TensorFlow version:", tf.__version__)
print("Keras version:", keras.__version__)

Run the script with the command:

python deep_versions.py

Conclusion

By following these steps, you have successfully set up your Windows 10 environment for working with Computer Vision and AI, leveraging CUDA and deep learning libraries. You can now start exploring and developing exciting applications in this field!

Good luck with your projects!