Trimmed down, updated and switched to winget
This Guide is currently in Alpha, use it at your own risk!
Before you start with this guide, make sure that you have the most up to date driver from Nvidia installed if you have a Nvidia card installed.
Before you start with this guide, make sure that you have no Python, Anaconda, Miniconda, (other Python distribution) installed.
If you have something from Nvidia installed or an existing Python installation, uninstall them first in the Windows Control pannel. To check that there really is no Python installation left, open a CMD window and type
python if nothing happens you are good to go.
WinGet is a package manager for Windows, it allows you to automate the installation of a ton of programs and more. In the future it will be included with Windows, for now however, you need to opt-into it or install it yourself, you can find instructions here: https://docs.microsoft.com/en-us/windows/package-manager/winget/
Let's check if you have it ready to go:
Open a PowerShell window as an admin. (On Windows 10 rightclick the start symbol (four squares) then select Windows PowerShell (Admin)) Enter:
If it returns something like:
Then WinGet was installed correctly and you can proceed, if that doesn't happen, check the link above for different ways to get winget
winget install Python.Python --version 3.8.6 --silent
winget install Git.Git --silent
- Open a shell of your choice as an admin. (PowerShell, CMD or Git Bash)
- If you have a Nvidia graphic card enter the following command in the cmd and press enter:
pip install torch===1.7.1+cu110 torchvision===0.8.2+cu110 torchaudio===0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
- If you have an AMD / Intel graphic card enter the following command in the cmd and press enter:
pip install torch==1.7.1+cpu torchvision==0.8.2+cpu torchaudio===0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
- If the command for your system won’t work for you, please report it. In the meantime, you can get an up to date version here on the Pytorch Website. Select Stable, Windows, Pip, your Python version and your CUDA version (should be the newest) or None for AMD / Intel users.
pip install opencv-python
pip install numpy==1.19.3
The Neural Networks
In my example we will install ESRGAN and BasicSR in a project folder called nn (neural network) in the drive root of C. You can change the path if you want to, but keep it as short as you can, since windows has a limitation on how long paths can be.
We will also work with Bash here, you can do this in other shells too, but this guide will use Git Bash, that we installed above.
- Open a Git Bash window.
mkdir -p /c/nn/
git clone https://github.com/JoeyBallentine/ESRGAN.git /c/scr/git/ESRGAN
git clone https://github.com/victorca25/BasicSR.git /c/src/git/BasicSR