-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Install maskrcnn-benchmark on Windows(VS2017+CUDA10.1) #1042
Comments
Could I skip all the steps related to cuda if I only would like to use cpu on windows? |
Windows 10
|
try vs 2017, and all the specific version I wrote in the document. |
Hi, this and many related links use vs2017, can we not use vs 2019? with the details provided above? @msqiu |
Hi @msqiu, I am receiving the same error as @nguyen14ck while following the same step you mentioned (vs2017) |
Raw file
Install Pytorch maskrcnn on Windows(VS2017+CUDA10.1).md
Enviornments
Useful references
Steps
Install Visio Studio 2017 Community (latest version, 64bit). Make certain you click 'VC++ 2017 version 15.4 v14.11 toolset' below the 'Individual components' tab.
Install "Build Tools For Visual Studio"(VS2017 latest version) , run it. Select: 'Workloads - Visual C++ build tools' and select from individual components also 'Windows 10 SDK'(latest version) and 'VC++ 2015.3 v14.00 (v140) toolset for desktop'.
Add this to your PATH environment variables: C:\Program Files (x86)\Windows Kits\10\bin\x64
Copy rc.exe & rcdll.dll from C:\Program Files (x86)\Windows Kits\8.1\bin\x86 to C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
restart the computer
Install CUDA 10.1(64 bit for windows), standard install.
restart the computer
Download cudnn-10.1-windows10-x64-v7.5.0.56 (search from Internet). Extract to a temp folder. As putting it into a folder and adding to %PATH% won't work anymore for some reason, do the following:
Install Anaconda if you didn't do it yet.
Execute the following commands:
Install Apex:
Comment this part of the code in setup.py :
Then execute the following commands:
PyTorch solution
Download/unzip or git this solution, open up Anaconda prompt and navigate into the working folder.
Navigate to maskrcnn_benchmark\csrc\cuda and modify ROIAlign_cuda.cu, ROIPool_cuda.cu and SigmoidFocalLoss_cuda.cu in the following manner: replace the call for THCCeilDiv to ceil_div1,ceil_div2,ceil_div3 respectively (replace all two calls in each of these files) and add the following function (in all of these files, so for the first file it is like below, just the name changes because of proper linking later):
do not forget to change the string type of ceil_divs from (int) to (long), for example:
Navigate back to the root folder of the solution, open up setup.py and modify the following two parts like this:
Go back to Anaconda command prompt and execute:
Remember
The text was updated successfully, but these errors were encountered: