hhb072 / WaveletSRNet

A pytorch implementation of Paper "Wavelet-srnet: A wavelet-based cnn for multi-scale face super resolution"
MIT License
240 stars 67 forks source link

Can't load model "wavelet_weights_c2.pkl" #1

Open ayst123 opened 6 years ago

ayst123 commented 6 years ago

Hi,

It seems the uploaded model doesn't work. is it possible to update it? Thanks!

image

hhb072 commented 6 years ago

Please use pickle to load the parameters stored in the pkl file, following the lines 43-49 in networks.py.

import pickle
f = file('wavelet_weights_c2.pkl','rb')
dct = pickle.load(f) 
 f.close()
ayst123 commented 6 years ago

Thanks for the reply. But I am still confused. The pkl file is only for WaveletTransform? How to load parameters for the NetSR(). I am not sure what should we give for "--pretrained".

Is it possible to have the detailed instruction on how to test image using the existing parameters ? Thanks

ayst123 commented 6 years ago

Can I ask where is the pretrained model for srnet? It seems that pkl file is for the module, WaveletTransform, but not srnet. Thanks

image

ineslyl commented 6 years ago

I have the same question with the variable pretrained.

unlabeledData commented 6 years ago

The pkl file can not be loaded using the method presented in the second floor. The error is like that: Traceback (most recent call last): File "test_tmp.py", line 4, in model = pickle.load(file) UnicodeDecodeError: 'ascii' codec can't decode byte 0xbf in position 23: ordinal not in range(128)

Do you know what's wrong with it?

TuXiaokang commented 5 years ago

@unlabeledData pickle.load(file, encoding='latin1')

TuXiaokang commented 5 years ago

how to load WaveletTransform's weights when upscale factor == 8? @hhb072

hongdd commented 5 years ago

wavelet_weights_c2.pkl
where can i get this weights ????

ChriswooTalent commented 5 years ago

@TuXiaokang Thank you, it works when I add (encoding='latin1')