xinntao / ESRGAN

ECCV18 Workshops - Enhanced SRGAN. Champion PIRM Challenge on Perceptual Super-Resolution. The training codes are in BasicSR.
https://github.com/xinntao/BasicSR
Apache License 2.0
6.04k stars 1.07k forks source link

How can use this code with colab #141

Open lenalana opened 5 months ago

lenalana commented 5 months ago

Hello Xintao,

please this is the first time I am using deep learning and I need some help. I did these steps to run the code on colab: 1-!git clone https://github.com/xinntao/ESRGAN 2- !cd ESRGAN 3- download this model (RRDB_ESRGAN_x4.pth) and put it in the models folder but when run !python /content/ESRGAN/test.py I got on this error " Traceback (most recent call last): File "/content/ESRGAN/test.py", line 15, in model.load_state_dict(torch.load(model_path), strict=True) File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 997, in load with _open_file_like(f, 'rb') as opened_file: File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 444, in _open_file_like return _open_file(name_or_buffer, mode) File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 425, in init super().init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: 'models/RRDB_ESRGAN_x4.pth' Colab paid products - Cancel contracts here 34567891011121314151617181920"

Any help please?