BasicSR Installation Guide for Windows
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.
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 isn't, you can also install it yourself on Windows 10. 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/
winget install Python.Python --version 3.9.7 --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.9.1+cu111 torchvision==0.10.1+cu111 torchaudio===0.9.1 -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 torchvision torchaudio -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
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/traiNNer.git /c/src/git/BasicSR