Closed Dejan1969 closed 4 years ago
eval.py is just a calling tool. You will need pre-trained weights to do the actual inferring.
To download weights, you can refer to prepare_data.py
or official repos, and using --pretrain
to specify the weights
Thank you for clarifying, however adding
--pretrain=/home/xxxxxx/VideoSuperResolution/Results/RRDB_GAN.pth (from you) or --pretrain=/home/xxxxxx/VideoSuperResolution/Results/RRDB_ESRGAN_x4.pth (from https://github.com/xinntao/ESRGAN/tree/master/models)
produce following error :
$ python3 eval.py esrgan --cuda --auto_rename -t 0012x2.png --pretrain=/home/xxxxxx/VideoSuperResolution/Results/RRDB_GAN.pth
2020-03-13 09:47:46,991 INFO: LICENSE: ESRGAN is implemented by Xintao Wang. @xinntao https://github.com/xinntao/ESRGAN
Traceback (most recent call last):
File "eval.py", line 117, in
Also trying to load VSR trained model in orginal ESRGAN (https://github.com/xinntao/ESRGAN) produce error:
$ python3 test.py
Initializing ESRGAN using model 'rrdb_ep0010.pth'
Traceback (most recent call last):
File "test.py", line 165, in
try to rep and get back to you later
Inferring produce strange colors images (and every time different one ???)
ESRGAN (pytorch):
$python3 eval.py esrgan -t 0012x2.png --cuda 2020-03-07 12:10:23,950 INFO: LICENSE: ESRGAN is implemented by Xintao Wang. @xinntao https://github.com/xinntao/ESRGAN 2020-03-07 12:10:27,679 INFO: Total params: 77223884 2020-03-07 12:10:27,680 WARNING: trying to restore state for optimizer optd, but failed. 2020-03-07 12:10:27,680 WARNING: trying to restore state for optimizer optg, but failed. 2020-03-07 12:10:27,683 INFO: Inferring [dnet][rrdb] at epoch 0 Infer: 100%|######################################| 1/1 [00:06<00:00, 6.94s/it]
SRCNN (tensorflow):
python3 eval.py srcnn -t 0012x2.png --cuda 2020-03-07 12:13:27,926 INFO: Total params: 69251 2020-03-07 12:13:27,926 WARNING: trying to restore state for optimizer opt, but failed. 2020-03-07 12:13:27,928 INFO: Inferring [srcnn] at epoch 0 Infer: 100%|######################################| 1/1 [00:01<00:00, 1.89s/it]
Adding ----output_color=RGB produce following error...
$python3 eval.py esrgan -t 0012x2.png --cuda --output_color=RGB Traceback (most recent call last): File "predict.py", line 120, in
main()
File "predict.py", line 76, in main
suppress_opt_by_args(model_params, *args)
File "/home/xxxxxx/VideoSuperResolution/VSR/Util/Utility.py", line 116, in suppress_opt_by_args
raise KeyError("Parameter {} doesn't exist in model!".format(key))
KeyError: "Parameter output_color doesn't exist in model!"
My setup
ubuntu18.04, CUDA 10.0 Python 3.6.9
tensorboard 1.15.0
tensorboardX 2.0
tensorflow 1.15.2
tensorflow-estimator 1.15.1
tensorflow-gpu 1.15.2
torch 1.4.0
torchvision 0.5.0
numpy 1.16.2
scikit-image 0.16.2
scipy 1.4.1
matplotlib 3.2.0
Pillow 7.0.0
pypng 0.0.20
pytest 5.3.5
PyYAML 5.3
psutil 5.4.2
tqdm 4.41.1
h5py 2.10.0
easydict 1.9
Any ideas?