Python semantic segmentation and street view recognition (2): environment construction

Preface

This article is mainly used to record the process of using python to do image recognition semantic segmentation training set. Since there are too many bugs to eliminate during this process, I hope that students who want to do this part can avoid taking some detours.

This article is the second article on python semantic segmentation and street view recognition, about environment construction. This part is one of the most annoying in the entire process.

1. Install CUDA

1.1 First, you need to confirm that the computer GPU is NVIDIA

1.2 Use win+R to enter cmd and nvidia-smi to view the local version. The following uses my notebook as an example.

You can see that the local graphics card driver version is 512.78 (it is recommended to upgrade the driver to the latest version before this)

The CUDA Version on the right indicates that the highest supported CUDA version is 11.6

1.3 According to this, download the corresponding version of CUDA from the NVIDIA official website, the link is (slightly slow to open)

CUDA Toolkit 11.2 Downloads | NVIDIA Developer

1.4 Enter nvcc -V in cmd (there is a space in the middle, V is uppercase) to check whether the installation is successful. If the following is displayed, the installation is successful.

1.5 View CUDA path

Enter set cuda in cmd. If the following is displayed, the configuration is successful. Otherwise, environment variables need to be configured.

1.6 Environment variable setting method

Enter control system in cmd, select "Advanced System Settings" - "Environment Variables" in the pop-up window, and add the following two lines

(If you don’t know this step, Baidu “add environment variables”)

Repeat step 1.5. If successful, CUDA installation is complete.

1.7 Error description

Actual testing may show that the installation failed when installing CUDA.

At this time, first uninstall the installed CUDA, and then cancel the installation of a certain package according to the installation failure prompt and the installation failure.

The reference link is as follows

https://blog.csdn.net/Redamancy06/article/details/125809903?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522169418531816800182130145%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=169418531816800182130145&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~top_positive~default-1-125809903-null-null.142^v93^control&utm_term=cuda%E5%AE%89%E8%A3%85%E5%A4%B1%E8%B4%A5icon-default.png?t=N7T8https://blog.csdn.net/Redamancy06/article/details/125809903?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522169418531816800182130145%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=169418531816800182130145&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~top_positive~default-1-125809903-null-null.142%5Ev93%5Econtrol&utm_term=cuda%E5%AE%89%E8%A3%85%E5%A4%B1%E8%B4%A5

2. Install CUDNN

2.1Official website download

Link below

Log in | NVIDIA Developer

CUDNN is an expansion package used by CUDA for semantic segmentation. It needs to be downloaded separately. You can download it after registering an account on the NVIDIA official website.

2.2 Register and install a version matching CUDA

2.3 After downloading, there will be a bunch of files that need to be copied to the corresponding CUDA folder. For the specific process, please refer to this article.

Win10 installation CUDA10 and cuDNN_cuda10.1 installation_codema's blog-CSDN blog

2.4 Finally, you also need to add it to the environment variables

At this point, CUDNN is installed.

2.5 Error description

After CUDNN is installed, it may be prompted that a certain dll file is missing during subsequent runs. This is caused by a version error. You can check which file is confirmed in the error report and search online for which file to download. The dll link download URL is as follows

Download missing DLL files for free | DLL‑files.com

The author prompted that cublasLt64_10.dll and cublas64_10.dll were missing during installation.

Place it directly in the CSDN download area here

https://download.csdn.net/download/qq_41904236/88317612

Download for everyone, you can also search and download in the link above

3. Install python or anacoda (omitted)

Since the author uses VScode a lot for other development, I installed python directly and omitted this step.

Guess you like

Origin blog.csdn.net/qq_41904236/article/details/131670921